Docs / Self-hosting
Configuration
The environment variables developers change most.
Configuration comes from .env. The full annotated lists are in .env.example and .env.production.example.
Core
| Variable | Purpose |
|---|---|
ENVIRONMENT | development or production |
DATABASE_URL | PostgreSQL URL when you run the API outside Compose |
JWT_SECRET_KEY | Signs access tokens |
EVIDENCE_ENCRYPTION_KEY | Encrypts stored evidence and webhook secrets |
ADMIN_BOOTSTRAP_ENABLED | Creates the development administrator. Off in production |
APP_PUBLIC_URL | Console URL used in emails and alert links |
CORS_ALLOWED_ORIGINS | Browser origins allowed to call the API |
Internal AI provider
One configuration serves content evaluation, AI-assisted onboarding and the in-console assistant. It is set only in the environment.
| Variable | Value |
|---|---|
RAI_AI_PROVIDER | openai, anthropic, gemini, vertex or openai_compatible |
RAI_AI_MODEL | Model name |
RAI_AI_API_KEY | Provider key. Vertex can use a service account instead |
RAI_AI_BASE_URL | For openai_compatible endpoints |
Provider gateway credentials
| Provider | Variables |
|---|---|
| OpenAI | LLM_PROVIDER_API_KEY, LLM_PROVIDER_URL |
| Anthropic | ANTHROPIC_API_KEY |
| Azure OpenAI | AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_DEPLOYMENT |
| Gemini Developer API | GOOGLE_AI_API_KEY |
| Vertex AI | GCP_PROJECT_ID, GCP_LOCATION, and a service account |
| Bedrock | AWS_REGION and AWS credentials |
| Ollama | PROVIDER_GATEWAY_OLLAMA_ENABLED, OLLAMA_ENDPOINT |
Evidence content
Choose how each kind of content is stored with EVIDENCE_PROMPT_HANDLING_MODE, EVIDENCE_MODEL_REQUEST_HANDLING_MODE, EVIDENCE_MODEL_RESPONSE_HANDLING_MODE, EVIDENCE_AGENT_OUTPUT_HANDLING_MODE, EVIDENCE_TOOL_PARAMETERS_HANDLING_MODE and EVIDENCE_TOOL_RESULT_HANDLING_MODE.
Values are FULL, REDACTED, HASH_ONLY, METADATA_ONLY and DO_NOT_STORE.
Development enables demonstration content defaults (EVIDENCE_USE_DEMO_CONTENT_DEFAULTS). The production template turns them off. Decide what you are allowed to store before sending real data.
Set EMAIL_ENABLED=true with SMTP_HOST, SMTP_PORT, SMTP_USERNAME, SMTP_PASSWORD and EMAIL_FROM_ADDRESS to send verification, reset and notification mail.