Technical referenceOfficial documentation35 min readReference data

FastGPT Environment Variables Reference (136 settings)

A grouped reference of the 136 environment variables defined in the FastGPT community edition configuration template, with defaults and official notes. Verified 2026-09-09.

FastGPT Environment Variables Reference

How to use this table

This page lists the 136 environment variables available in the FastGPT community edition, grouped by purpose, with the default from the configuration template and whether the line is enabled by default. Environment variables are the most common source of deployment and upgrade problems; this table exists so the values can be checked without cloning the repository. Verified 2026-09-09.

Columns

ColumnMeaning
VariableThe key name in the configuration file. Case sensitive
DefaultThe value given in the template. Empty means no default is provided and the value must be set for the environment. Secrets, tokens and passwords are marked as sample values and are not printed here
EnabledYes means the line is active in the template; Optional means the line is commented out and can be enabled as needed
NotesThe official comment above that variable in the template, translated from Chinese

Service endpoints and integrations (34)

VariableDefaultEnabledNotes
PRO_URL—OptionalCommercial version address
PRO_TOKEN—Optional—
CRM_API_URLhttps://crm.example.com/api/v1OptionalOfficial website visitor attribution CRM (no identity reporting if address not configured)
CRM_API_KEY—Optional—
PLUGIN_BASE_URLhttp://localhost:3004YesPlugin service
PLUGIN_TOKENsample value (must be replaced)Yes—
CODE_SANDBOX_URLhttp://localhost:3002YesCode sandbox service
CODE_SANDBOX_TOKENsample value (must be replaced)Yes—
AIPROXY_API_ENDPOINThttp://localhost:3010YesAI Proxy API
AIPROXY_API_TOKENsample value (must be replaced)Yes—
SSE_MCP_SERVER_PROXY_ENDPOINThttp://localhost:3003YesMCP Server proxy address, used for splicing SSE address on MCP usage page (do not add trailing /)
MARKETPLACE_URLhttps://v2.marketplace.fastgpt.cnYesPlugin marketplace address
AGENT_SANDBOX_PROVIDER—YesAgent sandbox
AGENT_SANDBOX_SEALOS_BASEURL—YesSealos devbox
AGENT_SANDBOX_SEALOS_TOKEN—Yes—
AGENT_SANDBOX_SEALOS_IMAGE—Yes—
AGENT_SANDBOX_SEALOS_WORK_DIRECTORY/home/devbox/workspaceYes—
AGENT_SANDBOX_CPU_COUNT1YesAgent Sandbox per-instance CPU core count and memory limit (MiB)
AGENT_SANDBOX_MEMORY_MIB2048Yes—
AGENT_SANDBOX_STORAGE_SIZE_GI1YesAgent Sandbox storage capacity, unit Gi
AGENT_SANDBOX_OPENSANDBOX_BASEURLhttp://localhost:8090YesOpenSandbox configuration (effective when PROVIDER=opensandbox)
AGENT_SANDBOX_OPENSANDBOX_API_KEYsample value (must be replaced)Yes—
AGENT_SANDBOX_OPENSANDBOX_RUNTIMEdockerYes—
AGENT_SANDBOX_OPENSANDBOX_IMAGEregistry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-sandbox:v0.1Yes—
AGENT_SANDBOX_OPENSANDBOX_USE_SERVER_PROXYtrueYes—
AGENT_SANDBOX_OPENSANDBOX_VOLUME_MANAGER_URLhttp://localhost:3005Yes—
AGENT_SANDBOX_OPENSANDBOX_VOLUME_MANAGER_TOKENsample value (must be replaced)Yes—
AGENT_SANDBOX_OPENSANDBOX_VOLUME_NAME_PREFIXfastgpt-sessionYes—
AGENT_SANDBOX_MAX_EDIT_DEBUG100YesMax number of active editing/debugging sandboxes
AGENT_SANDBOX_SUSPEND_MINUTES60YesAuto-pause timeout (minutes) for running Agent Sandbox after continuous inactivity
AGENT_SANDBOX_ARCHIVE_INACTIVE_DAYS7YesAuto-archive suspended Agent sandboxes after days of continuous inactivity
AGENT_SANDBOX_NPM_REGISTRY—Yesnpm registry used by npm/yarn/pnpm/bun in Agent sandbox (optional)
AGENT_SANDBOX_PYPI_INDEX_URL—YesPyPI index URL used by pip/python -m pip/uv in Agent sandbox (optional)
AGENT_SANDBOX_APT_MIRROR—Yesapt mirror address used in Ubuntu or Debian Agent sandbox (optional), only valid for root; /debian-security for Debian will be automatically derived

Databases and cache (15)

VariableDefaultEnabledNotes
REDIS_URLredis://default:mypassword@localhost:6379YesRedis URL
STREAM_RESUME_TTL_SECONDS300OptionalStream restore Redis image TTL (sec): renewal during generation / shorten after completion, default 300 / 30
STREAM_RESUME_POST_COMPLETE_TTL_SECONDS30Optional—
STREAM_RESUME_REDIS_MAXMEMORY_RATIO0.8OptionalStop creating recovery images for new stream requests when Redis used memory / maxmemory reaches threshold
STREAM_RESUME_REDIS_MEMORY_CHECK_INTERVAL_MS5000Optional—
MONGODB_URImongodb://myusername:mypassword@localhost:27017/fastgpt?authSource=admin&directConnection=trueYesMongoDB connection parameters; add directConnection=true may be required when connecting remote database in local development
MONGODB_LOG_URI—YesLog library
VECTOR_VQ_LEVEL32YesVector database priority: pg > oceanbase > milvus > opengauss. Vector quantization level: PG supports 32/16, OceanBase supports 32/8/1
PG_URLpostgresql://username:password@localhost:5432/postgresYesPG vector database connection parameters
OCEANBASE_URL—OptionalOceanBase vector database connection parameters
SEEKDB_URL—OptionalSeekDB vector database connection parameters
MILVUS_ADDRESS—OptionalMilvus vector database connection parameters (full-text retrieval automatically enables BM25 when using Milvus; version >= 2.5, recommended 2.5.16+)
MILVUS_TOKEN—Optional—
MILVUS_LANGUAGE_IDENTIFIERlinguaOptionalMilvus BM25 language recognition engine: lingua (default) | whatlang
OPENGAUSS_URLpostgresql://gaussdb:FastGPT@123@localhost:5432/fastgptOptionalopenGauss vector database connection parameters

Object storage (14)

VariableDefaultEnabledNotes
STORAGE_VENDORminioYesStorage provider; Fill in aws-s3 if using Sealos object storage
STORAGE_REGIONus-east-1Yes—
STORAGE_ACCESS_KEY_IDsample value (must be replaced)Yes—
STORAGE_SECRET_ACCESS_KEYsample value (must be replaced)Yes—
STORAGE_PUBLIC_BUCKETfastgpt-publicYes—
STORAGE_PRIVATE_BUCKETfastgpt-privateYes—
STORAGE_EXTERNAL_ENDPOINT—Yes—
STORAGE_S3_CDN_ENDPOINT—Yes—
STORAGE_DOWNLOAD_URL_MODEshort-proxyYesDownload link mode: short-proxy | short-redirect | presigned
STORAGE_DOWNLOAD_REDIRECT_TTL_SECONDS300YesTemporary S3 pre-signed download link TTL (seconds) in short-redirect mode, rarely needs modification
STORAGE_S3_ENDPOINThttp://localhost:9000Yes—
STORAGE_S3_FORCE_PATH_STYLEtrueYes—
STORAGE_S3_MAX_RETRIES3Yes—
STORAGE_PUBLIC_ACCESS_EXTRA_SUB_PATH—Yes—

Agent sandbox proxy and networking (3)

VariableDefaultEnabledNotes
AGENT_SANDBOX_PROXY_SECRETsample value (must be replaced)YesJWT verification and intranet security physical blocking secret (must be exactly same as AGENTSANDBOXPROXY_SECRET env var of Rust Proxy). Production environment must configure as high-strength random value of at least 32 bytes, do not use example placeholder
AGENT_SANDBOX_PROXY_URLws://localhost:3006YesPublic WebSocket address for browser client to connect sandbox proxy. Required when Agent Sandbox (showagentsandbox) is enabled; leave empty otherwise. Dev env: recommend ws://localhost:3006 (points to Rust proxy in Docker Compose). Prod env: configure browser-accessible ws:// or wss:// proxy address.
AGENT_SANDBOX_PREVIEW_PROXY_URLhttp://localhost:3006YesHTTP(S) address for browser to access sandbox file preview. Required when Agent Sandbox is enabled; uses same port as WebSocket by default in single-port deployment.

Concurrency limits (6)

VariableDefaultEnabledNotes
WECHAT_CHANNEL_CONCURRENCY1000YesWeChat channel poll worker concurrency (default 1000), must â‰Ĩ online channel count; message delay worsens linearly when channel count exceeds this value
PARSE_FILE_TIMEOUT_SECONDS600YesFile parsing timeout (seconds)
WORKFLOW_MAX_RUN_TIMES500YesMax workflow run times to avoid extreme infinite loops
WORKFLOW_MAX_LOOP_TIMES100YesMax input array length for loop/parallel nodes (default 100)
WORKFLOW_PARALLEL_MAX_CONCURRENCY10YesMax concurrency for parallel nodes (will clamp to [5, 100], default 10)
CHAT_MAX_QPM5000YesWorkflow QPM (does not take effect if user plan has restrictions)

Resource limits (8)

VariableDefaultEnabledNotes
SERVICE_REQUEST_MAX_CONTENT_LENGTH10YesMax request size received by server (MB)
MAX_FOLDER_DEPTH4YesMaximum allowed folder depth, default 4, range 2~20 (max 4 folder levels under root directory)
APP_FOLDER_MAX_AMOUNT1000YesMax number of application folders
DATASET_FOLDER_MAX_AMOUNT1000YesMax number of dataset folders
UPLOAD_FILE_MAX_SIZE1000YesMax upload file size (MB)
UPLOAD_FILE_MAX_AMOUNT1000YesMax number of upload files
LLM_REQUEST_TRACKING_RETENTION_HOURS6YesLLM request trace retention duration (hours)
MAX_HTML_TRANSFORM_CHARS1000000YesMax character count for HTML to Markdown conversion (no conversion if exceeded)

Knowledge base processing concurrency (4)

VariableDefaultEnabledNotes
DATASET_PARSE_MAX_PROCESS10YesMax concurrent knowledge base file parsing queue size
VECTOR_MAX_PROCESS10YesMaximum concurrency of vector training queue
QA_MAX_PROCESS10YesMax concurrent Q&A splitting queue size
VLM_MAX_PROCESS10YesMax concurrency for image understanding model processing queue

Enhanced PDF parsing (optional) (8)

VariableDefaultEnabledNotes
CUSTOM_PDF_PARSE_URL—OptionalCustom PDF parsing service address
CUSTOM_PDF_PARSE_KEY—OptionalCustom PDF parsing service secret key
SOMARK_API_KEY—OptionalSoMark PDF parsing service secret key
DOC2X_KEY—OptionalDoc2x PDF parsing service secret key
TEXTIN_APP_ID—OptionalHehe Information Textin service App ID
TEXTIN_SECRET_CODE—OptionalHehe Information Textin service Secret Code
HNSW_EF_SEARCH100YesVector retrieval hnsw ef_search parameter, only effective for PG / OB / OpenGauss
HNSW_MAX_SCAN_TUPLES100000YesMaximum scanned data volume for vector retrieval, only effective for PG

Security (10)

VariableDefaultEnabledNotes
USE_IP_LIMITfalseYesEnable IP rate limiting (true); IP rate limiting for partial APIs to prevent abnormal requests
CHECK_INTERNAL_IPfalseYesEnable intranet IP check
AUTH_COOKIE_SECUREfalseYesAdd Secure attribute to login Cookie; enable only for full-site HTTPS
TRUSTED_PROXY_ENABLEfalseYesEnable trusted reverse proxy client IP verification
TRUSTED_PROXY_IPS—YesTrusted reverse proxy IP/CIDR list, separated by comma or whitespace. Effective only when TRUSTEDPROXYENABLE=true; only X-Forwarded-For/X-Real-IP passed by explicitly trusted proxies will be used for client IP resolution
PASSWORD_LOGIN_MINUTE_LIMIT_COUNT—YesPassword login request limit per minute (default 10)
PASSWORD_EXPIRED_MONTH—YesPassword expiration months (no expiration if not set)
MAX_LOGIN_SESSION—YesMax logged-in client count (default 10)
ALLOWED_ORIGINS—YesCustom CORS; allow all CORS by default if not configured (comma-separated)
MULTIPLE_DATA_TO_BASE64trueYesForce convert images to base64 when passing to model

Secrets (4)

VariableDefaultEnabledNotes
FILE_TOKEN_KEY—YesSecret for file reading
AES256_SECRET_KEYsample value (must be replaced)YesSecret encryption key
INVOKE_TOKEN_SECRETsample value (must be replaced)YesInvoke reverse call JWT secret, minimum 32 bits
ROOT_KEYsample value (must be replaced)Yesroot key (highest privilege)

Domains and frontend (3)

VariableDefaultEnabledNotes
FE_DOMAINhttp://localhost:3000YesRequired. FastGPT client access address, consisting of protocol, host and optional port, used to complete relative path resources (no trailing /)
FILE_DOMAINhttp://localhost:3000YesFile domain (also points to FastGPT service); Assign independent domain for higher security to prevent high-risk file reading from affecting main domain content
NEXT_PUBLIC_BASE_URL/fastaiOptionalSecondary routing, needs to be determined during packaging

Logging (12)

VariableDefaultEnabledNotes
LOG_ENABLE_CONSOLEtrueYesLog level: trace | debug | info | warning | error | fatal
LOG_CONSOLE_LEVELdebugYes—
LOG_ENABLE_OTELtrueYes—
LOG_OTEL_LEVELinfoYes—
LOG_OTEL_SERVICE_NAMEfastgpt-clientYes—
LOG_OTEL_URLhttp://localhost:4318/v1/logsYes—
METRICS_ENABLE_OTELtrueYesMetrics
METRICS_OTEL_URLhttp://localhost:4318/v1/metricsYes—
METRICS_OTEL_SERVICE_NAMEfastgpt-clientYes—
TRACING_ENABLE_OTELtrueYesTracing
TRACING_OTEL_URLhttp://localhost:4318/v1/tracesYes—
TRACING_OTEL_SERVICE_NAMEfastgpt-clientYes—

Chat log forwarding (optional) (3)

VariableDefaultEnabledNotes
CHAT_LOG_URLhttp://localhost:8080OptionalLog service address
CHAT_LOG_INTERVAL10000OptionalLog push interval
CHAT_LOG_SOURCE_ID_PREFIXfastgpt-OptionalLog source ID prefix

Feature flags (8)

VariableDefaultEnabledNotes
SHOW_COUPONfalseYesDisplay redemption code function
SHOW_DISCOUNT_COUPONfalseYesDisplay coupon function
APP_REGISTRATION_URL—YesAddress for application record filing
HIDE_CHAT_COPYRIGHT_SETTING—YesConfigure copyright info hiding; hidden only if value is true
WECOM_LOGIN_AUTO_REDIRECTfalseYesAllow WeChat Work client auto-login redirect, default false
OPENAPI_KEY_MAX_COUNT100YesMaximum number of system API Keys that a single team member can create, minimum value is 1
AGENT_ENGINEfastAgentYesAgent engine selection: fastAgent (FastGPT agent loop) | piAgent (pi-agent-core engine)
SKIP_FILE_TYPE_CHECKfalseYes—

Basics (4)

VariableDefaultEnabledNotes
LOG_DEPTH3Yes—
DEFAULT_ROOT_PSW123456YesDefault user password (username: root), auto-updated on each restart
DB_MAX_LINK5YesMax database connections
SYNC_INDEXtrueYesAuto-sync index

When this table goes out of date

  1. Upgrades add and remove variables. Check the upgrade notes for the target version before upgrading; a removed variable left in the configuration can prevent startup.
  2. The commercial edition has its own configuration. This table covers the community edition template only.
  3. Defaults are template values, not runtime values. Container orchestration files, secret managers and startup arguments can all override them.
  4. An empty default does not mean the value can be left empty. Secrets and service endpoints have no default and must be set for the environment.
  5. The Notes column is translated from the official Chinese template. Where the wording matters, check the template itself.
  6. Every secret, token and password in the template is a sample value and must be replaced before go-live. Keeping a template sample is the same as publishing the credential, which is why the values are not printed here.

Next steps

The tables above can be checked against the open-source repository. If a specific deployment needs to be assessed against these values, contact sales for support; the cloud service can be used directly without preparing the environment first.

  • Contact sales: assess your deployment against these values
  • Get started: use the cloud service and skip environment setup
  • Pricing: compare what each form covers

Variable list taken from the open-source configuration template, verified 2026-09-09.