Bug
openclaw gateway start crashes on a fresh Ubuntu 24.04 EC2 instance because systemctl --user is-enabled openclaw-gateway.service returns a non-zero exit code for both not-found and disabled states.
Environment
- OS: Ubuntu 24.04.3 LTS (Noble Numbat) on EC2
- OpenClaw: 2026.3.2 (85377a2)
- Node: v22
Steps to Reproduce
- Fresh Ubuntu 24.04 EC2 instance
- Install OpenClaw via
openclaw setup
- Run
openclaw gateway start
Error
Gateway service check failed: Error: systemctl is-enabled unavailable: Command failed: systemctl --user is-enabled openclaw-gateway.service
Root Cause
systemctl --user is-enabled returns:
- Exit code 1 for
disabled
- Exit code 1 for
not-found
The gateway start command treats any non-zero exit code as a hard failure instead of handling these expected states.
Workaround
Manually create and enable a stub service unit before running openclaw gateway start:
mkdir -p ~/.config/systemd/user
cat > ~/.config/systemd/user/openclaw-gateway.service << EOF
[Unit]
Description=OpenClaw Gateway
[Service]
ExecStart=/bin/true
Restart=no
[Install]
WantedBy=default.target
EOF
systemctl --user daemon-reload
systemctl --user enable openclaw-gateway.service
openclaw gateway start
Expected Behavior
openclaw gateway start (and setup) should handle not-found and disabled responses from systemctl is-enabled gracefully — these are normal states for a first-time install.
Bug
openclaw gateway startcrashes on a fresh Ubuntu 24.04 EC2 instance becausesystemctl --user is-enabled openclaw-gateway.servicereturns a non-zero exit code for bothnot-foundanddisabledstates.Environment
Steps to Reproduce
openclaw setupopenclaw gateway startError
Root Cause
systemctl --user is-enabledreturns:disablednot-foundThe gateway start command treats any non-zero exit code as a hard failure instead of handling these expected states.
Workaround
Manually create and enable a stub service unit before running
openclaw gateway start:Expected Behavior
openclaw gateway start(andsetup) should handlenot-foundanddisabledresponses fromsystemctl is-enabledgracefully — these are normal states for a first-time install.