← Back to library

AWS 上陷入 doctor/gateway 循环:用分段配置恢复 provider 与模型设置

问题/场景:远程 Ubuntu(EC2)上启动 OpenClaw 后只进入 doctor/gateway 提示循环,无法回到首次 provider/API key 配置。前置:有 SSH 与服务管理权限。实施步骤:先让 gateway 进入稳定运行态,再用 `openclaw configure --section ...` 分段补齐模型与渠道配置,最后做端到端连通验证。关键命令:`openclaw gateway status`、`openclaw configure --section model`。验证:doctor 不再反复提示同一缺失项,聊天请求可正常返回。风险:在生产实例直接覆盖配置可能导致短时不可用。来源:Reddit 案例 + OpenClaw CLI 配置指引交叉整理。

REDDITDiscovered 2026-02-20Author u/exvelez87
Prerequisites
  • You can SSH into the host and restart OpenClaw gateway service.
  • Model provider credentials are ready (OpenAI/Anthropic/Moonshot, etc.).
Steps
  1. Run diagnostics first (`openclaw doctor`) but do not auto-accept destructive/unclear fixes.
  2. Stabilize service state: check `openclaw gateway status`; if stopped/failed, restart and confirm it stays running for at least one cycle.
  3. Re-enter configuration in sections: model/provider first, then channels (for example `openclaw configure --section model`, `openclaw configure --section channels`).
  4. Re-run doctor and verify previous warnings (provider unset / gateway loop) are cleared or reduced to non-blocking items.
  5. Send a real channel test message and confirm end-to-end request→response path works.
Commands
openclaw doctor
openclaw gateway status
openclaw gateway restart
openclaw configure --section model
openclaw configure --section channels
Verify

`openclaw doctor` no longer loops on the same setup prompt, and at least one configured channel can complete a round-trip reply.

Caveats
  • Exact section names can vary by CLI version; verify with `openclaw help` first(需验证).
  • Avoid editing production config blindly over SSH without backup/rollback plan.
Source attribution

This tip is aggregated from community/public sources and preserved with attribution.

Open original source ↗
Visit original post