Self-hosting
Backend environment
The variables the ChatPlotDB backend reads, and which ones it will not start without.
Required
| Variable | Purpose |
|---|---|
APP_DB_URL | The application PostgreSQL database |
ANTHROPIC_API_KEY | The default model provider |
DB_ENCRYPTION_KEY | Encrypts stored connection credentials |
JWT_SECRET_KEY | Shared 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
| Variable | Purpose |
|---|---|
LLM_MODEL_NAME | The chat agent's default model |
PROMPT_AGENT_MODEL_NAME | The Config Studio generator's model |
OPENAI_API_KEY | Enables GPT models |
GLM_API_KEY | Enables GLM |
DEEPSEEK_API_KEY | Enables DeepSeek |
A provider key that is absent removes its models from the picker rather than breaking. See choosing a model.
Optional
| Variable | Purpose |
|---|---|
TAVILY_API_KEY | Web search |
SAMPLE_DB_* | The read-only platform sample database |
| Slack credentials | The Slack app |
| S3 settings | File storage; local disk is used without them |
| Langfuse / Sentry | Tracing and error tracking |
CORS
The frontend origin must be allowed explicitly. A frontend that loads but cannot reach the API is almost always this.