Skip to main content

Environment Variables

Arkenos manages most API keys through the API Keys dashboard page (encrypted in the database). Only a few infrastructure variables need .env files.

Root .env (Docker Compose)

When using Docker Compose, the root .env only needs one variable:
VariableRequiredDescription
POSTGRES_PASSWORDYesPostgreSQL password
BETTER_AUTH_SECRETNoSession encryption secret (has a default, override for production)

Backend (backend/.env)

For local development (without Docker), configure the backend directly:
VariableRequiredDescription
POSTGRES_PASSWORDYesPostgreSQL password (used to build DATABASE_URL)
DATABASE_URLNoFull PostgreSQL connection string (overrides auto-built URL if set)
DB_HOSTNoDatabase host (default: localhost, set to postgres in Docker)
All provider API keys (LiveKit, Google, Resemble, Twilio, Deepgram, AssemblyAI, ElevenLabs) are configured via the dashboard and stored encrypted in the database. You can still set them in .env as a fallback — the dashboard takes priority.
POSTGRES_PASSWORD is the only truly required environment variable for the backend. Everything else is managed through the dashboard or has sensible defaults.

Frontend (frontend/.env.local)

VariableRequiredDescription
NEXT_PUBLIC_API_URLYesBackend API URL (e.g., http://localhost:4201/api)
BETTER_AUTH_SECRETYes (Docker)Better Auth secret (set via docker-compose, or manually for local dev)
BETTER_AUTH_URLYes (Docker)Better Auth URL (set via docker-compose)
DATABASE_URLYes (Docker)Database connection for Better Auth (set via docker-compose)
LiveKit, Google, Resemble, and Deepgram keys are no longer needed in the frontend .env. The frontend fetches provider data through the backend API, which resolves keys from the dashboard.

Agent

The agent requires no .env file. On startup, it calls the backend’s /api/settings/keys/agent endpoint and injects all keys (including LiveKit) into the process environment before connecting.
VariableRequiredDescription
BACKEND_API_URLNoDefaults to http://localhost:8000/api. Only set this if the backend runs on a different host/port.
All provider keys — LiveKit, Google, Resemble, STT providers — are fetched from the backend dashboard automatically. No .env file needed.

Dashboard-Managed Keys

These keys are configured at API Keys in the dashboard. They are encrypted with AES-256-GCM and stored in the database.
ProviderKeysPurpose
LiveKitAPI Key, API Secret, Server URLReal-time voice infrastructure
GoogleAPI KeyGemini LLM for conversational intelligence
Resemble AIAPI KeyText-to-speech voice synthesis
TwilioAccount SID, Auth TokenPhone number management and SIP telephony
AssemblyAIAPI KeySpeech-to-text (STT option)
DeepgramAPI KeySpeech-to-text (STT option)
ElevenLabsAPI KeySpeech-to-text (STT option)

Auto-Provisioned (No Config Needed)

These were previously environment variables but are now fully automated:
Old VariableWhat Happens Now
TWILIO_SIP_DOMAINAuto-derived from LIVEKIT_URL
LIVEKIT_SIP_TRUNK_IDAuto-provisioned on first outbound call
ENCRYPTION_KEYAuto-generated and stored in database on first boot
FRONTEND_URLDefaults to http://localhost:3000
PORTDefaults to 8000
DEBUGDefaults to true

Custom Agent Infrastructure

These variables are only needed if you use custom Python agents:
VariableDefaultDescription
MINIO_ENDPOINTlocalhost:9000MinIO server address
MINIO_ACCESS_KEYminioadminMinIO access key
MINIO_SECRET_KEYminioadminMinIO secret key
MINIO_BUCKETarkenosMinIO bucket name
DOCKER_SOCKETunix:///var/run/docker.sockDocker socket path
BASE_AGENT_IMAGEarkenos-agent-base:latestBase Docker image for custom agents
CONTAINER_NETWORKarkenos_defaultDocker network for agent containers
CONTAINER_TIMEOUT_SECONDS3600Timeout for custom agent containers
CODING_AGENT_PROVIDERgeminiAI provider for the coding assistant

Telemetry

VariableDefaultDescription
NEXT_PUBLIC_TELEMETRYtrueSet to false to disable anonymous product telemetry (PostHog)
Arkenos collects anonymous usage telemetry (page views, feature usage) via PostHog to help improve the product. No personal data or conversation content is collected. Set NEXT_PUBLIC_TELEMETRY=false to opt out.