{
  "title": "Gateway on macOS (external launchd)",
  "content": "OpenClaw\\.app no longer bundles Node/Bun or the Gateway runtime. The macOS app\nexpects an **external** `openclaw` CLI install, does not spawn the Gateway as a\nchild process, and manages a per‑user launchd service to keep the Gateway\nrunning (or attaches to an existing local Gateway if one is already running).\n\n## Install the CLI (required for local mode)\n\nYou need Node 22+ on the Mac, then install `openclaw` globally:\n\nThe macOS app’s **Install CLI** button runs the same flow via npm/pnpm (bun not recommended for Gateway runtime).\n\n## Launchd (Gateway as LaunchAgent)\n\n* `bot.molt.gateway` (or `bot.molt.<profile>`; legacy `com.openclaw.*` may remain)\n\nPlist location (per‑user):\n\n* `~/Library/LaunchAgents/bot.molt.gateway.plist`\n  (or `~/Library/LaunchAgents/bot.molt.<profile>.plist`)\n\n* The macOS app owns LaunchAgent install/update in Local mode.\n* The CLI can also install it: `openclaw gateway install`.\n\n* “OpenClaw Active” enables/disables the LaunchAgent.\n* App quit does **not** stop the gateway (launchd keeps it alive).\n* If a Gateway is already running on the configured port, the app attaches to\n  it instead of starting a new one.\n\n* launchd stdout/err: `/tmp/openclaw/openclaw-gateway.log`\n\n## Version compatibility\n\nThe macOS app checks the gateway version against its own version. If they’re\nincompatible, update the global CLI to match the app version.",
  "code_samples": [
    {
      "code": "The macOS app’s **Install CLI** button runs the same flow via npm/pnpm (bun not recommended for Gateway runtime).\n\n## Launchd (Gateway as LaunchAgent)\n\nLabel:\n\n* `bot.molt.gateway` (or `bot.molt.<profile>`; legacy `com.openclaw.*` may remain)\n\nPlist location (per‑user):\n\n* `~/Library/LaunchAgents/bot.molt.gateway.plist`\n  (or `~/Library/LaunchAgents/bot.molt.<profile>.plist`)\n\nManager:\n\n* The macOS app owns LaunchAgent install/update in Local mode.\n* The CLI can also install it: `openclaw gateway install`.\n\nBehavior:\n\n* “OpenClaw Active” enables/disables the LaunchAgent.\n* App quit does **not** stop the gateway (launchd keeps it alive).\n* If a Gateway is already running on the configured port, the app attaches to\n  it instead of starting a new one.\n\nLogging:\n\n* launchd stdout/err: `/tmp/openclaw/openclaw-gateway.log`\n\n## Version compatibility\n\nThe macOS app checks the gateway version against its own version. If they’re\nincompatible, update the global CLI to match the app version.\n\n## Smoke check",
      "language": "unknown"
    },
    {
      "code": "Then:",
      "language": "unknown"
    }
  ],
  "headings": [
    {
      "level": "h2",
      "text": "Install the CLI (required for local mode)",
      "id": "install-the-cli-(required-for-local-mode)"
    },
    {
      "level": "h2",
      "text": "Launchd (Gateway as LaunchAgent)",
      "id": "launchd-(gateway-as-launchagent)"
    },
    {
      "level": "h2",
      "text": "Version compatibility",
      "id": "version-compatibility"
    },
    {
      "level": "h2",
      "text": "Smoke check",
      "id": "smoke-check"
    }
  ],
  "url": "llms-txt#gateway-on-macos-(external-launchd)",
  "links": []
}