| 现象 | 原因与处理 |
| openclaw: command not found | npm 全局路径未加入 PATH,将全局 bin 目录(或 nvm 的 node/bin)加入 PATH 并 source ~/.bashrc;本机部署时见 6.2 一键脚本部署。 |
| NodeSource 安装 Node 失败(无法连接 deb.nodesource.com) | 国内网络常见。改用本文档 6.2 的一键部署脚本(nvm + 国内镜像)安装 Node 22;或先移除 nodesource.list 再执行该脚本。 |
| Systemd user services are unavailable / 未安装 Gateway 服务 | 以 root 运行时用户级 systemd 不可用。需手动执行 openclaw gateway 启动;长期后台运行见 6.5 root 下 systemd 不可用 配置系统服务。 |
| Health check failed / Gateway: not detected | Gateway 未在运行。先执行 openclaw gateway 或 openclaw gateway --port 18789,再打开控制台链接。 |
| No API key found for provider “anthropic”(或其它 provider) | 未配置大模型 API Key。运行 openclaw onboard 在向导中添加模型并填 Key,或 openclaw agents add main 配置;配置后无需重启 Gateway。 |
| Web 控制台提示 unauthorized: gateway token missing | 访问链接中缺少或填错 Token,使用 openclaw dashboard 重新获取带 Token 的链接。 |
| Gateway 启动失败或卡在 Starting… | 多为模型 apiKey 或 baseUrl 配置错误。执行 openclaw logs --tail 50 查看日志;用 openclaw config view 检查 models 配置;修改后执行 openclaw gateway restart。 |
| 虚拟机内浏览器无法启动 | OpenClaw 默认以无沙箱模式启动 Chrome,配置不当会失败。安装 Chrome:sudo apt install -y google-chrome-stable;编辑 ~/.openclaw/openclaw.json,在 browser 部分配置为:"executablePath": "/usr/bin/google-chrome","args": ["--no-sandbox", "--disable-setuid-sandbox", "--headless=new"];然后 openclaw gateway restart。 |
| Gateway failed to start: gateway.bind=custom requires gateway.customBindHost | 将 Bind Mode 改为 lan(推荐),或在配置中为 gateway.customBindHost 填写 "0.0.0.0" 后重启 Gateway。 |
| 已断开与网关的连接 / pairing required | 从非本机(如 Windows 主机)访问时需设备配对。在虚拟机内执行 openclaw devices list 查看待批准设备,再执行 openclaw devices approve <requestId> 批准后,在浏览器中刷新即可。详见 7.7。 |