← Back to Troubleshoot

Port 18789 Already in Use

Error: listen EADDRINUSE: address already in use :::18789

OpenClaw troubleshooting · Updated 2026

Error Message

Error: listen EADDRINUSE: address already in use :::18789

What Causes This

Another process is using port 18789. This is often a previous OpenClaw gateway that didn't shut down cleanly, or another service bound to the same port.

How to Fix It

Find what's using the port and stop it:

# Find the process
lsof -i :18789
# or on Linux:
ss -tlnp | grep 18789

# Kill it
kill -9 <PID>

# Restart OpenClaw
openclaw gateway restart

If this happens after every reboot, a stale PID file at ~/.openclaw/gateway.pid may be the cause. Delete it: rm ~/.openclaw/gateway.pid then restart. Alternatively, change the port: openclaw config set gateway.port 18790.

See Also