RaiCentral

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

VariablePurpose
ENVIRONMENTdevelopment or production
DATABASE_URLPostgreSQL URL when you run the API outside Compose
JWT_SECRET_KEYSigns access tokens
EVIDENCE_ENCRYPTION_KEYEncrypts stored evidence and webhook secrets
ADMIN_BOOTSTRAP_ENABLEDCreates the development administrator. Off in production
APP_PUBLIC_URLConsole URL used in emails and alert links
CORS_ALLOWED_ORIGINSBrowser 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.

VariableValue
RAI_AI_PROVIDERopenai, anthropic, gemini, vertex or openai_compatible
RAI_AI_MODELModel name
RAI_AI_API_KEYProvider key. Vertex can use a service account instead
RAI_AI_BASE_URLFor openai_compatible endpoints

Provider gateway credentials

ProviderVariables
OpenAILLM_PROVIDER_API_KEY, LLM_PROVIDER_URL
AnthropicANTHROPIC_API_KEY
Azure OpenAIAZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT, AZURE_OPENAI_DEPLOYMENT
Gemini Developer APIGOOGLE_AI_API_KEY
Vertex AIGCP_PROJECT_ID, GCP_LOCATION, and a service account
BedrockAWS_REGION and AWS credentials
OllamaPROVIDER_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.

Email

Set EMAIL_ENABLED=true with SMTP_HOST, SMTP_PORT, SMTP_USERNAME, SMTP_PASSWORD and EMAIL_FROM_ADDRESS to send verification, reset and notification mail.