Deployment and upgradesOfficial documentation11 min readDeployment and upgrades

FastGPT 4.15.0 Environment Variable Upgrade Changes

This page covers environment variable changes for FastGPT 4.15.0 self-hosted deployments, including mandatory validation steps, new configuration options,…

This page covers environment variable changes for FastGPT 4.15.0 self-hosted deployments, including mandatory validation steps, new configuration options, and migration details for core services, code sandbox, and the open-source edition.

Core Service (fastgpt-app/pro) Updates

v4.15.0 introduces stricter environment variable validation for fastgpt-app and fastgpt-pro. First, validate these mandatory shared variables, which must have identical values across both services:

  • AES256_SECRET_KEY: Encryption key
  • FILE_TOKEN_KEY: File token key
  • INVOKE_TOKEN_SECRET: JWT secret for invoke callbacks, minimum 32 characters

A new required environment variable is now mandatory:

  • SSE_MCP_SERVER_PROXY_ENDPOINT: SSE MCP Server address, leave empty if SSE functionality is not used.

Optional environment variables have predefined defaults and do not require configuration unless customization is needed:

VariableDefault ValueDescription
PARSE_FILE_WORKERS10File parsing worker concurrency
PARSE_FILE_TIMEOUT_SECONDS600File parsing timeout in seconds
HTML_TO_MARKDOWN_WORKERS10HTML-to-Markdown worker concurrency
TEXT_TO_CHUNKS_WORKERS10Text chunking worker concurrency
SYNC_INDEXtrueAutomatically sync MongoDB indexes, use boolean strings only
TRUSTED_PROXY_ENABLEfalseEnable trusted reverse proxy client IP verification
TRUSTED_PROXY_IPS(empty)Trusted reverse proxy IP/CIDR list, comma or whitespace separated, only active when TRUSTED_PROXY_ENABLE=true
SYSTEM_MAX_STRING_LENGTH_M100Maximum string length for synchronous system variable replacement, range 1-100
MAX_FOLDER_DEPTH4Maximum folder depth, range 2-20
WORKFLOW_MAX_LOOP_TIMES100Maximum input array length for Loop/Parallel nodes
WORKFLOW_PARALLEL_MAX_CONCURRENCY10Parallel node concurrency limit, clamped to [5, 100]

Code Sandbox Configuration Updates

Code Sandbox adds security-focused environment variables and supports grouped run queueing via queueId. Full default variable set is as follows:

VariableDefaultDescription
SANDBOX_API_MAX_BODY_MB8Maximum /sandbox API JSON body size, including variables, in MB
SANDBOX_MAX_OUTPUT_MB10Maximum code execution output JSON size, including return values and logs, in MB
CHECK_INTERNAL_IPtrueEnables internal IP checks for sandbox network requests to reduce SSRF risk
SANDBOX_MAX_TIMEOUT60000Code execution timeout in milliseconds
SANDBOX_MAX_MEMORY_MB256Sandbox memory limit in MB, with 50 MB reserved for overhead
SANDBOX_POOL_SIZE20Number of pre-warmed JS/Python workers
SANDBOX_REQUEST_MAX_COUNT30Maximum network requests allowed per code execution
SANDBOX_REQUEST_TIMEOUT60000Network request timeout from inside the sandbox, in milliseconds
SANDBOX_REQUEST_MAX_RESPONSE_MB10Maximum sandbox network request response body size in MB
SANDBOX_REQUEST_MAX_BODY_MB5Maximum sandbox network request body size in MB
SANDBOX_QUEUE_ID_CONCURRENCYEmptyNumber of concurrent requests with matching queueId for grouped queueing

Open-Source Edition Configuration Migration

The open-source edition no longer uses the config.json configuration file. All previously file-based settings are now available as environment variables. After removing any existing config.json volume mounts, add these variables as needed:

  • CUSTOM_PDF_PARSE_URL: Custom PDF parsing service URL
  • CUSTOM_PDF_PARSE_KEY: Custom PDF parsing service key
  • DOC2X_KEY: Doc2x PDF parsing service key
  • TEXTIN_APP_ID: TextIn service App ID
  • TEXTIN_SECRET_CODE: TextIn service Secret Code
  • HNSW_EF_SEARCH (default 100): hnsw ef_search parameter for vector search (PG / OB / OpenGauss only)
  • HNSW_MAX_SCAN_TUPLES (default 100000): Maximum vector scan tuple count (PG only)
  • DATASET_PARSE_MAX_PROCESS (default 10): Maximum Dataset file parsing queue concurrency
  • VECTOR_MAX_PROCESS (default 10): Maximum vector indexing queue concurrency
  • QA_MAX_PROCESS (default 10): Maximum Q&A split queue concurrency
  • VLM_MAX_PROCESS (default 10): Maximum vision-language model processing queue concurrency

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.