Skip to content

Configuration Reference

Server Configuration

Configuration is loaded from server/config/sys.config or environment variables.

Core Settings

SettingDefaultDescription
port21434HTTP listener port
tls_enabledfalseEnable HTTPS
tls_cert_fileTLS certificate path
tls_key_fileTLS private key path
auth_enabledfalseRequire authentication
auth_exempt_paths["/health",...]Paths exempt from auth
rate_limit_enabledfalseEnable per-key rate limiting
cors_origin""CORS Access-Control-Allow-Origin
workspace_root.Workspace files root directory
session_dir./sessionsSession storage directory

Inference Settings

SettingDefaultDescription
inference_bin./llama-serverllama.cpp server binary
inference_gpu_layers99GPU layers to offload
inference_ctx_size4096Context window size
inference_threads4CPU threads

Memory Settings

SettingDefaultDescription
memory_pg_dsnPostgreSQL DSN for vector storage
memory_embed_modelEmbedding model path

ZMQ Settings

SettingDefaultDescription
zmq_router_port5555ZMQ ROUTER bind port
zmq_pub_port5556ZMQ PUB bind port

Service Integration

SettingDefaultDescription
mango_host"127.0.0.1"Mango auth service host
mango_port5800Mango auth service port
pg_reconnect_delay_ms5000PostgreSQL reconnect delay
worker_heartbeat_timeout_ms15000Worker heartbeat timeout
worker_heartbeat_check_ms10000Heartbeat check interval

Monitoring

SettingDefaultDescription
prometheus_enabledtrueExpose /metrics endpoint
otel_enabledfalseOpenTelemetry tracing

CLI Configuration

Stored at ~/.zerg/config.json:

json
{
  "profiles": {
    "default": {
      "url": "https://api.nonsense.ws",
      "token": "your-api-token"
    },
    "staging": {
      "url": "https://staging.nonsense.ws",
      "token": "staging-token"
    }
  }
}

Luna Agent Configuration

Luna uses ~/.luna/config.json:

json
{
  "provider": "anthropic",
  "model": "claude-sonnet-4-20250514",
  "permission_mode": "default",
  "theme": "default",
  "summarize_turns": false,
  "web_search_provider": "duckduckgo",
  "mcp_sampling_enabled": false,
  "thinking_level": "medium",
  "command_policy": "standard"
}

Key Configuration Options

KeyDefaultDescription
summarize_turnsfalsePer-turn summary generation (opt-in, uses tokens)
web_search_providerduckduckgoSearch: duckduckgo, searxng, brave, bing
mcp_sampling_enabledfalseAllow MCP servers to request LLM sampling
thinking_levelmediumminimal, low, medium, high, xhigh
command_policystandardstrict, standard, permissive
sandbox_enabledfalseBubblewrap sandbox for tool execution
session_budget_usdMaximum session cost in USD

Keymaps

Customize TUI bindings in ~/.luna/keymaps.json. Modes: normal, input, search, menu. View all with /keymaps.

TUI Commands

CommandDescription
/compactCompact entire session
/compact --from <id>Compact messages before entry
/compact --up-to <id>Compact messages up to entry
/keymapsDisplay all key bindings

Memory Taxonomy

4 types: fact, preference, procedure, relationship. Deduplication within each category.

Analytics

Client-side usage analytics in ~/.luna/analytics.db (SQLite). 6 tables, 90-day auto-cleanup. Opt-in.

Released under the MIT License.