Guides
Configuration
All configuration is via environment variables, loaded from .env at startup.
Core variables
| Variable | Default | Description |
|---|---|---|
DATABASE_URL | postgresql://…/dokkai | Postgres connection for conversation and job history. Boot-time migrations run automatically. |
WEAVIATE_HOST | localhost | Weaviate host (client side). Ports: 8080 HTTP, 50051 gRPC. |
COLLECTION_NAME | CodeEntity | Weaviate collection name. |
VECTORIZER_PROVIDER | ollama | ollama | openai | cohere | local. |
EMBED_MODEL | nomic-embed-text | Ollama embedding model. |
The two Ollama endpoints
Two Ollama endpoints, on purpose.
OLLAMA_EMBED_ENDPOINT is called by the Weaviate container (so it needs host.docker.internal), while OLLAMA_BASE_URL is called by the API process on the host (so it's localhost).| Variable | Default | Description |
|---|---|---|
OLLAMA_EMBED_ENDPOINT | http://host.docker.internal:11434 | Ollama URL as seen by the Weaviate server (Docker → host). |
OLLAMA_BASE_URL | http://localhost:11434 | Ollama URL as seen by the API process (chat). |
OLLAMA_CHAT_MODEL | (unset) | If set: auto-configure and warm this chat model on boot. |
OLLAMA_NUM_CTX | 8192 | Context window for generation. |
OLLAMA_KEEP_ALIVE | -1 | Keep model resident: -1 = forever, or a duration like 30m. |
Descriptions
| Variable | Default | Description |
|---|---|---|
DESC_PROVIDER | ollama | ollama | openai | anthropic for per-entity descriptions. |
DESC_MODEL | (unset) | Model for descriptions (e.g. qwen2.5-coder:3b). If unset, ingestion 400s before creating a job. |
DESC_CONCURRENCY | 4 | Max concurrent description requests. |
LLM config persistence.
POST /config/llm write-through persists the active provider/model to Postgres, reloaded on every boot — taking precedence over OLLAMA_CHAT_MODEL. The env var is only a one-time seed for a fresh install.Auth & CORS
| Variable | Default | Description |
|---|---|---|
DOKKAI_ROOT_USER | (unset — admin) | Override the admin username, applied on boot. |
DOKKAI_ROOT_PASSWORD | (unset — admin) | Override the admin password; changing it invalidates that user's sessions. |
DOKKAI_CORS_ORIGINS | localhost:3000, 127.0.0.1:3000 | Comma-separated origins allowed to call the API from a browser. |