仪表盘(Dashboard)
Gateway 仪表盘是默认在 / 路径提供的浏览器 Control UI(可通过 gateway.controlUi.basePath 覆盖)。
快速打开(本地 Gateway):
http://127.0.0.1:18789/(或http://localhost:18789/)
关键参考资料:
- Control UI — 使用方法和 UI 功能。
- Tailscale — Serve/Funnel 自动化。
- Web 界面 — 绑定模式和安全须知。
认证在 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 - 未配置 token:
openclaw doctor --generate-gateway-token
- 明文配置:
- 在仪表盘设置中,将 token 粘贴到认证字段,然后连接。
