{
  "title": "Quit OpenClaw.app (⌘Q), then reopen:",
  "content": "open /path/to/OpenClaw.app\nxml theme={null}\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n    <key>Label</key>\n    <string>bot.molt.ssh-tunnel</string>\n    <key>ProgramArguments</key>\n    <array>\n        <string>/usr/bin/ssh</string>\n        <string>-N</string>\n        <string>remote-gateway</string>\n    </array>\n    <key>KeepAlive</key>\n    <true/>\n    <key>RunAtLoad</key>\n    <true/>\n</dict>\n</plist>\nbash theme={null}\nlaunchctl bootstrap gui/$UID ~/Library/LaunchAgents/bot.molt.ssh-tunnel.plist\nbash theme={null}\nps aux | grep \"ssh -N remote-gateway\" | grep -v grep\nlsof -i :18789\nbash theme={null}\nlaunchctl kickstart -k gui/$UID/bot.molt.ssh-tunnel\nbash theme={null}\nlaunchctl bootout gui/$UID/bot.molt.ssh-tunnel\n```\n\n| Component                            | What It Does                                                 |\n| ------------------------------------ | ------------------------------------------------------------ |\n| `LocalForward 18789 127.0.0.1:18789` | Forwards local port 18789 to remote port 18789               |\n| `ssh -N`                             | SSH without executing remote commands (just port forwarding) |\n| `KeepAlive`                          | Automatically restarts tunnel if it crashes                  |\n| `RunAtLoad`                          | Starts tunnel when the agent loads                           |\n\nOpenClaw\\.app connects to `ws://127.0.0.1:18789` on your client machine. The SSH tunnel forwards that connection to port 18789 on the remote machine where the Gateway is running.",
  "code_samples": [
    {
      "code": "The app will now connect to the remote gateway through the SSH tunnel.\n\n***\n\n## Auto-Start Tunnel on Login\n\nTo have the SSH tunnel start automatically when you log in, create a Launch Agent.\n\n### Create the PLIST file\n\nSave this as `~/Library/LaunchAgents/bot.molt.ssh-tunnel.plist`:",
      "language": "unknown"
    },
    {
      "code": "### Load the Launch Agent",
      "language": "unknown"
    },
    {
      "code": "The tunnel will now:\n\n* Start automatically when you log in\n* Restart if it crashes\n* Keep running in the background\n\nLegacy note: remove any leftover `com.openclaw.ssh-tunnel` LaunchAgent if present.\n\n***\n\n## Troubleshooting\n\n**Check if tunnel is running:**",
      "language": "unknown"
    },
    {
      "code": "**Restart the tunnel:**",
      "language": "unknown"
    },
    {
      "code": "**Stop the tunnel:**",
      "language": "unknown"
    }
  ],
  "headings": [
    {
      "level": "h2",
      "text": "Auto-Start Tunnel on Login",
      "id": "auto-start-tunnel-on-login"
    },
    {
      "level": "h3",
      "text": "Create the PLIST file",
      "id": "create-the-plist-file"
    },
    {
      "level": "h3",
      "text": "Load the Launch Agent",
      "id": "load-the-launch-agent"
    },
    {
      "level": "h2",
      "text": "Troubleshooting",
      "id": "troubleshooting"
    },
    {
      "level": "h2",
      "text": "How It Works",
      "id": "how-it-works"
    }
  ],
  "url": "llms-txt#quit-openclaw.app-(⌘q),-then-reopen:",
  "links": []
}