OpenClaw's gateway start command is designed for traditional Linux servers. It tries to register as a systemd service via D-Bus, create a PID file, and daemonize itself. None of this works in a proot environment — there's no systemd, no D-Bus daemon, no init system at all.
Running gateway start inside proot fails immediately with errors about missing D-Bus socket and systemd registration failures. The gateway never actually starts.
Use gateway run instead of gateway start. This runs the gateway in foreground mode, bypassing all process management. Disable D-Bus to prevent socket connection attempts:
# Disable D-Bus (no systemd/session bus available)
export DBUS_SESSION_BUS_ADDRESS=disabled:
# Set XDG_RUNTIME_DIR (some libraries expect this)
export XDG_RUNTIME_DIR=/tmp
# Run gateway in foreground mode
npx openclaw gateway run --port 9000For the full PocketClaw setup with all environment variables:
# Complete gateway launch command:
export DBUS_SESSION_BUS_ADDRESS=disabled:
export XDG_RUNTIME_DIR=/tmp
export UV_THREADPOOL_SIZE=1
export NODE_OPTIONS='-r /root/hijack.js --expose-gc --no-warnings --max-old-space-size=112 --max-semi-space-size=2'
export OPENCLAW_NO_RESPAWN=1
npx openclaw gateway run --port 9000The OPENCLAW_NO_RESPAWN=1 variable tells OpenClaw not to spawn child worker processes — on a 1 GB device, a single process is all we can afford.
# Start the gateway and check it's running:
npx openclaw gateway run --port 9000 &
sleep 10
# Check process is running:
pgrep -f "openclaw.*gateway"
# Expected: PID number
# Test API endpoint:
curl -s http://localhost:9000/api/status
# Expected: JSON response with gateway status
# Check no systemd errors in logs:
grep -i "systemd\|dbus" $PREFIX/tmp/openclaw-gateway.log
# Expected: no error linesgateway run runs in the foreground — it will block your terminal. Use setsid (Hack #33) or & to background itDBUS_SESSION_BUS_ADDRESS=disabled: is required by the D-Bus spec — without it, some libraries try to parse it as an addressOPENCLAW_NO_RESPAWN=1 is critical on the Moto E2. Without it, OpenClaw spawns worker processes that each try to allocate their own V8 heap, instantly OOM-killing the device| Metric | Before | After |
|---|---|---|
| gateway start | Fails (no systemd) | N/A |
| gateway run | N/A | Works |
| D-Bus errors | Crash on start | None |
| Process management | systemd (broken) | Manual (setsid + watchdog) |