ECONNREFUSED 127.0.0.1:18789
Error: connect ECONNREFUSED 127.0.0.1:18789
OpenClaw troubleshooting · Updated 2026
Error Message
Error: connect ECONNREFUSED 127.0.0.1:18789
What Causes This
The OpenClaw gateway is not running, or it's bound to a different address. This commonly happens after a reboot when the daemon didn't start, or if the gateway crashed.
How to Fix It
Verify the gateway is running and restart if needed:
# Check status
openclaw gateway status
# If not running, start it
openclaw gateway start
# If it was running but crashed, check logs
openclaw logs --follow
# Reinstall the daemon if it stopped auto-starting
openclaw onboard --install-daemon
On macOS, the LaunchAgent may have been unloaded. Re-enable it: launchctl load ~/Library/LaunchAgents/com.openclaw.gateway.plist. On Linux (systemd), check: systemctl --user status openclaw-gateway.