网关 CLI
网关是 OpenClaw 的 WebSocket 服务器(支持频道、节点、会话、钩子)。运行网关
参数选项
--port <port>:WebSocket 端口(默认18789)--bind <loopback|lan|tailnet|auto|custom>:监听绑定模式--auth <token|password>:认证模式覆盖--token <token>:token 覆盖--password <password>:密码覆盖--tailscale <off|serve|funnel>:通过 Tailscale 暴露网关--allow-unconfigured:允许无gateway.mode=local配置启动--force:启动前杀死指定端口上已有监听进程--verbose:启用详细日志
查询运行中的网关
gateway health
gateway status
--url <url>:覆盖探测 URL--token <token>:探测时的令牌认证--password <password>:探测时的密码认证--timeout <ms>:探测超时--no-probe:跳过 RPC 探测--deep:扫描系统级服务
gateway probe
gateway call <method>
低级 RPC 辅助命令。
管理网关服务
发现网关 (Bonjour)
gateway discover
--timeout <ms>:单次命令超时(默认2000毫秒)--json:机器可读输出