openclaw - 💡(How to fix) Fix [Bug]: auto-update can never succeed under systemd — updater is spawned as a child of the gateway it needs to restart

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

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 <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:

  1. The gateway's auto-update scheduler spawns openclaw update as a child of the gateway process.
  2. 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.

Error Message

  • ERROR "openclaw update detected it is running inside the gateway process tree..." 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. 2026-05-17T10:00:04Z ERROR openclaw update detected it is running inside the gateway process tree.

Root Cause

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 <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:

  1. The gateway's auto-update scheduler spawns openclaw update as a child of the gateway process.
  2. 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.

Fix Action

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

Code Example

auto-update attempt failed   {"channel":"stable","version":"2026.5.12","tag":"latest","reason":"non-zero-exit"}

---

"update": {
    "channel": "stable",
    "auto": { "enabled": true, "stableDelayHours": 6, "stableJitterHours": 12 }
  }

---

systemctl --user stop openclaw-gateway.service
npm install -g openclaw@latest   # or: openclaw update
systemctl --user start openclaw-gateway.service

---

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"}
RAW_BUFFERClick to expand / collapse

[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 <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:

  1. The gateway's auto-update scheduler spawns openclaw update as a child of the gateway process.
  2. 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

  1. Install OpenClaw globally via npm.
  2. Run it as the systemd user service (openclaw gateway defaults).
  3. Leave update.auto.enabled = true.
  4. Wait for the auto-update tick (hourly retries after a failed attempt).
  5. 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" }
  6. 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.)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: auto-update can never succeed under systemd — updater is spawned as a child of the gateway it needs to restart