Server Configuration

This section covers the basic configuration and setup of the Konarr server. The server is the central component that provides the REST API, web interface, and data storage capabilities.

Quick Start

Basic Configuration File

Create a konarr.yml configuration file:

# Basic server configuration
server:
  domain: "localhost"
  port: 9000
  scheme: "http"
  secret: "your-secure-secret-key-here"

# Data storage location
data_path: "./data"

# Agent authentication
agent:
  key: "your-agent-key-here"

Running the Server

Start the server with your configuration:

# Using Docker (recommended)
docker run -d \
  --name konarr-server \
  -p 9000:9000 \
  -v $(pwd)/konarr.yml:/app/konarr.yml \
  -v $(pwd)/data:/data \
  ghcr.io/42bytelabs/konarr:latest

# Using binary
konarr-server --config konarr.yml

# Using cargo (development)
cargo run --bin konarr-server -- --config konarr.yml

Essential Configuration

Network Settings

SettingDescriptionDefault
server.domainServer hostnamelocalhost
server.portHTTP port9000
server.schemeProtocol (http/https)http

Security Settings

SettingDescriptionRequired
server.secretApplication secret for sessionsYes
agent.keyAgent authentication tokenOptional

Storage Settings

SettingDescriptionDefault
data_pathDatabase and data directory./data

Verification

Health Check

Verify your server is running correctly:

# Test server health
curl http://localhost:9000/api

# Expected response includes server version and status

Web Interface

Access the web interface at: http://localhost:9000

Next Steps

Common Issues

Database Initialization

The server automatically creates the SQLite database on first run. Ensure the data_path directory is writable.

Port Conflicts

If port 9000 is in use, change server.port in your configuration file or use Docker port mapping.