Gateway on macOS
macOS 上的 Gateway 运行时(外部 launchd 服务)
OpenClaw.app 不再捆绑 Node/Bun 或 Gateway 运行时。macOS 应用
需要''外部''安装 ''openclaw'' CLI,不会作为子进程
启动 Gateway,而是管理每用户 launchd 服务以保持 Gateway
运行(如果已有本地 Gateway 在运行,则附加到它)。
安装 CLI(本地模式必需)
Mac 上需要 Node 22+,然后全局安装 ''openclaw'':
npm install -g openclaw@'<version>'
macOS 应用的安装 CLI按钮通过 npm/pnpm 运行相同的流程(不建议使用 bun 作为 Gateway 运行时)。
Launchd(Gateway 作为 LaunchAgent)
标签:
- ''bot.molt.gateway'' (or ''bot.molt.<profile>''; legacy ''com.openclaw.*'' may remain)
Plist 位置(每用户):
- ''~/Library/LaunchAgents/bot.molt.gateway.plist''
(or ''~/Library/LaunchAgents/bot.molt.<profile>.plist'')
管理器:
- macOS 应用在本地模式下拥有 LaunchAgent 安装/更新权限。
- CLI 也可以安装它:''openclaw gateway install''。
行为:
- "OpenClaw Active" 启用/禁用 LaunchAgent。
- 应用退出不会停止 gateway(launchd 保持其运行)。
- 如果 Gateway 已在配置的端口上运行,应用会附加到
它而不是启动新的。
日志:
- launchd stdout/err:''/tmp/openclaw/openclaw-gateway.log''
版本兼容性
macOS 应用会根据自身版本检查 gateway 版本。如果它们
不兼容,请更新全局 CLI 以匹配应用版本。
冒烟测试
openclaw --version OPENCLAW_SKIP_CHANNELS=1 \ OPENCLAW_SKIP_CANVAS_HOST=1 \ openclaw gateway --port 18999 --bind loopback
然后:
openclaw gateway call health --url ws://127.0.0.1:18999 --timeout 3000