Skip to content

Configuration ​

Configuration uses environment variables. Copy .env.example to .env; the values below are the development defaults from that file.

Application and Data ​

VariableDefaultDescription
APP_PORT9090Gateway HTTP port
DB_HOST, DB_PORTlocalhost, 5432PostgreSQL connection
DB_USER, DB_PASSWORD, DB_NAMEomnidev, omnidev, omnidevPostgreSQL credentials and database
DB_SSLMODEdisablePostgreSQL SSL mode
REDIS_HOST, REDIS_PORTlocalhost, 6379Redis connection
REDIS_PASSWORD, REDIS_DBempty, 0Redis authentication and database
JWT_SECRETdevelopment valueJWT signing secret; replace it outside local development
MINIO_ENDPOINTlocalhost:9000Attachment storage endpoint; omit MinIO settings to disable uploads
MINIO_ACCESS_KEY, MINIO_SECRET_KEYminioadminMinIO credentials
MINIO_USE_SSLfalseUse TLS for MinIO
TIKA_ENDPOINThttp://localhost:9998Tika parser for attachments and knowledge documents
TIKA_TIMEOUT30Parser timeout in seconds

OAuth is optional and uses the GITHUB_* and GOOGLE_* variables in .env.example.

AI Providers ​

VariableDescription
OPENAI_API_KEY, OPENAI_BASE_URL, OPENAI_MODELSOpenAI or OpenAI-compatible provider settings
DEEPSEEK_API_KEY, DEEPSEEK_MODELSDeepSeek settings
QWEN_API_KEYQwen provider key
ANTHROPIC_API_KEYAnthropic provider key
AI_DEFAULT_MODELDefault chat model (deepseek-chat in the example)
ENCRYPTION_KEYEncrypts per-user BYOK provider keys when set

Only providers with keys are registered. Users can also manage their own provider configurations through the web UI and /user/ai-configs API.

Knowledge and RAG ​

VariableDefaultDescription
RAG_EMBEDDING_PROVIDERopenaiopenai, gemini, or ollama
RAG_EMBEDDING_MODELtext-embedding-3-smallEmbedding model
RAG_EMBEDDING_API_KEYemptyEmbedding provider key
RAG_EMBEDDING_BASE_URLemptyCustom embedding endpoint
KNOWLEDGE_STORAGE_TYPElocallocal or minio
KNOWLEDGE_LOCAL_PATH./data/knowledgeLocal document directory
KNOWLEDGE_BUCKETknowledgeMinIO bucket
KNOWLEDGE_PARSER_TYPEtikaDocument parser
KNOWLEDGE_CACHE_TTL10mSearch cache TTL
KNOWLEDGE_EMBEDDING_DIMENSIONS00 infers dimensions from the model response

Dimensions are tracked per knowledge base. PostgreSQL must provide the vector extension.

External MCP Tools ​

bash
MCP_ENABLED=true
MCP_SERVERS='[{"name":"knowledge","url":"http://localhost:9100/mcp","api_key":"","timeout_seconds":15,"headers":{}}]'

MCP_SERVERS is a JSON array whose entries support name, url, api_key, timeout_seconds, and headers. The gateway uses streamable HTTP JSON-RPC 2.0. A server that cannot initialize is logged and skipped.

Chat runs at most five tool rounds and truncates each tool output to 8000 runes. Used tool names appear in message metadata as tools_used. MCP function calling currently applies to OpenAI, DeepSeek, and Qwen; it is not yet available for Anthropic models.

Background Agent Sandbox ​

VariableDefaultDescription
SANDBOX_ENABLEDtrueRegister agent routes when Docker is available
SANDBOX_WORKSPACE_ROOT./data/agent-workspacesGateway-side workspace root
SANDBOX_HOST_WORKSPACE_ROOTemptyHost path of that same directory when the gateway runs in Docker
SANDBOX_NETWORKnoneSandbox container network
SANDBOX_CPU_LIMIT1CPU limit
SANDBOX_MEMORY_LIMIT512mMemory limit
SANDBOX_TIMEOUT120sCode execution timeout
SANDBOX_PYTHON_IMAGEpython:3.12-alpinePython runtime
SANDBOX_NODE_IMAGEnode:22-alpineJavaScript/Node.js runtime
SANDBOX_GO_IMAGEgolang:1.22-alpineGo runtime
SANDBOX_SHELL_IMAGEalpine:3.19Shell runtime
AGENT_MODELgpt-4o-miniPlanner model
AGENT_BASE_URL, AGENT_API_KEYemptyPlanner endpoint and key; fall back to OPENAI_*

Run make sandbox-images to pre-pull the runtime images. When the gateway is containerized, /var/run/docker.sock must be mounted and SANDBOX_HOST_WORKSPACE_ROOT must be a host path, not a path inside the gateway container.

Released under the MIT License.