Your AI gateway crashed. Again. Here's the permanent fix.
AI gateway crashes are frustrating—but they're also predictable and preventable. openclaw-cli automatically detects when your gateway crashes and restarts it within seconds, so you never have to manually troubleshoot again.
First, install the OpenClaw CLI tool globally on your machine.
npm install -g openclaw-cliOr via Homebrew on macOS:
brew tap Sobranier/openclaw
brew install openclaw-cliVerify your current gateway status with a single command.
openclaw statusThis shows whether your gateway is running, which port it's on, and connected alert channels.
Start the watchdog to automatically monitor your gateway for crashes.
openclaw watchThe watchdog runs in the foreground and will auto-restart your gateway if it crashes. Press Ctrl+C to stop it.
For production use, run the watchdog as a background service that starts on boot.
openclaw startThis installs a launchd service (macOS) or systemd service (Linux) that keeps monitoring even after you log out.
openclaw status to check, then openclaw watch to start monitoring. The watchdog will auto-restart it.
sudo openclaw start or use npm instead: npm install -g openclaw-cli.
node --version and update if needed.
lsof -i :18789 and kill the process, or configure openclaw to use a different port.
Install openclaw-cli and let it handle the heavy lifting.
Download OpenClaw CLI →openclaw config set alerts.telegram YOUR_BOT_TOKEN to get started.