Configuration¶
Environment Variables¶
RetrievAI is configured via environment variables. Copy .env.example to .env and customize as needed.
Required¶
| Variable | Description |
|---|---|
OPENAI_API_KEY |
Your OpenAI API key (get one here) |
SECRET_KEY |
JWT signing key (min 32 characters) |
Generate a secure secret key:
Database¶
| Variable | Default | Description |
|---|---|---|
POSTGRES_USER |
retrievai |
PostgreSQL username |
POSTGRES_PASSWORD |
— | PostgreSQL password |
POSTGRES_DB |
retrievai |
PostgreSQL database name |
Application¶
| Variable | Default | Description |
|---|---|---|
ENVIRONMENT |
development |
Environment name (development, test, production) |
DEBUG |
true |
Enable debug mode |
Production Configuration¶
For production deployments, ensure:
DEBUG=falseENVIRONMENT=productionSECRET_KEYis a strong, unique valuePOSTGRES_PASSWORDis secure
See Deployment Guide for full production setup.