The configuration template holds 136 variables in 15 groups. A single deployment touches far fewer: 104 carry a default and run untouched, 32 genuinely have to be filled in, and another 24 are off by default and only take effect once enabled explicitly. The module below narrows that down by deployment shape and the features in use.
Why filling the template line by line is a poor plan
The template lists every variable that could ever be needed. It is not a form to be completed. Filling it line by line goes wrong in three ways.
First, it replaces working defaults with something else. Of the 136 variables, 104 ship with a default, most of them tuned for a single-host deployment, and hand-editing them to a more reasonable looking number tends to run into resource ceilings instead.
Second, it switches on features that are not wanted. Variables in the object storage, sandbox and enhanced parsing groups matter only when those features are used, and a half-filled configuration is worse than an empty one: the service starts and fails later, with an error that points at a downstream component.
Third, it misses the ones that genuinely matter. The required variables are spread across groups rather than gathered at the top, so working top to bottom tends to stop somewhere in the middle - and what gets missed is usually a secret or an external service address, exactly the class with no default.
Interactive module: checklist by deployment shape
Choose a deployment shape and the features to enable, and the module lists the variables this deployment actually needs, the default for each, and which ones have to be filled in. It can show required variables only, or include the ones that are off by default.
Basic configuration4 / 4 variables
| Variable | Default | Status | Notes |
|---|---|---|---|
LOG_DEPTH | 3 | On by default | No note in the template |
DEFAULT_ROOT_PSW | 123456 | On by default | Default user password (username: root), auto-updated on each restart |
DB_MAX_LINK | 5 | On by default | Max database connections |
SYNC_INDEX | true | On by default | Auto-sync index |
Secrets4 / 4 variables
| Variable | Default | Status | Notes |
|---|---|---|---|
FILE_TOKEN_KEY | No default | Must fill in | Secret for file reading |
AES256_SECRET_KEY | fastgptsecret | On by default | Secret encryption key |
INVOKE_TOKEN_SECRET | fastgpt_invoke_token_secret_32_chars_min | On by default | Invoke reverse call JWT secret, minimum 32 bits |
ROOT_KEY | fdafasd | On by default | root key (highest privilege) |
Service addresses and integrations30 / 34 variables
| Variable | Default | Status | Notes |
|---|---|---|---|
PLUGIN_BASE_URL | http://localhost:3004 | On by default | Plugin service |
PLUGIN_TOKEN | XHgR8zvKx1FhjHUxCKdJMNpzFUMlavM1 | On by default | No note in the template |
CODE_SANDBOX_URL | http://localhost:3002 | On by default | Code sandbox service |
CODE_SANDBOX_TOKEN | codesandbox | On by default | No note in the template |
AIPROXY_API_ENDPOINT | http://localhost:3010 | On by default | AI Proxy API |
AIPROXY_API_TOKEN | token | On by default | No note in the template |
SSE_MCP_SERVER_PROXY_ENDPOINT | http://localhost:3003 | On by default | MCP Server proxy address, used for splicing SSE address on MCP usage page (do not add trailing /) |
MARKETPLACE_URL | https://v2.marketplace.fastgpt.cn | On by default | Plugin marketplace address |
AGENT_SANDBOX_PROVIDER | No default | Must fill in | Agent sandbox |
AGENT_SANDBOX_SEALOS_BASEURL | No default | Must fill in | Sealos devbox |
AGENT_SANDBOX_SEALOS_TOKEN | No default | Must fill in | No note in the template |
AGENT_SANDBOX_SEALOS_IMAGE | No default | Must fill in | No note in the template |
AGENT_SANDBOX_SEALOS_WORK_DIRECTORY | /home/devbox/workspace | On by default | No note in the template |
AGENT_SANDBOX_CPU_COUNT | 1 | On by default | Agent Sandbox per-instance CPU core count and memory limit (MiB) |
AGENT_SANDBOX_MEMORY_MIB | 2048 | On by default | No note in the template |
AGENT_SANDBOX_STORAGE_SIZE_GI | 1 | On by default | Agent Sandbox storage capacity, unit Gi |
AGENT_SANDBOX_OPENSANDBOX_BASEURL | http://localhost:8090 | On by default | OpenSandbox configuration (effective when PROVIDER=opensandbox) |
AGENT_SANDBOX_OPENSANDBOX_API_KEY | my_secure_sandbox_key_123 | On by default | No note in the template |
AGENT_SANDBOX_OPENSANDBOX_RUNTIME | docker | On by default | No note in the template |
AGENT_SANDBOX_OPENSANDBOX_IMAGE | registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-agent-sandbox:v0.1 | On by default | No note in the template |
AGENT_SANDBOX_OPENSANDBOX_USE_SERVER_PROXY | true | On by default | No note in the template |
AGENT_SANDBOX_OPENSANDBOX_VOLUME_MANAGER_URL | http://localhost:3005 | On by default | No note in the template |
AGENT_SANDBOX_OPENSANDBOX_VOLUME_MANAGER_TOKEN | vmtoken | On by default | No note in the template |
AGENT_SANDBOX_OPENSANDBOX_VOLUME_NAME_PREFIX | fastgpt-session | On by default | No note in the template |
AGENT_SANDBOX_MAX_EDIT_DEBUG | 100 | On by default | Max number of active editing/debugging sandboxes |
AGENT_SANDBOX_SUSPEND_MINUTES | 60 | On by default | Auto-pause timeout (minutes) for running Agent Sandbox after continuous inactivity |
AGENT_SANDBOX_ARCHIVE_INACTIVE_DAYS | 7 | On by default | Auto-archive suspended Agent sandboxes after days of continuous inactivity |
AGENT_SANDBOX_NPM_REGISTRY | No default | Must fill in | npm registry used by npm/yarn/pnpm/bun in Agent sandbox (optional) |
AGENT_SANDBOX_PYPI_INDEX_URL | No default | Must fill in | PyPI index URL used by pip/python -m pip/uv in Agent sandbox (optional) |
AGENT_SANDBOX_APT_MIRROR | No default | Must fill in | apt mirror address used in Ubuntu or Debian Agent sandbox (optional), only valid for root; /debian-security for Debian will be automatically derived |
Sandbox proxy and network3 / 3 variables
| Variable | Default | Status | Notes |
|---|---|---|---|
AGENT_SANDBOX_PROXY_SECRET | default_fastgpt_agent_sandbox_proxy_secret | On by default | JWT verification and intranet security physical blocking secret (must be exactly same as AGENT_SANDBOX_PROXY_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_URL | ws://localhost:3006 | On by default | Public WebSocket address for browser client to connect sandbox proxy. Required when Agent Sandbox (show_agent_sandbox) 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_URL | http://localhost:3006 | On by default | HTTP(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. |
Object storage14 / 14 variables
| Variable | Default | Status | Notes |
|---|---|---|---|
STORAGE_VENDOR | minio | On by default | Storage provider; Fill in aws-s3 if using Sealos object storage |
STORAGE_REGION | us-east-1 | On by default | No note in the template |
STORAGE_ACCESS_KEY_ID | minioadmin | On by default | No note in the template |
STORAGE_SECRET_ACCESS_KEY | minioadmin | On by default | No note in the template |
STORAGE_PUBLIC_BUCKET | fastgpt-public | On by default | No note in the template |
STORAGE_PRIVATE_BUCKET | fastgpt-private | On by default | No note in the template |
STORAGE_EXTERNAL_ENDPOINT | No default | Must fill in | No note in the template |
STORAGE_S3_CDN_ENDPOINT | No default | Must fill in | No note in the template |
STORAGE_DOWNLOAD_URL_MODE | short-proxy | On by default | Download link mode: short-proxy | short-redirect | presigned |
STORAGE_DOWNLOAD_REDIRECT_TTL_SECONDS | 300 | On by default | Temporary S3 pre-signed download link TTL (seconds) in short-redirect mode, rarely needs modification |
STORAGE_S3_ENDPOINT | http://localhost:9000 | On by default | No note in the template |
STORAGE_S3_FORCE_PATH_STYLE | true | On by default | No note in the template |
STORAGE_S3_MAX_RETRIES | 3 | On by default | No note in the template |
STORAGE_PUBLIC_ACCESS_EXTRA_SUB_PATH | No default | Must fill in | No note in the template |
Database and cache5 / 15 variables
| Variable | Default | Status | Notes |
|---|---|---|---|
REDIS_URL | redis://default:mypassword@localhost:6379 | On by default | Redis URL |
MONGODB_URI | mongodb://myusername:mypassword@localhost:27017/fastgpt?authSource=admin&directConnection=true | On by default | MongoDB connection parameters; add directConnection=true may be required when connecting remote database in local development |
MONGODB_LOG_URI | No default | Must fill in | Log library |
VECTOR_VQ_LEVEL | 32 | On by default | Vector database priority: pg > oceanbase > milvus > opengauss. Vector quantization level: PG supports 32/16, OceanBase supports 32/8/1 |
PG_URL | postgresql://username:password@localhost:5432/postgres | On by default | PG vector database connection parameters |
Logging12 / 12 variables
| Variable | Default | Status | Notes |
|---|---|---|---|
LOG_ENABLE_CONSOLE | true | On by default | Log level: trace | debug | info | warning | error | fatal |
LOG_CONSOLE_LEVEL | debug | On by default | No note in the template |
LOG_ENABLE_OTEL | true | On by default | No note in the template |
LOG_OTEL_LEVEL | info | On by default | No note in the template |
LOG_OTEL_SERVICE_NAME | fastgpt-client | On by default | No note in the template |
LOG_OTEL_URL | http://localhost:4318/v1/logs | On by default | No note in the template |
METRICS_ENABLE_OTEL | true | On by default | Metrics |
METRICS_OTEL_URL | http://localhost:4318/v1/metrics | On by default | No note in the template |
METRICS_OTEL_SERVICE_NAME | fastgpt-client | On by default | No note in the template |
TRACING_ENABLE_OTEL | true | On by default | Tracing |
TRACING_OTEL_URL | http://localhost:4318/v1/traces | On by default | No note in the template |
TRACING_OTEL_SERVICE_NAME | fastgpt-client | On by default | No note in the template |
Domain and frontend2 / 3 variables
| Variable | Default | Status | Notes |
|---|---|---|---|
FE_DOMAIN | http://localhost:3000 | On by default | Required. FastGPT client access address, consisting of protocol, host and optional port, used to complete relative path resources (no trailing /) |
FILE_DOMAIN | http://localhost:3000 | On by default | File domain (also points to FastGPT service); Assign independent domain for higher security to prevent high-risk file reading from affecting main domain content |
Security10 / 10 variables
| Variable | Default | Status | Notes |
|---|---|---|---|
USE_IP_LIMIT | false | On by default | Enable IP rate limiting (true); IP rate limiting for partial APIs to prevent abnormal requests |
CHECK_INTERNAL_IP | false | On by default | Enable intranet IP check |
AUTH_COOKIE_SECURE | false | On by default | Add Secure attribute to login Cookie; enable only for full-site HTTPS |
TRUSTED_PROXY_ENABLE | false | On by default | Enable trusted reverse proxy client IP verification |
TRUSTED_PROXY_IPS | No default | Must fill in | Trusted reverse proxy IP/CIDR list, separated by comma or whitespace. Effective only when TRUSTED_PROXY_ENABLE=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 | No default | Must fill in | Password login request limit per minute (default 10) |
PASSWORD_EXPIRED_MONTH | No default | Must fill in | Password expiration months (no expiration if not set) |
MAX_LOGIN_SESSION | No default | Must fill in | Max logged-in client count (default 10) |
ALLOWED_ORIGINS | No default | Must fill in | Custom CORS; allow all CORS by default if not configured (comma-separated) |
MULTIPLE_DATA_TO_BASE64 | true | On by default | Force convert images to base64 when passing to model |
Feature switches8 / 8 variables
| Variable | Default | Status | Notes |
|---|---|---|---|
SHOW_COUPON | false | On by default | Display redemption code function |
SHOW_DISCOUNT_COUPON | false | On by default | Display coupon function |
APP_REGISTRATION_URL | No default | Must fill in | Address for application record filing |
HIDE_CHAT_COPYRIGHT_SETTING | No default | Must fill in | Configure copyright info hiding; hidden only if value is true |
WECOM_LOGIN_AUTO_REDIRECT | false | On by default | Allow WeChat Work client auto-login redirect, default false |
OPENAPI_KEY_MAX_COUNT | 100 | On by default | Maximum number of system API Keys that a single team member can create, minimum value is 1 |
AGENT_ENGINE | fastAgent | On by default | Agent engine selection: fastAgent (FastGPT agent loop) | piAgent (pi-agent-core engine) |
SKIP_FILE_TYPE_CHECK | false | On by default | No note in the template |
Concurrency and limits6 / 6 variables
| Variable | Default | Status | Notes |
|---|---|---|---|
WECHAT_CHANNEL_CONCURRENCY | 1000 | On by default | WeChat channel poll worker concurrency (default 1000), must ≥ online channel count; message delay worsens linearly when channel count exceeds this value |
PARSE_FILE_TIMEOUT_SECONDS | 600 | On by default | File parsing timeout (seconds) |
WORKFLOW_MAX_RUN_TIMES | 500 | On by default | Max workflow run times to avoid extreme infinite loops |
WORKFLOW_MAX_LOOP_TIMES | 100 | On by default | Max input array length for loop/parallel nodes (default 100) |
WORKFLOW_PARALLEL_MAX_CONCURRENCY | 10 | On by default | Max concurrency for parallel nodes (will clamp to [5, 100], default 10) |
CHAT_MAX_QPM | 5000 | On by default | Workflow QPM (does not take effect if user plan has restrictions) |
Resource limits8 / 8 variables
| Variable | Default | Status | Notes |
|---|---|---|---|
SERVICE_REQUEST_MAX_CONTENT_LENGTH | 10 | On by default | Max request size received by server (MB) |
MAX_FOLDER_DEPTH | 4 | On by default | Maximum allowed folder depth, default 4, range 2~20 (max 4 folder levels under root directory) |
APP_FOLDER_MAX_AMOUNT | 1000 | On by default | Max number of application folders |
DATASET_FOLDER_MAX_AMOUNT | 1000 | On by default | Max number of dataset folders |
UPLOAD_FILE_MAX_SIZE | 1000 | On by default | Max upload file size (MB) |
UPLOAD_FILE_MAX_AMOUNT | 1000 | On by default | Max number of upload files |
LLM_REQUEST_TRACKING_RETENTION_HOURS | 6 | On by default | LLM request trace retention duration (hours) |
MAX_HTML_TRANSFORM_CHARS | 1000000 | On by default | Max character count for HTML to Markdown conversion (no conversion if exceeded) |
Enhanced PDF parsing (optional)2 / 8 variables
| Variable | Default | Status | Notes |
|---|---|---|---|
HNSW_EF_SEARCH | 100 | On by default | Vector retrieval hnsw ef_search parameter, only effective for PG / OB / OpenGauss |
HNSW_MAX_SCAN_TUPLES | 100000 | On by default | Maximum scanned data volume for vector retrieval, only effective for PG |
Knowledge base processing concurrency4 / 4 variables
| Variable | Default | Status | Notes |
|---|---|---|---|
DATASET_PARSE_MAX_PROCESS | 10 | On by default | Max concurrent knowledge base file parsing queue size |
VECTOR_MAX_PROCESS | 10 | On by default | Maximum concurrency of vector training queue |
QA_MAX_PROCESS | 10 | On by default | Max concurrent Q&A splitting queue size |
VLM_MAX_PROCESS | 10 | On by default | Max concurrency for image understanding model processing queue |
Distribution across 15 groups
This table is the full distribution and can be read on its own. Where the with-default count is lower than the variable count, the difference is what has to be filled in for that group.
| Group | Variables | With default | On by default | Template has notes |
|---|---|---|---|---|
| Basic configuration | 4 | 4 | 4 | 3 |
| Secrets | 4 | 3 | 4 | 4 |
| Service addresses and integrations | 34 | 24 | 30 | 18 |
| Sandbox proxy and network | 3 | 3 | 3 | 3 |
| Object storage | 14 | 11 | 14 | 3 |
| Database and cache | 15 | 10 | 5 | 12 |
| Logging | 12 | 12 | 12 | 3 |
| Domain and frontend | 3 | 3 | 2 | 3 |
| Security | 10 | 5 | 10 | 10 |
| Feature switches | 8 | 6 | 8 | 7 |
| Chat log push (optional) | 3 | 3 | 0 | 3 |
| Concurrency and limits | 6 | 6 | 6 | 6 |
| Resource limits | 8 | 8 | 8 | 8 |
| Enhanced PDF parsing (optional) | 8 | 2 | 2 | 8 |
| Knowledge base processing concurrency | 4 | 4 | 4 | 4 |
Where the 32 variables with no default sit
They are not spread evenly. The service address and integration group holds the most, because it carries addresses and credentials for external services, which cannot have defaults. Object storage and the database and cache group hold several each, depending on whether built-in components or external instances are used.
One class deserves separate attention: variables that carry a default and still have to be changed. These defaults sit in the public configuration template, so anyone holding the same template knows them. They are:
| Variable | Group | Default in template | What it controls |
|---|---|---|---|
| DEFAULTROOTPSW | Basic configuration | 123456 | Initial password for the root account |
| ROOT_KEY | Secrets | fdafasd | Root-level API credential |
| AES256SECRETKEY | Secrets | fastgptsecret | Key used to encrypt sensitive fields at rest |
| INVOKETOKENSECRET | Secrets | fastgpt_invoke_token_secret_32_chars_min | Signing key for internal invocation tokens |
| AGENTSANDBOXPROXY_SECRET | Sandbox proxy and network | default_fastgpt_agent_sandbox_proxy_secret | Signing key for the sandbox proxy |
| AGENTSANDBOXOPENSANDBOXAPIKEY | Service addresses and integrations | my_secure_sandbox_key_123 | API credential for the sandbox service |
| STORAGEACCESSKEY_ID | Object storage | minioadmin | Built-in object storage account |
| STORAGESECRETACCESS_KEY | Object storage | minioadmin | Built-in object storage password |
Checking a configuration file against this table beats trying to recall which ones were changed. The two object storage entries matter only when the built-in storage is in use; an external object store replaces them with its own credentials.
Another class is the addresses and tokens for commercial edition or external platform integration. Running open source only means leaving them empty, and the service will start regardless. Filling in an address without its token fails at call time instead, and that half-filled state is harder to diagnose than an empty one.
Counted by group, the three holding the most variables without a default are Service addresses and integrations (10), Enhanced PDF parsing (optional) (6), Database and cache (5). That distribution doubles as a checking order before deployment: work through those three groups first, then pick off the scattered ones in the remaining groups, which beats reading the template from line one. The table above also settles quickly whether a group needs attention at all - where the variable count equals the with-default count, that group can be left alone.
Confirming a change actually took effect
Editing the configuration file is not the same as the service reading the new value. This step gets skipped often, and what it produces - configuration that looks right with behaviour that has not changed - is harder to chase than an error.
First, confirm the container was recreated rather than restarted. Environment variables are read when a container is created, and a restart does not re-read the file; the container has to come back up against the new configuration, or the file is new while the process still holds the old value.
Second, confirm from the service's own output rather than from the file. The file only states an intention; startup logs and runtime behaviour state what is actually in use. This matters most for variables that have defaults: a misspelled name makes the service fall back to the default silently, and the line in the file looks perfectly fine.
Third, confirm item by item rather than in bulk. After changing seven or eight variables, a service that starts proves nothing about each one. Listing the changed variables and checking them individually costs less than working backwards from symptoms later, and the checklist the module above produces can be used directly for that pass.
What the 24 off-by-default variables are
Part of the template is commented out, 24 variables in total. They are not deprecated; they are the enable-when-needed set.
They cluster around a few optional features: chat log push is off as a whole group, enhanced parsing is mostly off, and part of the database and cache group exists for external instances and is unnecessary with the built-in components.
Deciding what to enable works from the feature backwards, not from the variable name forwards. Establish whether this deployment uses a given feature, then look at which variables that group needs, rather than reading names one by one and guessing what each controls. The module above is organised in that order.
41 variables carry no note in the template
Of the 136 variables, 95 come with an explanatory note and the remaining 41 carry only a name and a default. That gap is stated here rather than papered over, and the last column of the table above is the number of documented variables per group.
For an undocumented variable there are two ways to work it out. One is the group it sits in, which already says which subsystem it belongs to. The other is searching the open-source repository for the name: it is usually read in only one or two places, and reading that usage beats guessing from the name.
Guessing from the literal name is not advisable. The same word can mean different things across groups - a variable with limit in its name may cap concurrency in one group and request size in another, and tuning the wrong one has entirely different consequences.
Version differences and expiry
The 136 variables here come from the v4.16.2 configuration template. Templates gain and lose variables between versions and change defaults, so comparing the two templates before an upgrade is worth the few minutes - especially looking for new variables with no default, since those stop the service from starting. Variables already edited are not overwritten on upgrade, but new ones do not appear in an existing configuration file by themselves.
Keep reading
Parameters and rules on this page are taken from the FastGPT open-source repository at v4.16.2, verified 2026-09-09.