Deployment and upgradesOfficial documentation11 min readDeployment and upgrades

Configure FastGPT Shared App Databases, Cache, and Vector Stores

This reference covers environment variables for configuring shared application storage, cache, and vector database systems for self-hosted FastGPT deploym…

Overview

This reference covers environment variables for configuring shared application storage, cache, and vector database systems for self-hosted FastGPT deployments. These settings define connectivity to core data layers and operational thresholds for streaming session tracking.

Core Storage Parameter Table

VariableDefaultDescription
REDIS_URLredis://default:mypassword@localhost:6379Redis connection URL.
STREAM_RESUME_TTL_SECONDS300TTL for an active stream resume mirror, in seconds.
STREAM_RESUME_POST_COMPLETE_TTL_SECONDS30Shortened TTL after a stream completes, in seconds.
STREAM_RESUME_REDIS_MAXMEMORY_RATIO0.5When Redis used memory divided by maxmemory reaches this ratio, new stream resume mirrors are skipped.
STREAM_RESUME_REDIS_MEMORY_CHECK_INTERVAL_MS5000Redis memory watermark cache duration, in milliseconds.
MONGODB_URILocal MongoDB example URLMain business MongoDB connection URL.
MONGODB_LOG_URISame example as MONGODB_URIMongoDB connection URL for logs. If unset, it can reuse the main database.
VECTOR_VQ_LEVEL32Vector quantization level. Supported ranges depend on the vector store.
PG_URLEmptyPostgreSQL/pgvector connection URL.
OCEANBASE_URLEmptyOceanBase vector store connection URL.
SEEKDB_URLEmptySeekDB vector store connection URL.
MILVUS_ADDRESSEmptyMilvus/Zilliz address.
MILVUS_TOKENEmptyMilvus/Zilliz access token.
OPENGAUSS_URLEmptyopenGauss vector store connection URL.

Redis Stream Resume Settings

A subset of these variables manages temporary tracking of active and completed streaming sessions using Redis. The default time-to-live (TTL) for active stream resume mirrors is 300 seconds, which is shortened to 30 seconds once a stream completes. To mitigate Redis memory exhaustion, a default memory ratio threshold of 0.5 is applied: when Redis used memory divided by the configured maxmemory reaches this value, new stream resume mirrors are skipped. The system checks Redis memory watermarks every 5000 milliseconds to update this threshold status.

Vector Store and Secondary Database Configuration

This section details variables for connecting to supported vector databases and a dedicated MongoDB instance for logging. The VECTOR_VQ_LEVEL sets the vector quantization level, with supported ranges dependent on the selected vector store. All vector store connection variables default to empty, so they must be explicitly configured when using a dedicated vector database. The MONGODB_LOG_URI can reuse the main MongoDB connection string if a separate log database is not deployed.

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.