仪表板(Control UI)

Gateway 仪表板是浏览器中的 Control UI,默认从 / 提供服务(可使用 gateway.controlUi.basePath 覆盖)。

快速打开(本地 Gateway):

关键参考:

认证在 WebSocket 握手时通过 connect.params.auth(token 或密码)强制执行。参见 Gateway 配置 中的 gateway.auth

安全说明:Control UI 是一个管理界面(聊天、配置、exec 批准)。不要公开暴露它。UI 在首次加载后将 token 存储在 localStorage 中。优先使用 localhost、Tailscale Serve 或 SSH 隧道。

快速路径(推荐)

  • onboarding 后,CLI 自动打开仪表板并打印一个干净的(非 token 化)链接。
  • 随时重新打开:openclaw dashboard(复制链接,如果可能则打开浏览器,如果是无头模式则显示 SSH 提示)。
  • 如果 UI 提示需要认证,请在 gateway.auth.token(或 OPENCLAW_GATEWAY_TOKEN)中获取 token 粘贴到 Control UI 设置中。

Token 基础(本地 vs 远程)

  • localhost:打开 http://127.0.0.1:18789/
  • Token 来源gateway.auth.token(或 OPENCLAW_GATEWAY_TOKEN);连接后 UI 会在 localStorage 中存储一份副本。
  • 非 localhost:使用 Tailscale Serve(如 gateway.auth.allowTailscale: true,Control UI/WebSocket 无需 token,假设可信的 gateway 主机;HTTP API 仍需 token/密码)、带 token 的 tailnet 绑定,或 SSH 隧道。参见 Web 界面

如果看到”未授权”/1008

  • 确保 gateway 可达(本地:openclaw status;远程:SSH 隧道 ssh -N -L 18789:127.0.0.1:18789 user@host 然后打开 http://127.0.0.1:18789/)。
  • 在 gateway 主机获取 token:openclaw config get gateway.auth.token(或生成一个:openclaw doctor --generate-gateway-token)。
  • 在仪表板设置中,将 token 粘贴到认证字段,然后连接。