Skip to content
广告 · 本站推荐广告

仪表盘(Dashboard)

Gateway 仪表盘是默认在 / 路径提供的浏览器 Control UI(可通过 gateway.controlUi.basePath 覆盖)。

快速打开(本地 Gateway):

  • http://127.0.0.1:18789/(或 http://localhost:18789/

关键参考资料:

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

安全提示

Control UI 是一个管理界面(聊天、配置、执行审批)。请勿将其公开暴露。UI 在首次加载后将 token 存储在 localStorage 中。建议使用 localhost、Tailscale Serve 或 SSH 隧道。

快速路径(推荐)

  • 安装向导完成后,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 中。
  • 如果 gateway.auth.token 由 SecretRef 管理,openclaw dashboard 按设计打印/复制/打开非 token 化的 URL。这避免了在 shell 日志、剪贴板历史或浏览器启动参数中暴露外部管理的 token。
  • 如果 gateway.auth.token 配置为 SecretRef 且在当前 shell 中未解析,openclaw dashboard 仍会打印非 token 化的 URL 并附带可操作的认证设置指导。
  • 非本地访问:使用 Tailscale Serve(当 gateway.auth.allowTailscale: true 时,Control UI/WebSocket 无需 token,假设 gateway 主机受信任;HTTP API 仍需要 token/密码)、tailnet 绑定 + token,或 SSH 隧道。参阅 Web 界面

如果你看到 "unauthorized" / 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
    • SecretRef 管理的配置:解析外部密钥提供者或在此 shell 中导出 OPENCLAW_GATEWAY_TOKEN,然后重新运行 openclaw dashboard
    • 未配置 tokenopenclaw doctor --generate-gateway-token
  • 在仪表盘设置中,将 token 粘贴到认证字段,然后连接。

基于MIT协议开源 | 内容翻译自 官方文档,同步更新