solution gateway high linux
Linux: gateway doesn't stay running (systemd service not installed)
If the gateway only runs in the foreground or stops after you close SSH, install/repair the systemd service and enable user lingering.
By CoClaw Team •
Error signatures: systemctl --user | openclaw-gateway.service
Symptoms
- The gateway works while the terminal is open, but stops when you exit (or after SSH disconnects).
systemctl --user status openclaw-gateway.servicesays the unit does not exist.openclaw gateway statusshows not running after reboot.
Cause
The gateway is running in the foreground, but the systemd (user) service was not installed/enabled (or it points at an old OpenClaw install path).
Fix
1) Install (or reinstall) the gateway service
On the gateway host:
openclaw gateway install
If you recently switched install methods (npm ↔ git) or profiles, force a rewrite:
openclaw gateway install --force
2) Check the service status
systemctl --user status openclaw-gateway.service
Restart if needed:
systemctl --user restart openclaw-gateway.service
3) Keep the gateway running after logout (recommended on servers)
Enable systemd user lingering:
loginctl enable-linger "$USER"
Verify
openclaw gateway statusshows running.- After logging out and back in (or after reboot), the gateway is still running.