Skip to main content

Configuration

The host is configured via a YAML file passed with the -config flag. Environment variables and .env files are supported for secrets and environment-specific values.

Environment variable substitution

The config file supports environment variable expansion before YAML parsing:

SyntaxBehavior
${VAR}Replaced with the value of VAR. Empty string if unset.
${VAR:-default}Uses default if VAR is unset or empty.
${VAR-default}Uses default only if VAR is unset (empty string is kept).
${VAR:?error message}Fails with the error message if VAR is unset or empty.
${VAR?error message}Fails with the error message if VAR is unset.

Example:

http:
addr: "${HTTP_ADDR:-:8080}"
auth:
tokens:
- "${AUTH_TOKEN:?AUTH_TOKEN must be set}"

.env file loading

The host automatically loads environment variables from .env files located in the same directory as the config file:

  1. .env — base environment
  2. .env.local — local overrides (typically gitignored)

Later files override earlier ones.

Minimal configuration

http:
addr: ":8080"

skills:
- skills/echo.yaml

This starts the MCP server on port 8080 with a single skill. All other settings use defaults.

Complete example

# ── HTTP server ────────────────────────────────────────
http:
addr: "${HTTP_ADDR:-:8080}"
server_url: "https://your-domain.com"
auth:
tokens:
- "${AUTH_TOKEN}"

# ── Runtime ────────────────────────────────────────────
runtime:
cache_dir: "/var/luminarys/cache"
memory_limit_mb: 64

# ── Database ───────────────────────────────────────────
db:
path: "/var/luminarys/data/state.db"

# ── Logging ────────────────────────────────────────────
log:
level: "info"
stderr: true
skill_log: false
file:
enabled: true
path: "/var/log/luminarys/host.log"
max_size_mb: 100
max_backups: 3

# ── Tracing ────────────────────────────────────────────
tracing:
enabled: true

# ── Skills ─────────────────────────────────────────────
skills:
- config/skills/echo.yaml
- config/skills/fs.yaml
- config/skills/web.yaml

# ── Cluster (optional) ────────────────────────────────
cluster:
enabled: true
cluster_id: "my-cluster"
node_id: "master"
role: "master"
nats_url: "nats://nats:4222"
relay_port: 4223
file_transfer:
allowed_nodes: ["*"]
local_dirs: ["/data:rw"]
auth:
token: "${NATS_TOKEN}"

Config reference

http

Controls the HTTP server for MCP and REST endpoints.

FieldTypeDefaultDescription
addrstring:8080Listen address (e.g., :8080, 0.0.0.0:9090)
server_urlstringPublic URL for MCP endpoint discovery. Set when behind a reverse proxy.
auth.tokenslist[]Bearer tokens for authentication. Empty = no auth required.

When auth.tokens is configured, all MCP and REST endpoints require an Authorization: Bearer <token> header.

runtime

Controls the skill execution engine.

FieldTypeDefaultDescription
cache_dirstring~/.luminarys/cacheDirectory for compiled module cache. Speeds up subsequent starts.
memory_limit_mbint0 (unlimited)Max linear memory per skill in MB. Recommended: 64 for production.

db

Embedded database for skill state persistence.

FieldTypeDefaultDescription
pathstring~/.luminarys/data/state.dbPath to the database file

log

FieldTypeDefaultDescription
levelstringinfoLog level: debug, info, warn, error
stderrbooltrueWrite logs to stderr
skill_logboolfalseForward skill log_write calls to host log
file.enabledboolfalseEnable file logging
file.pathstring~/.luminarys/logs/host.logLog file path
file.max_size_mbint100Rotate log file at this size (MB)
file.max_backupsint3Number of rotated files to keep

tracing

FieldTypeDefaultDescription
enabledboolfalseEnable request tracing (toggle at runtime via POST /admin/trace)

skills

A list of paths to skill manifest files. Paths are relative to the config file's directory.

skills:
- config/skills/echo.yaml
- config/skills/fs.yaml
- /opt/luminarys/skills/custom.yaml

Each manifest defines the skill's identity, binary path, permissions, and MCP mapping. See the Manifest reference for details.

cluster

Enables multi-node clustering via NATS.

FieldTypeDefaultDescription
enabledboolfalseEnable clustering
cluster_idstringCluster identifier (must match across all nodes)
node_idstringrandomStable node identifier (used in file transfer paths)
rolestringmaster or slave
nats_urlstringNATS server URL
relay_portint4223File transfer relay port on the NATS server host
remote_invoke_timeoutduration30sTimeout for cross-node skill calls
heartbeat_intervalduration5sHow often nodes send heartbeats
node_ttlduration15sRemove node from registry after this silence
connect_timeoutduration10sHow long slave waits for master on connect
file_transfer.allowed_nodeslist[]Nodes allowed for file transfers (["*"] = all)
file_transfer.local_dirslist[]Local directories accessible for transfers (e.g., ["/data:rw"])
auth.tokenstringNATS authentication token
tls.enabledboolfalseEnable TLS for NATS connection
tls.ca_filestringCA certificate for server verification
tls.cert_filestringClient certificate (mTLS)
tls.key_filestringClient key (mTLS)
tls.insecureboolfalseSkip server certificate verification (dev only)

See Clustering for architecture details and deployment examples.

Validate configuration

Run the validator before deploying:

luminarys -validate -config config/host.yaml

Checks: config syntax, manifest validity, skill binary paths, duplicate IDs, cluster consistency.

Default paths

When fields are omitted, the host uses paths under ~/.luminarys/:

PurposeDefault path
Database~/.luminarys/data/state.db
Module cache~/.luminarys/cache/
Log file~/.luminarys/logs/host.log