Deployment and upgradesOfficial documentation8 min readDeployment and upgrades

Add Mandatory Environment Variables for FastGPT 4.15 Upgrade

This document details the new environment variables required for self-hosted FastGPT 4.15 deployments, covering mandatory variables for all instances and…

This document details the new environment variables required for self-hosted FastGPT 4.15 deployments, covering mandatory variables for all instances and optional additional variables for setups with Agent Sandbox enabled.

Core Environment Variables for All FastGPT Deployments

These variables must be added to both fastgpt and fastgpt-pro service configurations:

Variable NameTarget ServicesPurposeExample Configuration
CHAT_TITLE_MODELfastgpt, fastgpt-proEnables automatic generation of unique chat titles for new conversation threadsCHAT_TITLE_MODEL=deepseek-v4-flash
INVOKE_TOKEN_SECRETfastgpt, fastgpt-proJWT secret key used for reverse-called interfaces; requires a key longer than 32 bitsINVOKE_TOKEN_SECRET=For keys with more than 32 bits, reverse call the interface jwt key

Additional Variables for Agent Sandbox Deployments

If you have enabled the Agent Sandbox feature, add the following two environment variables to your fastgpt service configuration:

Variable NameTarget ServicesPurposeExample Configuration
AGENT_SANDBOX_PROXY_SECRETfastgpt (Agent Sandbox enabled)Shared secret for communication with fastgpt-agent-sandbox-proxy; use a cryptographically random string longer than 32 characters in production environmentsAGENT_SANDBOX_PROXY_SECRET=replace_with_32_chars_random_secret
AGENT_SANDBOX_PROXY_URLfastgpt (Agent Sandbox enabled)Browser-accessible WebSocket URL for the agent-sandbox-proxy service; use wss:// for domains proxied over HTTPSAGENT_SANDBOX_PROXY_URL=ws://{{host}}:3006

Implementation Steps

  1. Locate your existing FastGPT environment variable configuration, such as a .env file, Docker Compose environment section, or Kubernetes ConfigMap.
  2. Add the core environment variables from the first section to both fastgpt and fastgpt-pro service definitions.
  3. If you use Agent Sandbox, append the additional variables from the second section to your fastgpt service configuration.
  4. Restart all FastGPT services to apply the updated environment variables.

Source: FastGPT official source

Applicability and version scope

Use this page for the documented Deployment and upgrades scenario. Confirm the FastGPT, dependency, API, and deployment versions in the official source before applying a change.

Safety guardrails

Use [REDACTED_CREDENTIAL] for credentials and private data. Confirm the documented environment and version before review.

Rollback guidance

Restore the prior technical-content authority snapshot. Restore saved configuration and data snapshots, then repeat the smallest verification scenario.