Install
openclaw skills install gateway-watchdog-v2Production-grade bash watchdog for the OpenClaw gateway. Runs via launchd every 5 minutes. Handles boot grace periods, progressive retry with backoff, port-level fallback checks, stale PID detection, and restart cooldowns — preventing restart loops while keeping the gateway reliably alive.
openclaw skills install gateway-watchdog-v2Keeps the OpenClaw gateway alive without killing it during startup. Five defensive layers prevent false restarts and restart loops.
http://127.0.0.1:18789; exits immediately if the gateway respondsLogs go to ~/.openclaw/logs/watchdog.log.
Create ~/Library/LaunchAgents/com.openclaw.gateway-watchdog.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.openclaw.gateway-watchdog</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/path/to/skills/gateway-watchdog/scripts/gateway-watchdog.sh</string>
</array>
<key>StartInterval</key>
<integer>300</integer>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
Then load it:
launchctl load ~/Library/LaunchAgents/com.openclaw.gateway-watchdog.plist
bash scripts/gateway-watchdog.sh
launchctl, lsof, date -j)curl in PATHlaunchd as ai.openclaw.gateway