Skip to content

Configuration ​

Copy .env.example to .env.local (from source) or .env (Docker). The file documents every variable.

Required ​

VariableDescription
AUTH_SECRETSession encryption secret. Generate with openssl rand -base64 32.
POSTGRES_URL (source) or POSTGRES_PASSWORD (Docker)Database connection. Docker builds the URL from POSTGRES_USER, POSTGRES_PASSWORD and POSTGRES_DB.
An AI provider keyOPENROUTER_API_KEY or AI_GATEWAY_API_KEY. Direct OPENAI_API_KEY, ANTHROPIC_API_KEY and GOOGLE_GENERATIVE_AI_API_KEY are also supported.

Optional ​

VariableDescription
ENCRYPTION_KEYRequired in production (min 32 characters; placeholders are rejected). Encrypts service credentials stored in the database. Changing it makes existing encrypted service configs unreadable.
ALLOW_PRIVATE_SERVICE_URLSSet true to let users point services and MCP servers at private addresses (localhost, LAN, container names). Required for most self-hosting; the Docker compose file defaults it to true. Link-local/cloud-metadata addresses are always blocked. Leave false on shared or public deployments.
REDIS_URLEnables resumable AI streams.
NEXTAUTH_URLPublic URL, if not http://localhost:3000.
ASSISTARR_PORTHost port in Docker (default 3000).
TRAEFIK_ENABLED, ASSISTARR_DOMAINTraefik labels.

AI provider selection ​

Assistarr defaults to OpenRouter when OPENROUTER_API_KEY is set and falls back to the Vercel AI Gateway otherwise. Direct OpenAI, Anthropic and Google providers are available as well.