docs: object storage

This commit is contained in:
xqvvu 2025-12-22 17:35:10 +08:00
parent 93e8372ff5
commit 2ac8784215
No known key found for this signature in database
GPG Key ID: 8CDDE20C9D911EE4
5 changed files with 55 additions and 12 deletions

View File

@ -8,6 +8,7 @@
"intro",
"docker",
"configuration",
"object-storage",
"faq",
"signoz",
"modelConfig",

View File

@ -0,0 +1,51 @@
---
title: 对象存储配置及常见问题
description: 如何通过环境变量配置并连接个各厂商的对象存储,以及常见的配置问题
---
import { Alert } from '@/components/docs/Alert';
import FastGPTLink from '@/components/docs/linkFastGPT';
## 对象存储服务配置介绍
这里提供了 FastGPT 目前支持的对象存储厂商,包括自部署的 MinIO、AWS S3、阿里云 OSS 和腾讯云 COS 的环境变量配置说明
### 通用且必需的环境变量
> - 不支持对临时身份校验密钥的支持,比如 STS 等,请自行保证服务的安全性。
> - 不支持对私有桶的复用,如果把私有桶名和公开桶名设置为同一个的话,请保证存储桶的策略至少为【公开读私有写】
- `STORAGE_VENDOR` 该变量为一个枚举值,可选值为:`minio`、`aws-s3`、`oss` 和 `cos`。
- `STORAGE_REGION` 提供的对象存储服务所在的地区如 `us-east-1` 等,具体请根据服务厂商所提供的地区来填写;如果是自部署的 MinIO 等服务这个值可随意填写。
- `STORAGE_ACCESS_KEY_ID` 服务访问密钥的 Access Key ID
- `STORAGE_SECRET_ACCESS_KEY` 服务访问密钥的 Secret Access Key
- `STORAGE_PUBLIC_BUCKET` FastGPT 公开资源存储桶桶名
- `STORAGE_PRIVATE_BUCKET` FastGPT 私有资源存储桶桶名
### 自部署的 MinIO 和 AWS S3
> MinIO 这类产品对 AWS S3 协议支持比较完整,因此使用 Minio 和AWS S3 配置几乎可以是相同的,只是因为服务商提供和自部署的区别,会有额外的配置。
> 因此理论上任何对 AWS S3 协议的支持程度至少和 MinIO 相当的对象存储服务都可以使用,比如 SeaweedFS、RustFS 等。
- `STORAGE_S3_ENDPOINT` 连接端点,填写一个完整的、带协议和端口的主机名,比如 `http://localhost:9000`
- `STORAGE_EXTERNAL_ENDPOINT` 【可选】如果是自己部署的对象存储服务(如 Docker 部署 MinIO且前端无法访问到你的对象存储服务时请填写该变量并保证是一个外部可访问的域名比如 `https://your-domain.com` 或者 `http://{ip}:9000` 等
- `STORAGE_S3_FORCE_PATH_STYLE` 【可选】虚拟主机风格路由或路径路由风格,其中如果厂商填写了 `minio` 的话,该值被固定为 `true`
- `STORAGE_S3_MAX_RETRIES` 【可选】请求最大尝试次数,默认为 3 次
### 阿里云 OSS
> [跨域配置](https://help.aliyun.com/zh/oss/user-guide/configure-cross-origin-resource-sharing/?spm=5176.8466032.console-base_help.dexternal.1bcd1450Wau6J6#b58400ec36rqf)
- `STORAGE_OSS_ENDPOINT` 阿里云对象存储连接主机名,厂商提供的默认值一般都是 `{地区}.aliyuncs.com`,如 `oss-cn-hangzhou.aliyuncs.com`;注意,如果配置了自定义域名的话也填在这里,比如 `your-domain.com`
- `STORAGE_OSS_CNAME` 是否开启自定义域名
- `STORAGE_OSS_SECURE` 是否开启了 TLS如果域名没有认证证书的话请关闭该选项
- `STORAGE_OSS_INTERNAL` 【可选】是否开启内网访问,如果你的服务也在阿里云的话可以开启并节省流量,默认关闭
### 腾讯云 COS
> [跨域配置](https://cloud.tencent.com/document/product/436/13318)
- `STORAGE_COS_PROTOCOL` 枚举可选值 `https:`、`http:`,注意不要忘记 `:`;如果自定义域名没有上传证书的话,请不要设置为 `https:`
- `STORAGE_COS_USE_ACCELERATE` 【可选】是否启用全球加速域名,默认为 false。若改为 true需要存储桶开启全球加速功能
- `STORAGE_COS_CNAME_DOMAIN` 【可选】自定义域名,如 `your-domain.com`
- `STORAGE_COS_PROXY` 【可选】代理服务器,如 `http://localhost:7897`

View File

@ -33,6 +33,7 @@ description: FastGPT 文档目录
- [/docs/introduction/development/modelConfig/one-api](/docs/introduction/development/modelConfig/one-api)
- [/docs/introduction/development/modelConfig/ppio](/docs/introduction/development/modelConfig/ppio)
- [/docs/introduction/development/modelConfig/siliconCloud](/docs/introduction/development/modelConfig/siliconCloud)
- [/docs/introduction/development/object-storage](/docs/introduction/development/object-storage)
- [/docs/introduction/development/openapi/app](/docs/introduction/development/openapi/app)
- [/docs/introduction/development/openapi/chat](/docs/introduction/development/openapi/chat)
- [/docs/introduction/development/openapi/dataset](/docs/introduction/development/openapi/dataset)

View File

@ -120,7 +120,7 @@
"document/content/docs/upgrading/4-14/4142.mdx": "2025-11-18T19:27:14+08:00",
"document/content/docs/upgrading/4-14/4143.mdx": "2025-11-26T20:52:05+08:00",
"document/content/docs/upgrading/4-14/4144.mdx": "2025-12-16T14:56:04+08:00",
"document/content/docs/upgrading/4-14/4145.mdx": "2025-12-21T19:15:10+08:00",
"document/content/docs/upgrading/4-14/4145.mdx": "2025-12-21T23:28:19+08:00",
"document/content/docs/upgrading/4-8/40.mdx": "2025-08-02T19:38:37+08:00",
"document/content/docs/upgrading/4-8/41.mdx": "2025-08-02T19:38:37+08:00",
"document/content/docs/upgrading/4-8/42.mdx": "2025-08-02T19:38:37+08:00",

View File

@ -2543,7 +2543,6 @@
"integrity": "sha512-AwAfQ2Wa5bCx9WP8nZL2uMZWod7J7/JSplxbTmBQ5ms6QpqNYm672H0Vu9ZVKVngQ+ii4R/byguVEUZQyeg44g==",
"devOptional": true,
"license": "MIT",
"peer": true,
"dependencies": {
"csstype": "^3.0.2"
}
@ -2554,7 +2553,6 @@
"integrity": "sha512-4hOiT/dwO8Ko0gV1m/TJZYk3y0KBnY9vzDh7W+DH17b2HFSOGgdj33dhihPeuy3l0q23+4e+hoXHV6hCC4dCXw==",
"devOptional": true,
"license": "MIT",
"peer": true,
"peerDependencies": {
"@types/react": "^19.0.0"
}
@ -2576,7 +2574,6 @@
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"license": "MIT",
"peer": true,
"bin": {
"acorn": "bin/acorn"
},
@ -3244,7 +3241,6 @@
"resolved": "https://registry.npmjs.org/fumadocs-core/-/fumadocs-core-15.6.3.tgz",
"integrity": "sha512-71IPC6Y0ZLPHlavYormnF1r2uX/lNrTFTYCEh6Akll8hWxRNbKG9Hk4xpFJDTkU83c8eLtHk2iow/ccQkcV6Hw==",
"license": "MIT",
"peer": true,
"dependencies": {
"@formatjs/intl-localematcher": "^0.6.1",
"@orama/orama": "^3.1.9",
@ -5177,7 +5173,6 @@
"resolved": "https://registry.npmjs.org/next/-/next-15.5.9.tgz",
"integrity": "sha512-agNLK89seZEtC5zUHwtut0+tNrc0Xw4FT/Dg+B/VLEo9pAcS9rtTKpek3V6kVcVwsB2YlqMaHdfZL4eLEVYuCg==",
"license": "MIT",
"peer": true,
"dependencies": {
"@next/env": "15.5.9",
"@swc/helpers": "0.5.15",
@ -5353,7 +5348,6 @@
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz",
"integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==",
"license": "MIT",
"peer": true,
"engines": {
"node": ">=12"
},
@ -5469,7 +5463,6 @@
"resolved": "https://registry.npmjs.org/react/-/react-19.1.0.tgz",
"integrity": "sha512-FS+XFBNvn3GTAWq26joslQgWNoFu08F4kl0J4CgdNKADkdSGXQyTCnKteIAJy96Br6YbpEU1LSzV5dYtjMkMDg==",
"license": "MIT",
"peer": true,
"engines": {
"node": ">=0.10.0"
}
@ -5479,7 +5472,6 @@
"resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.1.0.tgz",
"integrity": "sha512-Xs1hdnE+DyKgeHJeJznQmYMIBG3TKIHJJT95Q58nHLSrElKlGQqDTR2HQ9fx5CN/Gk6Vh/kupBTDLU11/nDk/g==",
"license": "MIT",
"peer": true,
"dependencies": {
"scheduler": "^0.26.0"
},
@ -6101,8 +6093,7 @@
"resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.1.11.tgz",
"integrity": "sha512-2E9TBm6MDD/xKYe+dvJZAmg3yxIEDNRc0jwlNyDg/4Fil2QcSLjFKGVff0lAf1jjeaArlG/M75Ey/EYr/OJtBA==",
"devOptional": true,
"license": "MIT",
"peer": true
"license": "MIT"
},
"node_modules/tapable": {
"version": "2.2.2",
@ -6198,7 +6189,6 @@
"integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",
"dev": true,
"license": "Apache-2.0",
"peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"