部署故障排查
诊断三板斧
bash
openclaw status # 总览
openclaw doctor # 诊断 + 修复建议
openclaw logs -f # 实时日志常见问题
Gateway 启动失败
端口占用:
bash
lsof -i :18789
kill <pid>
openclaw gateway restart配置错误:
bash
openclaw doctor --fixunreachable (missing scope: operator.read)
Gateway 在跑但 auth token 缺少必要 scope:
bash
openclaw gateway auth --scope operator.read
openclaw gateway restartChannel 显示 disconnected
bash
openclaw status
# Telegram:验证 token
openclaw channels add --channel telegram --token "YOUR_TOKEN"
# WhatsApp:重新扫码
openclaw channels login内存不足 (OOM)
bash
# Docker 构建至少需要 2GB
# 如果是 sharp 编译 OOM:
SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g openclaw@latest