Environment Variables
The settings a self-hosted answerLoops needs to start, and where to find every other variable.
A self-hosted answerLoops is configured through a .env file. Copy .env.example to .env, fill in the settings below, and restart. Docker Compose reads .env and passes it to the containers. When you are done, the app starts and you can sign in.
Minimum to boot
This is the shortest working configuration. Everything else is optional and can be added later.
| Variable | Why you need it |
|---|---|
DATABASE_URL | Where your data lives |
AUTH_URL | The public address of your instance |
AUTH_SECRET | Random secret for sign-in sessions |
ENCRYPTION_KEY | Random secret that protects saved API keys and tokens (required in production) |
AUTH_GOOGLE_ID and AUTH_GOOGLE_SECRET | Google sign-in, the only way to sign in |
OPENAI_API_KEY | Answers and knowledge-base search, unless each workspace saves its own key in Settings |
BOT_SECRET | Lets the bot service run background jobs such as knowledge-base syncs and, on the hosted service, trial-ending reminder emails |
Generate each secret with openssl rand -hex 32.
answerLoops uses Auth.js v5, so the names are AUTH_URL and AUTH_SECRET, not the older NEXTAUTH_ names from v4 guides.
Leave DEPLOYMENT_MODE unset. It is only for answerLoops' own managed service.
Find any other variable
The environment variables reference is the single complete list. It groups every variable by what it does and marks each one required, optional or managed-service-only, including the settings for each channel, email, billing and the bot service.