openclaw - 💡(How to fix) Fix Plugin loader fails with EACCES on runtime-deps install when gateway runs as non-root (2026.4.20+)

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…

Since 2026.4.20 the plugin loader runs npm install inside root-owned bundled-plugin dirs, so a gateway running as a non-root user fails with EACCES and silently drops the acpx, browser, and whatsapp plugins.

Error Message

Error (same for acpx, browser, whatsapp):

Root Cause

Since 2026.4.20 the plugin loader runs npm install inside root-owned bundled-plugin dirs, so a gateway running as a non-root user fails with EACCES and silently drops the acpx, browser, and whatsapp plugins.

Fix Action

Fix / Workaround

Workaround we re-run after every reinstall:

Code Example

Error (same for acpx, browser, whatsapp):

EACCES: permission denied, mkdir '/usr/lib/node_modules/openclaw/dist/extensions/whatsapp/node_modules'

Workaround we re-run after every reinstall:

PI_USER=piserver
EXT_ROOT=/usr/lib/node_modules/openclaw/dist/extensions
for t in acpx browser whatsapp; do sudo chown -R "$PI_USER":"$PI_USER" "$EXT_ROOT/$t"; done
sudo systemctl --user restart openclaw-gateway.service
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Since 2026.4.20 the plugin loader runs npm install inside root-owned bundled-plugin dirs, so a gateway running as a non-root user fails with EACCES and silently drops the acpx, browser, and whatsapp plugins.

Steps to reproduce

  1. Install OpenClaw 2026.4.20+ as root: sudo npm install -g [email protected]
  2. Run the gateway as a non-root user via a systemd user unit: systemctl --user start openclaw-gateway.service (as user piserver)
  3. Watch the gateway boot — the plugin loader throws EACCES: permission denied, mkdir node_modules for acpx, browser, whatsapp
  4. Those plugins are absent from the [gateway] ready (N plugins: ...) log line

Expected behavior

Bundled plugins install their runtime deps and load successfully even when the gateway runs as a non-root user, with no manual chown required after install.

Actual behavior

npm install fails with EACCES: permission denied, mkdir node_modules in /usr/lib/node_modules/openclaw/dist/extensions/<plugin>/ (root-owned after sudo npm install -g), so acpx, browser, and whatsapp fail to load. The gateway still boots, so the feature loss is silent.

OpenClaw version

2026.4.26 (first observed 2026.4.20; upstream 2026.5.7 not yet tested)

Operating system

Debian 13 "trixie", Raspberry Pi 5 (arm64), kernel 6.12.75

Install method

npm global: sudo npm install -g openclaw@<version>; gateway run via systemd --user as user piserver. Node 22.22.0 / 24.14.1.

Model

N/A — plugin-loader / filesystem-permissions bug, not model-related

Provider / routing chain

N/A — not model/routing related

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Error (same for acpx, browser, whatsapp):

EACCES: permission denied, mkdir '/usr/lib/node_modules/openclaw/dist/extensions/whatsapp/node_modules'

Workaround we re-run after every reinstall:

PI_USER=piserver
EXT_ROOT=/usr/lib/node_modules/openclaw/dist/extensions
for t in acpx browser whatsapp; do sudo chown -R "$PI_USER":"$PI_USER" "$EXT_ROOT/$t"; done
sudo systemctl --user restart openclaw-gateway.service

Impact and severity

  • Affected: any deployment running the gateway as a non-root user (the recommended production posture).
  • Severity: blocks the affected plugins (acpx/browser/whatsapp) from loading — silent feature loss.
  • Frequency: every sudo npm install -g openclaw@<X> resets ownership, so it recurs on each install/upgrade.
  • Consequence: the recommended non-root posture is broken on every upgrade until a manual chown is re-run.

Additional information

Suggested fix (one of): (1) install plugin runtime-deps under the runtime user's home (e.g. ~/.openclaw/extensions/<plugin>/node_modules/) so root-vs-user ownership doesn't matter; (2) bake plugin deps into the npm package via postinstall at install time rather than at gateway boot; (3) support a --prefix <user-writable-dir> for the loader; (4) at minimum, document the chown requirement for non-root runs.

Reported as part of a hardening sprint on a self-hosted Pi 5 OpenClaw build.

Written and found by Opus 4.8

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…

FAQ

Expected behavior

Bundled plugins install their runtime deps and load successfully even when the gateway runs as a non-root user, with no manual chown required after install.

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 Plugin loader fails with EACCES on runtime-deps install when gateway runs as non-root (2026.4.20+)