The stack will not start
SECRET_KEY must be set to a strong secret
Compose refuses to start api, arq-worker, or campaign-orchestrator without it — the variable is declared ${SECRET_KEY:?...}, which fails the whole command rather than starting a broken stack.
make application-up (which wraps ./scripts/start-application-services.sh) generates SECRET_KEY, INTERNAL_API_KEY, and PROVIDER_AUTH_ENCRYPTION_KEY into the root .env if they are missing. Starting with a bare docker compose up on a fresh checkout is what produces this error.
To generate one by hand:
docker-compose.yaml not found at repo root
make application-up (and the start-application-services.sh script it wraps) must run from the repository root:
A port is already in use
Every published port is overridable in.env:
Find the offender:
Database connection failures
The API logs a connection error on first boot
Expected on a cold start, and self-correcting. Onlyredis and minio gate on healthchecks — api waits for ferretdb merely to start, so it can attempt a query before FerretDB is serving. restart: unless-stopped recovers it within a few seconds.
If it does not settle:
Authentication failed against FerretDB
Almost always MONGODB_AUTH_SOURCE. It must be empty for FerretDB:
admin — correct for real MongoDB, and what the old mono repo used — appends ?authSource=admin and authentication fails. See Data store.
Connection refused on port 27017
You are using the container port from outside Docker. From your host the port is 27018;27017 only works inside the Compose network:
Configuration is ignored
An .env change had no effect
Two causes.
Compose overrides some variables deliberately. Values under a service’s environment: beat env_file, so MONGODB_HOST, API_BASE_URL, and MINIO_ENDPOINT are pinned to in-network addresses regardless of .env. That is intended — see Environment variables.
Containers read .env at start. Restart after editing:
Tokens stop working after a restart
SECRET_KEY is unset. apps/api/app/auth.py logs a warning and generates a temporary key at import, so every restart invalidates every outstanding token — and separate replicas reject each other’s.
Authentication and permissions
Provider and agent errors
Provider dropdowns or catalogs come back empty
Catalogs are filtered by what you have configured. Store credentials first:Creating a telephony agent fails
VOICE_SERVER_BASE_URL must be set before creating telephony agents — the API bakes the answer URL into the provider application at create time. You also need credentials stored for that telephony provider. See Public voice URLs.
422 Unprocessable Entity on agent create
The config blob failed validation. The response body names the offending field path. Common causes: an unregistered provider, or API keys placed in config.models — those belong in ProviderAuth, and only non-secret settings go on the agent. See Agent configuration.
Import errors when running from source
apps/runtime imports apps.providers and apps.telephony, so the repository root must be on PYTHONPATH:
pip install -e . — pyproject.toml is an empty placeholder. Install per app with pip install -r apps/<app>/requirements.txt. See Local setup.