Skip to Content

CodeCraft


部署你的 DeerFlow

前置条件

  • Docker 与 Docker Compose
  • Linux 服务器或 VM(推荐)
  • 模型 API Key

步骤

1. 克隆仓库

git clone https://github.com/bytedance/deer-flow.git cd deer-flow

2. 配置文件

cp config.example.yaml config.yaml

编辑 config.yaml 填写模型等配置。

3. 环境变量

cat > .env << EOF OPENAI_API_KEY=sk-your-key-here DEER_FLOW_ROOT=$(pwd) BETTER_AUTH_SECRET=$(openssl rand -base64 32) BETTER_AUTH_URL=https://your-domain.com AUTH_JWT_SECRET=$(openssl rand -hex 32) DEER_FLOW_WORKER_SECRET=$(openssl rand -hex 32) EOF

也可省略后两项,改用 ./scripts/deploy.shbackend/.deer-flow/ 自动生成并持久化密钥。

4. 启动

在仓库根目录:

./scripts/deploy.sh

5. 验证

curl -sf http://localhost:2026/health curl -sf http://localhost:2026/api/models docker compose -p deer-flow -f docker/docker-compose.yaml logs -f

浏览器访问 http://your-server:2026(生产请在 nginx 外再套 TLS)。

生产注意

  • nginx 侧配置 HTTPS
  • 防火墙仅开放必要端口
  • 定期备份 backend/.deer-flow/
  • 多用户建议容器沙箱(AioSandboxProvider

下一步