macOS上的网关(外部 launchd)
OpenClaw.app 不再内置 Node/Bun 或网关运行时。macOS 应用程序 期望外部安装有openclaw CLI,不会以子进程方式启动 网关,
而是管理每个用户的 launchd 服务以保持网关运行(或者如果本地已有运行的网关,
则附加到现有网关)。
安装 CLI(本地模式必需)
你需要在 Mac 上安装 Node 22+,然后全局安装openclaw:
Launchd(网关作为 LaunchAgent)
标签:ai.openclaw.gateway(或ai.openclaw.<profile>;旧有的com.openclaw.*可能依然保留)
~/Library/LaunchAgents/ai.openclaw.gateway.plist(或~/Library/LaunchAgents/ai.openclaw.<profile>.plist)
- macOS 应用在本地模式下负责安装/更新 LaunchAgent。
- CLI 也可以安装:
openclaw gateway install。
- “OpenClaw Active” 开启/关闭该 LaunchAgent。
- 应用退出不会停止网关(launchd 会保持它运行)。
- 如果配置端口已有网关运行,应用会附加到该网关,而不是启动新的。
- launchd 标准输出/错误日志路径:
/tmp/openclaw/openclaw-gateway.log