Skip to content

Configuration

All configuration is managed through environment variables in compose.prod.yml. The recommended approach is to use the production Compose file from the GitHub repository and set your secrets via shell environment or a Docker secrets workflow.

Compose File

The compose.prod.yml file defines all services and their environment variables. Variables use the ${VAR:-default} syntax — values without defaults are required.

Grab the latest version from GitHub:

bash
curl -O https://raw.githubusercontent.com/kumbukum/kumbukum/main/compose.prod.yml

Then start the stack:

bash
APP_URL=https://your-instance.com \
SESSION_SECRET=your-session-secret \
JWT_SECRET=your-jwt-secret \
TYPESENSE_API_KEY=your-typesense-key \
SMTP_HOST=smtp.example.com \
SMTP_USER=you@example.com \
SMTP_PASS=your-smtp-password \
SMTP_FROM=noreply@example.com \
GOOGLE_API_KEY=your-google-api-key \
docker compose -f compose.prod.yml up -d

Environment Variables

Application

VariableDescriptionRequiredDefault
APP_URLPublic URL of the applicationYes
WS_URLPublic WebSocket URL. Set this when the WebSocket server runs on a different host or port than the appNoSame as APP_URL
PORTApplication portNo3000
SESSION_SECRETExpress session secretYes
JWT_SECRETJWT signing secretYes
NODE_ENVEnvironment modeNoproduction
SERVER_MODERun mode: omit for full app, ws for WebSocket-only, scheduler for background jobsNo
SOCKET_REDISSeparate Redis URL for Socket.IO adapter (if different from REDIS_URL)NoUses REDIS_URL

Database

VariableDescriptionRequiredDefault
MONGO_URIMongoDB connection stringNomongodb://mongo:27017/kumbukum
REDIS_URLRedis connection stringNoredis://redis:6379
REDIS_SENTINELRedis Sentinel config as JSON. Example: [{"host":"sentinel1","port":26379}]No

When REDIS_SENTINEL is set, the app connects via Sentinel for automatic failover. The JSON array should contain objects with host and port for each Sentinel node.

Search (Typesense)

VariableDescriptionRequiredDefault
TYPESENSE_HOSTTypesense server hostNotypesense
TYPESENSE_PORTTypesense server portNo8108
TYPESENSE_PROTOCOLProtocol (http or https)Nohttp
TYPESENSE_API_KEYTypesense API keyYes
TYPESENSE_NODESMulti-node cluster config as JSON. Example: [{"host":"ts1","port":8108,"protocol":"http"},{"host":"ts2","port":8108,"protocol":"http"}]No

When TYPESENSE_NODES is set, the individual host/port/protocol variables are ignored and the cluster config is used instead.

AI / LLM

Kumbukum uses three separate model tiers for different tasks:

VariableDescriptionRequiredDefault
CHAT_AI_MODELModel for analysis, stats, and general chat responsesNogemini-2.0-flash
CHAT_AI_MODEL_PROVIDERProvider: google or openaiNogoogle
NL_SEARCH_MODELLightweight model for intent classificationNogemini-2.0-flash-lite
NL_SEARCH_MODEL_PROVIDERProvider for intent classification modelNogoogle
TS_CONVERSATION_MODELModel for Typesense conversation searchNogemini-2.0-flash-lite
TS_CONVERSATION_MODEL_PROVIDERProvider for conversation modelNogoogle
GOOGLE_API_KEYGoogle AI API key (required when using Google models)Conditional
OPENAI_API_KEYOpenAI API key (required when using OpenAI models)Conditional

At least one API key is required for AI chat to function.

Email (SMTP)

VariableDescriptionRequiredDefault
SMTP_HOSTSMTP server hostYes
SMTP_PORTSMTP server portNo587
SMTP_USERSMTP usernameYes
SMTP_PASSSMTP passwordYes
SMTP_FROMSender email addressYes

Admin

VariableDescriptionRequiredDefault
SYSADMIN_EMAILSystem admin email. If set, a sysadmin account is provisioned on startupNo
SYSADMIN_PASSWORDSystem admin passwordNo

Billing (Stripe)

These are only needed if you enable subscription billing (Cloud deployments).

VariableDescriptionRequiredDefault
STRIPE_SECRET_KEYStripe secret keyNo
STRIPE_WEBHOOK_SECRETStripe webhook signing secretNo
STRIPE_PRICE_IDStripe price ID for the subscription planNo
STRIPE_PORTAL_CONFIG_IDStripe customer portal configuration IDNo
STRIPE_TRIAL_DAYSFree trial period in daysNo7

Analytics (OpenPanel)

VariableDescriptionRequiredDefault
ENABLE_OPENPANELEnable OpenPanel analyticsNofalse
OPENPANEL_CLIENT_IDOpenPanel client IDNo
OPENPANEL_CLIENT_SECRETOpenPanel client secretNo
OPENPANEL_API_URLOpenPanel API URLNo

Observability (OpenTelemetry)

VariableDescriptionRequiredDefault
ENABLE_OTELEnable OpenTelemetry tracingNofalse
OTEL_SERVICE_NAMEService name for tracesNokumbukum
OTEL_EXPORTER_OTLP_ENDPOINTOTLP exporter endpointNo
OTEL_EXPORTER_OTLP_HEADERSOTLP exporter headers (e.g., auth tokens)No

Reverse Proxy

When running behind a reverse proxy (nginx, Caddy, etc.):

  1. Set APP_URL to your public domain
  2. Proxy WebSocket connections to port 3001
  3. Proxy MCP connections to port 3002
  4. Set X-Forwarded-For and X-Forwarded-Proto headers

Example nginx configuration:

nginx
server {
    listen 443 ssl;
    server_name your-instance.com;

    location / {
        proxy_pass http://localhost:3000;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

    location /ws {
        proxy_pass http://localhost:3001;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }

    location /mcp {
        proxy_pass http://localhost:3002;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
    }
}