Skip to main content

Environment Variables

Nenyax is envless by default — no .env files are needed for local development. All infrastructure defaults are hardcoded in the code to match the docker-compose port mappings. Provider API keys (LiveKit, Google, Resemble, Twilio, STT) are managed through the API Keys dashboard page, encrypted in the database.

When are .env files needed?

Mode.env files needed?
Local dev (DB + MinIO in Docker, services local)No — code defaults work
Docker dev (docker compose up)Root .env optional — compose has defaults
Production (docker-compose.prod.yml)Root .env auto-generated by install script
Only create a .env file if you need to override a default.

Local Dev Defaults

These are hardcoded in config.py, auth.ts, and api.ts:
SettingDefaultNotes
POSTGRES_PASSWORDnenyaxMatches docker-compose default
DB_HOSTlocalhost
DB_PORT5434docker-compose maps 5434→5432
MINIO_ENDPOINTlocalhost:9002docker-compose maps 9002→9000
MINIO_ACCESS_KEYminioadmin
MINIO_SECRET_KEYminioadmin
MINIO_BUCKETnenyax
FRONTEND_URLhttp://localhost:3000CORS origin
NEXT_PUBLIC_API_URLhttp://localhost:8000/api
BETTER_AUTH_SECRETauthsecret123Override in production
DATABASE_URL (frontend)postgresql://postgres:nenyax@localhost:5434/nenyax

Root .env (Docker Compose)

Only used when running via docker compose up. The compose files have defaults, so this is optional for dev:
VariableDefaultDescription
POSTGRES_PASSWORDnenyaxPostgreSQL password
BETTER_AUTH_SECRETauthsecret123Session encryption secret (override for production)
MINIO_ROOT_USERminioadminMinIO access key
MINIO_ROOT_PASSWORDminioadminMinIO secret key

Backend (backend/.env)

Not needed for local dev. All defaults are in config.py. Only create to override:
VariableDefaultDescription
POSTGRES_PASSWORDnenyaxPostgreSQL password
DATABASE_URLAuto-builtFull connection string (overrides auto-built URL)
DB_HOSTlocalhostSet to postgres in Docker
DB_PORT5434Set to 5432 in Docker
Provider keys set in .env are used as fallback — the dashboard takes priority.

Frontend (frontend/.env)

Not needed for local dev. All defaults are in auth.ts and api.ts. Only create to override:
VariableDefaultDescription
NEXT_PUBLIC_API_URLhttp://localhost:8000/apiBackend API URL
DATABASE_URLpostgresql://postgres:nenyax@localhost:5434/nenyaxBetter Auth database
BETTER_AUTH_SECRETauthsecret123Session encryption
BETTER_AUTH_URLhttp://localhost:3000Auth callback URL

Agent

No .env file needed. On startup, it calls the backend’s /api/settings/keys/agent endpoint and injects all keys into the process environment.
VariableDefaultDescription
BACKEND_API_URLhttp://localhost:8000/apiOnly set if backend runs elsewhere

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 override the defaults for custom Python agents:
VariableDefaultDescription
MINIO_ENDPOINTlocalhost:9002MinIO server address
MINIO_ACCESS_KEYminioadminMinIO access key
MINIO_SECRET_KEYminioadminMinIO secret key
MINIO_BUCKETnenyaxMinIO bucket name
DOCKER_SOCKETunix:///var/run/docker.sockDocker socket path
BASE_AGENT_IMAGEnenyax-agent-base:latestBase Docker image for custom agents
CONTAINER_NETWORKnenyax_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)
Nenyax 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.