Configuration
Environment variables for core and ui. Copy .env.example as a starting point.
Database
| Variable | Used by | Purpose |
|---|---|---|
DATABASE_URL | core, ui | PostgreSQL connection string |
Webhooks
| Variable | Used by | Purpose |
|---|---|---|
PUBLIC_WEBHOOK_URL | core, ui | Public HTTPS base (no trailing slash). Platforms use {PUBLIC_WEBHOOK_URL}/webhooks/{organization_id}/{platform}/{channel_id} |
WEBHOOK_SECRET | core | Platform webhook verification secret |
DEFAULT_PROMPT_CHANNEL_ID | core | Optional default when prompts omit channel_id |
Security and API key
| Variable | Used by | Default / notes |
|---|---|---|
CALLBACK_SIGNING_SECRET | core | HMAC secret for prompt answer callbacks |
USE_AUTH | core | Set true to require X-API-Key |
GREENLIGHT_API_KEY | core, ui | Seeds first admin key when api_keys is empty; UI sends it as X-API-Key |
Admin UI
| Variable | Purpose |
|---|---|
GREENLIGHT_API_URL | Core base URL (default http://localhost:8100) |
AUTH_SECRET | NextAuth session secret |
DATABASE_URL | Same Postgres as core (admin users table) |
PUBLIC_WEBHOOK_URL | Shown on channel detail pages |
Hybrid npm run dev: set GREENLIGHT_API_KEY in the root .env (see .env.example). After creating a new key in Settings, update GREENLIGHT_API_KEY and restart the UI.
Docker / self-host Compose: pass the same GREENLIGHT_API_KEY to core and ui services.
Media
| Variable | Used by | Purpose |
|---|---|---|
MEDIA_ALLOWED_DIR | core | Allowed directory for media_path local files |
MAX_MEDIA_SIZE_MB | core | Max upload / local media size (default 2) |
Channel callbacks
| Variable | Used by | Default |
|---|---|---|
CHANNEL_CALLBACK_MAX_RETRIES | core | 3 |
CHANNEL_CALLBACK_RETRY_DELAY | core | 5 (seconds) |
CHANNEL_OFFLINE_NOTIFICATION | core | Message posted when channel callbacks fail |
Server / boot
| Variable | Used by | Purpose |
|---|---|---|
PORT | core | HTTP port (default 8100) |
HOST | core | Bind address (default 0.0.0.0) |
HOSTNAME | ui | Bind address for Next standalone (use 0.0.0.0 in Docker) |
CLEAN_ON_BOOT | core | Clean stale prompt state on startup |
ENABLE_DOCS | core | Serve GET /openapi.json when true |
Compose Postgres
| Variable | Purpose |
|---|---|
POSTGRES_USER / POSTGRES_PASSWORD / POSTGRES_DB | Bundled Postgres credentials (Compose) |
Replace all default secrets before production. Prefer a secrets manager or
Dokploy / Coolify environment UI over committing .env.