Deployment and upgradesOfficial documentation7 min readDeployment and upgrades

Configure Alibaba Cloud OSS for FastGPT Self-Hosting

Prerequisites and Bucket Setup Before deploying configuration variables, you must provision two Alibaba Cloud OSS buckets: one public read bucket and one…

Prerequisites and Bucket Setup

Before deploying configuration variables, you must provision two Alibaba Cloud OSS buckets: one public read bucket and one private bucket. Assign public-read permissions to the public bucket, and retain default private permissions for the private bucket. You may use the same Alibaba Cloud Access Key ID and Secret Access Key pair for both buckets, but the bucket names must be distinct. For cross-origin resource sharing (CORS) setup required to allow frontend access to public bucket assets, refer to the official Alibaba Cloud OSS CORS configuration guide.

Environment Variable Reference

All required and optional configuration parameters are defined via environment variables. Use the table below to map your OSS setup to the correct variables:

Environment VariableDescriptionDefault ValueExample
STORAGE_VENDORRequired: Sets the object storage provider to Alibaba Cloud OSSN/Aoss
STORAGE_REGIONRequired: OSS region identifierN/Aoss-cn-hangzhou
STORAGE_ACCESS_KEY_IDRequired: Alibaba Cloud Access Key IDN/Ayour_access_key
STORAGE_SECRET_ACCESS_KEYRequired: Alibaba Cloud Secret Access KeyN/Ayour_secret_key
STORAGE_PUBLIC_BUCKETRequired: Name of the public read OSS bucketN/Afastgpt-public
STORAGE_PRIVATE_BUCKETRequired: Name of the private OSS bucketN/Afastgpt-private
STORAGE_OSS_ENDPOINTOSS hostname; use custom domain if STORAGE_OSS_CNAME is enabled{region}.aliyuncs.comoss-cn-hangzhou.aliyuncs.com or your-domain.com
STORAGE_OSS_CNAMEToggles usage of a custom domain for OSS accessfalsetrue or false
STORAGE_OSS_SECUREEnables TLS encryption; disable if your custom domain has no SSL certificatefalsetrue or false
STORAGE_OSS_INTERNALOptional: Use Alibaba Cloud internal network to reduce bandwidth costsdisabledtrue or false

Full Configuration Example

A complete set of environment variables for a standard OSS setup is shown below:

STORAGE_VENDOR=oss
STORAGE_REGION=oss-cn-hangzhou
STORAGE_ACCESS_KEY_ID=your_access_key
STORAGE_SECRET_ACCESS_KEY=your_secret_key
STORAGE_PUBLIC_BUCKET=fastgpt-public
STORAGE_PRIVATE_BUCKET=fastgpt-private
STORAGE_OSS_ENDPOINT=oss-cn-hangzhou.aliyuncs.com
STORAGE_OSS_CNAME=false
STORAGE_OSS_SECURE=false
STORAGE_OSS_INTERNAL=false

Optional Internal Network Configuration

The STORAGE_OSS_INTERNAL parameter is intended for deployments hosted within Alibaba Cloud infrastructure. Enabling this flag routes all OSS traffic through Alibaba Cloud’s internal network, which eliminates public network bandwidth fees and reduces latency.

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.