Self-hosting

Backend environment

The variables the ChatPlotDB backend reads, and which ones it will not start without.

Required

VariablePurpose
APP_DB_URLThe application PostgreSQL database
ANTHROPIC_API_KEYThe default model provider
DB_ENCRYPTION_KEYEncrypts stored connection credentials
JWT_SECRET_KEYShared with the auth service to validate tokens

DB_ENCRYPTION_KEY is not rotatable in place

It decrypts every stored connection credential. Losing it means every connection must be re-entered; changing it without a re-encryption pass means the same thing.

Models

VariablePurpose
LLM_MODEL_NAMEThe chat agent's default model
PROMPT_AGENT_MODEL_NAMEThe Config Studio generator's model
OPENAI_API_KEYEnables GPT models
GLM_API_KEYEnables GLM
DEEPSEEK_API_KEYEnables DeepSeek

A provider key that is absent removes its models from the picker rather than breaking. See choosing a model.

Optional

VariablePurpose
TAVILY_API_KEYWeb search
SAMPLE_DB_*The read-only platform sample database
Slack credentialsThe Slack app
S3 settingsFile storage; local disk is used without them
Langfuse / SentryTracing and error tracking

CORS

The frontend origin must be allowed explicitly. A frontend that loads but cannot reach the API is almost always this.

On this page