[Bug]: auto-update can never succeed under systemd — updater is spawned as a child of the gateway it needs to restart
Summary
With update.auto.enabled = true and OpenClaw running as the standard systemd user service (openclaw-gateway.service), the hourly auto-update attempt always fails with:
openclaw update detected it is running inside the gateway process tree.
Gateway PID is an ancestor of this process, so this updater cannot safely stop or restart the gateway that owns it.
Run openclaw update from a shell outside the gateway service, or stop the gateway service first and then update.
Followed by:
auto-update attempt failed {"channel":"stable","version":"2026.5.12","tag":"latest","reason":"non-zero-exit"}
The two behaviors contradict each other:
- The gateway's auto-update scheduler spawns
openclaw update as a child of the gateway process.
openclaw update has a safety check that aborts when the gateway is its ancestor.
Net effect: on every systemd install, auto-update is effectively a no-op and the user silently stays behind. My box has been failing every hour since at least 2026-05-17, stuck on 2026.5.4 while 2026.5.12 is current.
Environment
- OpenClaw
2026.5.4 (325df3e)
- Latest on npm:
2026.5.12
- Service:
systemd --user (openclaw-gateway.service, command node .../dist/index.js gateway --port 18789)
- OS: Linux 6.17.0-1010-azure x64, Node v22.22.2
- Install: global npm (
~/.npm-global/lib/node_modules/openclaw)
- Config:
"update": {
"channel": "stable",
"auto": { "enabled": true, "stableDelayHours": 6, "stableJitterHours": 12 }
}
Reproduction
- Install OpenClaw globally via npm.
- Run it as the systemd user service (
openclaw gateway defaults).
- Leave
update.auto.enabled = true.
- Wait for the auto-update tick (hourly retries after a failed attempt).
- Observe in
/tmp/openclaw/openclaw-YYYY-MM-DD.log:
ERROR "openclaw update detected it is running inside the gateway process tree..."
INFO auto-update attempt failed { reason: "non-zero-exit" }
openclaw --version stays pinned to the installed version; npm view openclaw version is newer.
Expected
Auto-update should be able to complete under the standard systemd install. Options:
- Spawn the updater detached (
setsid / new session, stdio: 'ignore', detached: true, and not parented by the gateway service unit), so it is no longer an ancestor of the updater process. The updater can then ask systemd to restart the unit (systemctl --user restart openclaw-gateway.service) without killing its own parent.
- Or: have the gateway hand off to a tiny external "updater" oneshot unit (e.g.
openclaw-updater.service triggered via systemd-run --user --unit=openclaw-updater ...), so the updater is owned by systemd, not by the gateway, and is free to stop/start the gateway unit.
- Or, at minimum: surface this failure prominently (status card,
openclaw status, dashboard banner) instead of only in the file log, so users notice they're stuck.
Actual
Auto-update silently fails forever. No surface in openclaw gateway status, no user-visible warning, only an hourly error buried in /tmp/openclaw/openclaw-*.log.
Workaround
Run openclaw update from a shell outside the gateway process tree (plain SSH session works), or stop the service first:
systemctl --user stop openclaw-gateway.service
npm install -g openclaw@latest # or: openclaw update
systemctl --user start openclaw-gateway.service
Log excerpt
2026-05-17T10:00:04Z ERROR openclaw update detected it is running inside the gateway process tree.
Gateway PID 781034 is an ancestor of this process...
2026-05-17T10:00:04Z INFO auto-update attempt failed {channel:"stable", version:"2026.5.12", reason:"non-zero-exit"}
(Repeats every hour through to today.)
[Bug]: auto-update can never succeed under systemd — updater is spawned as a child of the gateway it needs to restart
Summary
With
update.auto.enabled = trueand OpenClaw running as the standard systemd user service (openclaw-gateway.service), the hourly auto-update attempt always fails with:Followed by:
The two behaviors contradict each other:
openclaw updateas a child of the gateway process.openclaw updatehas a safety check that aborts when the gateway is its ancestor.Net effect: on every systemd install, auto-update is effectively a no-op and the user silently stays behind. My box has been failing every hour since at least 2026-05-17, stuck on 2026.5.4 while 2026.5.12 is current.
Environment
2026.5.4 (325df3e)2026.5.12systemd --user(openclaw-gateway.service, commandnode .../dist/index.js gateway --port 18789)~/.npm-global/lib/node_modules/openclaw)Reproduction
openclaw gatewaydefaults).update.auto.enabled = true./tmp/openclaw/openclaw-YYYY-MM-DD.log:ERROR"openclaw update detected it is running inside the gateway process tree..."INFOauto-update attempt failed { reason: "non-zero-exit" }openclaw --versionstays pinned to the installed version;npm view openclaw versionis newer.Expected
Auto-update should be able to complete under the standard systemd install. Options:
setsid/ new session,stdio: 'ignore',detached: true, and not parented by the gateway service unit), so it is no longer an ancestor of the updater process. The updater can then ask systemd to restart the unit (systemctl --user restart openclaw-gateway.service) without killing its own parent.openclaw-updater.servicetriggered viasystemd-run --user --unit=openclaw-updater ...), so the updater is owned by systemd, not by the gateway, and is free to stop/start the gateway unit.openclaw status, dashboard banner) instead of only in the file log, so users notice they're stuck.Actual
Auto-update silently fails forever. No surface in
openclaw gateway status, no user-visible warning, only an hourly error buried in/tmp/openclaw/openclaw-*.log.Workaround
Run
openclaw updatefrom a shell outside the gateway process tree (plain SSH session works), or stop the service first:systemctl --user stop openclaw-gateway.service npm install -g openclaw@latest # or: openclaw update systemctl --user start openclaw-gateway.serviceLog excerpt
(Repeats every hour through to today.)