OpenClaw 安装部署
OpenClaw 是开源 AI Gateway,将 WhatsApp、Telegram、Discord 等聊天应用连接到 AI 编程助手。官方文档
1
环境要求
Node.js>= 18.0
Git任意版本
操作系统macOS / Linux / Windows (WSL2)
2
安装 OpenClaw
克隆仓库
git clone https://github.com/openclaw-ai/openclaw.git进入目录
cd openclaw安装依赖
npm install3
配置 Gateway
复制配置文件
cp config.example.json ~/.openclaw/openclaw.json编辑配置(填入 API Key 等)
nano ~/.openclaw/openclaw.json4
启动服务
启动 Gateway
npm start或后台运行
npm start -- --daemon5
安装 Skills(可选)
安装指定 skill
clawhub install <skill-slug>更新所有 skills
clawhub update --all常见问题
Q: 启动后无法连接聊天平台?
A: 检查 ~/.openclaw/openclaw.json 中对应平台的 token 是否正确,并确认 Bot 已在平台侧授权。
Q: Skills 安装后不生效?
A: Skills 在下一个 session 开始时生效,重启 Gateway 或开启新会话即可。
Q: 如何升级 OpenClaw?
A: 执行 git pull && npm install 后重启服务即可。