openclaw - 💡(How to fix) Fix Auto-Update updates npm package but not systemd service file version

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…

Fix Action

Fix / Workaround

Manual Workaround

  1. Run openclaw update manually (which also does not fix the service file)
  2. Or: Manually edit the .service file to update OPENCLAW_SERVICE_VERSION
  3. Run systemctl --user daemon-reload && systemctl --user restart openclaw-gateway

Code Example

[Unit]
Description=OpenClaw Gateway (v2026.5.27)
...
[Service]
Environment=OPENCLAW_SERVICE_VERSION=2026.5.27
...
RAW_BUFFERClick to expand / collapse

Bug: Auto-Update updates npm package but not systemd service file version

Environment

  • OpenClaw version: 2026.5.28
  • Previous version: 2026.5.27
  • Installation method: npm (via npm install -g openclaw)
  • Service management: systemd user service (openclaw-gateway.service)
  • OS: Ubuntu Linux

Problem Description

When update.auto.enabled: true is configured, OpenClaw successfully downloads and installs the new npm package version. However, the systemd .service file is not updated to reflect the new version. This causes a version mismatch between:

  • The running OpenClaw binary (openclaw --version → e.g., 2026.5.28)
  • The systemd service file (OPENCLAW_SERVICE_VERSION=2026.5.27 in ExecStart environment)

Impact

After the auto-update completes:

  1. The gateway service continues running the old service configuration
  2. Messages stop being delivered properly (Discord, Telegram, etc.)
  3. The user must manually intervene to fix the discrepancy

Manual Workaround

  1. Run openclaw update manually (which also does not fix the service file)
  2. Or: Manually edit the .service file to update OPENCLAW_SERVICE_VERSION
  3. Run systemctl --user daemon-reload && systemctl --user restart openclaw-gateway

Expected Behavior

The auto-update mechanism should either:

  • Option A: Automatically update the systemd service file version string and reload/restart the service
  • Option B: Use a dynamic version detection instead of hardcoding OPENCLAW_SERVICE_VERSION in the service file
  • Option C: Provide a post-update hook that runs daemon-reload and service restart

Current Service File Snippet

[Unit]
Description=OpenClaw Gateway (v2026.5.27)
...
[Service]
Environment=OPENCLAW_SERVICE_VERSION=2026.5.27
...

Suggested Fix

The openclaw update command (and by extension auto-update) should:

  1. Detect if running under systemd
  2. Update the version string in the .service file
  3. Run systemctl daemon-reload
  4. Restart the service (or notify the user to restart)

Additional Context

  • This appears to be a regression or design oversight in the auto-update flow
  • The service file is created during initial installation but never updated thereafter
  • The hardcoded version in the service file may be used for health checks or self-monitoring

Thank you for the great work on OpenClaw! Happy to provide more details or test a fix.

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 Auto-Update updates npm package but not systemd service file version