Skip to main content

Configuration Reference

All configuration is via environment variables.

Required

VariableDescription
DATABASE_URLPostgreSQL connection string. Format: postgres://user:pass@host:port/db?sslmode=disable
JWT_SECRETSecret for signing JWT tokens. Generate with openssl rand -hex 32
MASTER_KEYEncryption key for stored secrets (OAuth tokens, API keys). Generate with openssl rand -hex 32

Server

VariableDefaultDescription
PORT8080HTTP server port
RUN_MODEallall (combined), api (API only), or worker (worker only)
UI_BASE_URLhttp://localhost:3000Admin UI URL (used for OAuth redirects)
CORS_ALLOWED_ORIGINShttp://localhost:3000Comma-separated allowed origins

Search backends

VariableDefaultDescription
OPENSEARCH_URL--OpenSearch URL for BM25 search. Example: http://opensearch:9200
PGVECTOR_URL--PostgreSQL URL for vector search. Can be the same as DATABASE_URL
PGVECTOR_DIMENSIONS1536Vector dimensions. Must match your embedding model

AI providers (optional)

VariableDescription
OPENAI_API_KEYOpenAI API key for embeddings and LLM
OPENAI_BASE_URLCustom OpenAI-compatible endpoint

These can also be configured at runtime via the AI Settings API.

OAuth providers (optional)

Set these to enable OAuth connectors. See Connectors for per-provider setup guides.

VariableDescription
GITHUB_CLIENT_IDGitHub OAuth App client ID
GITHUB_CLIENT_SECRETGitHub OAuth App client secret

These can also be configured at runtime via the Provider Config API.

Worker

VariableDefaultDescription
WORKER_CONCURRENCY2Number of concurrent task processors
WORKER_DEQUEUE_TIMEOUT5Seconds to wait when queue is empty
SCHEDULER_ENABLEDtrueEnable the task scheduler
SCHEDULER_LOCK_REQUIREDtrueRequire distributed lock (for multi-worker deployments)

Database tuning

VariableDefaultDescription
DB_MAX_OPEN_CONNS25Maximum open connections
DB_MAX_IDLE_CONNS5Maximum idle connections
DB_CONN_MAX_LIFETIME_SEC300Connection max lifetime in seconds
DB_CONN_MAX_IDLE_SEC60Connection max idle time in seconds

Redis (optional)

VariableDescription
REDIS_URLRedis connection string. Format: redis://host:port or redis://:password@host:port

When set, Redis is used for session storage, task queue, and distributed locks instead of PostgreSQL.

Local filesystem connector

VariableDescription
LOCALFS_ALLOWED_ROOTSComma-separated paths the localfs connector can access. Example: /data