前置准备
系统要求
- 环境:Windows 10+/macOS 12+/Linux(Ubuntu 22.04),4G 以上内存,无需独立 GPU
- 工具:Docker + Docker Compose、Git(版本 2.40+)
- 密钥:Kimi Code API Key(需实名认证,仅显示一次)
- 辅助:浏览器、IM 工具(用于远程控制)
获取 API Key
- 访问火山方舟控制台注册并实名认证
- 进入「API Key 管理」→「创建 API Key」,保存 Access Key ID 和 Secret
环境依赖
通用安装脚本已适配国内源,避免下载失败:
curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
docker --version && docker compose version
部署流程
拉取源码与构建
官方推荐部署方式,数据本地存储,支持后台运行。
git clone https://ghproxy.com/https://github.com/OpenClawChinese/OpenClaw.git
cd OpenClaw
docker build -t clawdbot:latest .
docker volume create openclaw-data
注意:数据卷 openclaw-data 用于持久化,请勿删除。
配置与启动
初始化配置后设置远程访问 Token 防未授权登录:
docker run --rm -v openclaw-data:/root/.openclaw clawdbot:latest openclaw setup
docker run --rm -v openclaw-data:/root/.openclaw clawdbot:latest openclaw config set gateway.bind lan
docker run --rm -v openclaw-data:/root/.openclaw clawdbot:latest openclaw config set gateway.auth.token 你的自定义密码
创建 docker-compose.yml 文件:
version: '3.8'
services:
openclaw:
image: clawdbot:latest
container_name: openclaw-kimi
ports:
- "18789:18789"
volumes:
- openclaw-data:/root/.openclaw
restart:


