Skip to content

fix(status): show "externally managed" instead of "not installed" when gateway is reachable#27291

Closed
byungsker wants to merge 1 commit into
openclaw:mainfrom
byungsker:fix/status-systemd-not-installed-false-negative-27267
Closed

fix(status): show "externally managed" instead of "not installed" when gateway is reachable#27291
byungsker wants to merge 1 commit into
openclaw:mainfrom
byungsker:fix/status-systemd-not-installed-false-negative-27267

Conversation

@byungsker

Copy link
Copy Markdown

Problem

openclaw status and openclaw status --all both report "systemd not installed" when the gateway is started by a user-managed service (e.g. /etc/systemd/system/openclaw-gateway.service or a container supervisor), even though the gateway is healthy and processing messages.

Root cause: service.isLoaded() and service.readCommand() only look for the OpenClaw-managed user-level systemd unit (~/.config/systemd/user/openclaw-gateway.service). When the unit is absent, daemon.installed === false unconditionally → "systemd not installed".

Fix

Before emitting the "not installed" string, check gatewayReachable. If the gateway responds to the probe it is clearly running — just not via the OpenClaw install/uninstall path. In that case display:

systemd · running (externally managed)

No change when the gateway is unreachable: the existing "systemd not installed" hint still appears to guide the user toward openclaw gateway install.

Changed files

File Change
src/commands/status.command.ts Add gatewayReachable guard in daemonValue IIFE
src/commands/status-all.ts Same guard in "Gateway service" row

Before / After

Scenario Before After
Gateway started by openclaw gateway start systemd installed · running unchanged
Gateway started by custom systemd system unit systemd not installed systemd · running (externally managed)
Gateway not running, no service installed systemd not installed unchanged

Fixes #27267

…n gateway is reachable

When the OpenClaw gateway is started by a user-managed service (e.g. a
hand-written systemd system unit at /etc/systemd/system/openclaw-gateway.service
or a container supervisor), openclaw status and the status-all table both
reported "systemd not installed" because the OpenClaw-managed user-level
unit was absent.

The fix: before emitting the "not installed" string, check whether the
gateway is actually reachable (gatewayReachable). If it is, the process
is clearly running — just not via the OpenClaw install/uninstall path.
In that case, display "<label> · running (externally managed)" so the
user gets an accurate picture without being prompted to install a
service that is already running.

Affected surfaces:
- `openclaw status` table (status.command.ts)
- `openclaw status --all` table (status-all.ts)

Fixes openclaw#27267
@greptile-apps

greptile-apps Bot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR fixes misleading status output when the gateway is running via external service management (e.g., user-created systemd units or container supervisors). Previously, both openclaw status and openclaw status --all would report "systemd not installed" even when the gateway was healthy and reachable.

The fix adds a gatewayReachable check before displaying "not installed". When the gateway responds to probes but no OpenClaw-managed service unit exists, the status now correctly shows "systemd · running (externally managed)" instead.

Key changes:

  • src/commands/status.command.ts: Added conditional check with explanatory comment in the daemonValue IIFE
  • src/commands/status-all.ts: Added same conditional logic in the Gateway service row

The implementation is consistent across both files and preserves existing behavior for all other scenarios (gateway managed by OpenClaw, gateway not running, etc.).

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is a focused bug fix that adds a simple conditional check before displaying status messages. The logic is straightforward (if gateway is not installed but reachable, show "externally managed"), correctly implemented in both affected files, and preserves all existing behavior for other scenarios. No security issues or edge cases identified.
  • No files require special attention

Last reviewed commit: fe84196

@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Mar 4, 2026
@thewilloftheshadow thewilloftheshadow added r: too-many-prs Auto-close: author has more than twenty active PRs. and removed trusted-contributor labels Mar 6, 2026
@openclaw-barnacle

Copy link
Copy Markdown

Closing this PR because the author has more than 10 active PRs in this repo. Please reduce the active PR queue and reopen or resubmit once it is back under the limit. You can close your own PRs to get back under the limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands Command implementations r: too-many-prs Auto-close: author has more than twenty active PRs. size: XS stale Marked as stale due to inactivity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: openclaw status incorrectly reports "systemd not installed" when gateway is running via systemd

2 participants