Dashboard (Control UI)

Gateway dashboard 是浏览器控制界面,默认在 / 路径提供服务(可通过 gateway.controlUi.basePath 覆盖)。

快速打开(本地 Gateway):

相关参考:

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

安全提示:Control UI 是管理界面(聊天、配置、执行审批)。不要公开暴露它。界面会在首次加载后将 token 存储在 localStorage 中。建议使用 localhost、Tailscale Serve 或 SSH 隧道。

快速访问(推荐)

  • 完成引导后,CLI 会自动打开 dashboard 并附带你的 token,同时打印相同的带 token 链接。
  • 随时重新打开:openclaw dashboard(复制链接,如果可能会打开浏览器,无界面环境会显示 SSH 提示)。
  • Token 保持本地(仅作为查询参数);界面会在首次加载后移除它并保存到 localStorage。

Token 基础(本地 vs 远程)

  • Localhost:打开 http://127.0.0.1:18789/。如果看到 “unauthorized”,运行 openclaw dashboard 并使用带 token 的链接(?token=...)。
  • Token 来源gateway.auth.token(或 OPENCLAW_GATEWAY_TOKEN);界面会在首次加载后存储它。
  • 非 localhost:使用 Tailscale Serve(如果 gateway.auth.allowTailscale: true 则无需 token)、带 token 的 tailnet 绑定,或 SSH 隧道。详见 Web surfaces

如果看到 “unauthorized” / 1008

  • 运行 openclaw dashboard 获取新的带 token 链接。
  • 确保 gateway 可访问(本地:openclaw status;远程:SSH 隧道 ssh -N -L 18789:127.0.0.1:18789 user@host 然后打开 http://127.0.0.1:18789/?token=...)。
  • 在 dashboard 设置中,粘贴你在 gateway.auth.token(或 OPENCLAW_GATEWAY_TOKEN)中配置的相同 token。