document/content/self-host/upgrading/4-15/41505.en.mdx
Add the CHAT_TITLE_MODEL environment variable to fastgpt and fastgpt-pro. It is used to automatically generate chat titles. For example:
CHAT_TITLE_MODEL=deepseek-v4-flash
INVOKE_TOKEN_SECRET=For keys with more than 32 bits, reverse call the interface jwt key
If Agent Sandbox is enabled, also add the following environment variables to fastgpt:
# Shared with fastgpt-agent-sandbox-proxy. In production, replace it with a random secret longer than 32 characters.
AGENT_SANDBOX_PROXY_SECRET=replace_with_32_chars_random_secret
# Browser-accessible WebSocket URL for agent-sandbox-proxy. Use wss:// if it is proxied through an HTTPS domain.
AGENT_SANDBOX_PROXY_URL=ws://{{host}}:1006
If Agent Sandbox is enabled, also update the following images:
Also add the fastgpt-agent-sandbox-proxy service to docker-compose.yml. The example below uses the China Mainland image registry. For global deployments, change the image to ghcr.io/labring/fastgpt-agent-sandbox-proxy:v0.2.0-beta2:
fastgpt-agent-sandbox-proxy:
image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-sandbox-proxy:v0.2.0-beta2
container_name: fastgpt-agent-sandbox-proxy
restart: always
ports:
- 1006:1006
networks:
- fastgpt
environment:
PORT: 1006
# Must exactly match AGENT_SANDBOX_PROXY_SECRET in fastgpt.
AGENT_SANDBOX_PROXY_SECRET: replace_with_32_chars_random_secret
# Internal URL of the main app container. If your service name is not fastgpt, update it accordingly.
FASTGPT_APP_URL: http://fastgpt:3000
FASTGPT_APP_REQUEST_TIMEOUT_SECS: 10
RUST_LOG: info,fastgpt_agent_sandbox_proxy=debug
# Configure this only when the upstream sandbox endpoint returns localhost/127.0.0.1 and the proxy container cannot reach it.
# AGENT_SANDBOX_PROXY_REWRITE_HOST: host.docker.internal
Archive all old sandbox workspaces to S3 to more thoroughly release inactive sandboxes. Some old sandboxes may fail to install zip packages because of timeouts. Because most old sandboxes are tied to old chats, you may also remove all old sandboxes directly instead of running this script. This script only affects old sandboxes and does not affect newly created sandboxes.
curl --location --request POST 'https://{{host}}/api/admin/initSandboxArchive' \
--header 'rootkey: {{rootkey}}' \
--header 'Content-Type: application/json' \
-d '{"runArchive":true,"inactiveDays":0}'
apikey-appId. Existing API keys remain compatible and continue to work. For details, see the FastGPT API documentation.CHAT_TITLE_MODEL variable to enable this feature.temperature and max_tokens from all built-in LLM requests to avoid incompatibility with some models."none" to avoid errors from some models.array and object types in Workflow tools.SYSTEM_MAX_STRING_LENGTH_M environment variable.