Environment Variables
KaaS supports environment variables to override configuration values. This is useful for containerized deployments where you want to keep secrets out of config files.
Variable Reference
| Environment Variable | Overrides | Default | Description |
|---|---|---|---|
LLM_API_KEY | [llm] api_key | (empty) | OpenAI-compatible API key |
LLM_BASE_URL | [llm] base_url | https://api.openai.com/v1 | API endpoint URL |
LLM_MODEL | [llm] model | gpt-4o-mini | Model name |
LLM_SUMMARIZE_MODEL | [llm] summarize_model | (same as model) | Summarization model |
KAAS_MCP_ENABLED | [ai.mcp] enabled | false | Enable MCP endpoint |
KAAS_MCP_TOKEN | [ai.mcp] token | (empty) | MCP bearer token |
KAAS_WEB_DIR | [server] web_dir | /app/web/dist | Static web assets path |
KAAS_AI_MCP_URL | [ai] mcp_url | (empty) | Deprecated — use KAAS_MCP_ENABLED |
KAAS_KB_DIR | — | ./data | Knowledge base directory (for kb-ai CLI) |
KAAS_DAEMON_MAX_WORKERS | — | 8 | Daemon thread pool size |
Priority
Environment variables take precedence over values in kaas.toml. The resolution order is:
- Environment variable (highest priority)
- Config file (
kaas.toml) - Built-in default