Fastgpt Docker Deploy
FastGPT Docker Compose self-hosting deployment workflow.
Install
npx skills add labring/FastGPT --skill fastgpt-docker-deploy -g -a claude-code -y- Repository
- labring/FastGPT30k
- Category
- AI and agents
- Updated
- 3d ago
- License
- See repository
- Context cost
- Lightabout 980 tokens
- Runs scripts
- Yes, review before use
What it does
FastGPT Docker Compose self-hosting deployment workflow. Use when a user asks an AI agent to deploy FastGPT with Docker by referencing /deploy/SKILL.md, including creating an empty fastgpt directory, running the install script in non-interactive mode, starting Docker Compose, monitoring service health, troubleshooting compose issues, and returning the access URL plus root credentials and next steps.
FastGPT Docker 部署
目标
在一台已有终端访问权限的 Linux、macOS 或 Windows WSL 服务器上,通过 FastGPT 官方交互式脚本生成 Docker Compose 配置,启动服务,确认 FastGPT 可访问,最后把访问地址、账号、密码和下一步动作交给用户。
工作边界
- 优先使用官方脚本:
https://doc.fastgpt.cn/deploy/install.sh。 - 默认使用脚本非交互模式:国内镜像源、自动随机密钥、检测到的第一个主 IP、
PostgreSQL + pgvector向量库。 - 不要覆盖用户已有的
docker-compose.yml或数据卷,除非用户明确同意。 - 不要在公开输出里泄露除
root初始登录密码外的服务 Token、数据库密码或应用密钥。 - 如果宿主机已有反向代理、域名或云厂商防火墙,先完成本机部署验证,再提醒用户开放或映射脚本最终输出的宿主机端口。默认 FastGPT/Sandbox Proxy 为
3000/3006,MCP 为3003;仅旧版外部 S3 下载链路还需要开放9000。
部署流程
-
检查运行环境:
docker -v docker compose version curl --version如果 Docker 或 Compose 不存在,先向用户说明缺失项。只有在用户授权安装系统软件时,才安装 Docker。
-
创建空的
fastgpt部署目录:mkdir -p ~/fastgpt cd ~/fastgpt if [ -n "$(ls -A .)" ]; then echo "当前目录非空,请先确认是否继续或改用新的空目录。" exit 1 fi如果目录非空,先读取文件和
docker compose ps判断是否已有部署,不要直接覆盖。让用户确认继续使用当前目录、备份旧文件,或改用新的空目录。 -
下载并运行官方脚本:
curl -fsSL https://doc.fastgpt.cn/deploy/install.sh -o install.sh FASTGPT_NON_INTERACTIVE=true bash install.sh非交互模式会默认选择最新稳定版本、国内镜像源、
PostgreSQL + pgvector、自动随机密钥,并把 MCP 地址设置为检测到的第一个主 IP。还必须提供用户访问地址FASTGPT_FE_DOMAIN;启用 Agent/Skill Sandbox 时,再提供FASTGPT_SANDBOX_PROXY_URL,v4.16 还需要FASTGPT_SANDBOX_PREVIEW_PROXY_URL。当前版本的默认short-proxy下载模式不需要配置外部 S3 地址。如果用户明确给了 MCP 公网域名或固定 IP,用环境变量覆盖 endpoint:
FASTGPT_NON_INTERACTIVE=true \ FASTGPT_MCP_ENDPOINT=https://mcp.example.com:3003 \ bash install.shFASTGPT_S3_ENDPOINT仅用于仍包含STORAGE_EXTERNAL_ENDPOINT的 v4.14 或本地旧版 Compose。

