

























@@ -101,52 +101,33 @@ pnpm add -g openclaw@latest
101101bun add -g openclaw@latest
102102```
103103104-### Global npm installs and runtime dependencies
105-106-OpenClaw treats packaged global installs as read-only at runtime, even when the
107-global package directory is writable by the current user. Bundled plugin runtime
108-dependencies are staged into a writable runtime directory instead of mutating the
109-package tree. This keeps `openclaw update` from racing with a running gateway or
110-local agent that is repairing plugin dependencies during the same install.
111-112-Some Linux npm setups install global packages under root-owned directories such
113-as `/usr/lib/node_modules/openclaw`. OpenClaw supports that layout through the
114-same external staging path.
115-116-For hardened systemd units, set a writable stage directory that is included in
117-`ReadWritePaths`:
118-119-```ini
120-Environment=OPENCLAW_PLUGIN_STAGE_DIR=/var/lib/openclaw/plugin-runtime-deps
121-ReadWritePaths=/var/lib/openclaw /home/openclaw/.openclaw /tmp
122-```
123-124-If `OPENCLAW_PLUGIN_STAGE_DIR` is not set, OpenClaw uses `$STATE_DIRECTORY` when
125-systemd provides it, then falls back to `~/.openclaw/plugin-runtime-deps`.
126-The repair step treats that stage as an OpenClaw-owned local package root and
127-ignores user npm prefix/global settings, so global-install npm config does not
128-redirect bundled plugin dependencies into `~/node_modules` or the global package
129-tree.
130-131-Before package updates and bundled runtime-dependency repairs, OpenClaw tries a
132-best-effort disk-space check for the target volume. Low space produces a warning
133-with the checked path, but does not block the update because filesystem quotas,
134-snapshots, and network volumes can change after the check. The actual npm
135-install, copy, and post-install verification remain authoritative.
136-137-### Bundled plugin runtime dependencies
138-139-Packaged installs keep bundled plugin runtime dependencies out of the read-only
140-package tree. On startup and during `openclaw doctor --fix`, OpenClaw repairs
141-runtime dependencies only for bundled plugins that are active in config, active
142-through legacy channel config, or enabled by their bundled manifest default.
143-Persisted channel auth state alone does not trigger Gateway startup
144-runtime-dependency repair.
145-146-Explicit disablement wins. A disabled plugin or channel does not get its
147-runtime dependencies repaired just because it exists in the package. External
148-plugins and custom load paths still use `openclaw plugins install` or
149-`openclaw plugins update`.
104+### Advanced npm install topics
105+106+<AccordionGroup>
107+<Accordion title="Read-only package tree">
108+OpenClaw treats packaged global installs as read-only at runtime, even when the global package directory is writable by the current user. Bundled plugin runtime dependencies are staged into a writable runtime directory instead of mutating the package tree. This keeps `openclaw update` from racing with a running gateway or local agent that is repairing plugin dependencies during the same install.
109+110+Some Linux npm setups install global packages under root-owned directories such as `/usr/lib/node_modules/openclaw`. OpenClaw supports that layout through the same external staging path.
111+</Accordion>
112+<Accordion title="Hardened systemd units">
113+Set a writable stage directory that is included in `ReadWritePaths`:
114+115+```ini
116+Environment=OPENCLAW_PLUGIN_STAGE_DIR=/var/lib/openclaw/plugin-runtime-deps
117+ReadWritePaths=/var/lib/openclaw /home/openclaw/.openclaw /tmp
118+```
119+120+If `OPENCLAW_PLUGIN_STAGE_DIR` is not set, OpenClaw uses `$STATE_DIRECTORY` when systemd provides it, then falls back to `~/.openclaw/plugin-runtime-deps`. The repair step treats that stage as an OpenClaw-owned local package root and ignores user npm prefix and global settings, so global-install npm config does not redirect bundled plugin dependencies into `~/node_modules` or the global package tree.
121+</Accordion>
122+<Accordion title="Disk-space preflight">
123+Before package updates and bundled runtime-dependency repairs, OpenClaw tries a best-effort disk-space check for the target volume. Low space produces a warning with the checked path, but does not block the update because filesystem quotas, snapshots, and network volumes can change after the check. The actual npm install, copy, and post-install verification remain authoritative.
124+</Accordion>
125+<Accordion title="Bundled plugin runtime dependencies">
126+Packaged installs keep bundled plugin runtime dependencies out of the read-only package tree. On startup and during `openclaw doctor --fix`, OpenClaw repairs runtime dependencies only for bundled plugins that are active in config, active through legacy channel config, or enabled by their bundled manifest default. Persisted channel auth state alone does not trigger Gateway startup runtime-dependency repair.
127+128+Explicit disablement wins. A disabled plugin or channel does not get its runtime dependencies repaired just because it exists in the package. External plugins and custom load paths still use `openclaw plugins install` or `openclaw plugins update`.
129+</Accordion>
130+</AccordionGroup>
150131151132## Auto-updater
152133@@ -210,7 +191,9 @@ openclaw doctor
210191openclaw gateway restart
211192```
212193213-Tip: `npm view openclaw version` shows the current published version.
194+<Tip>
195+`npm view openclaw version` shows the current published version.
196+</Tip>
214197215198### Pin a commit (source)
216199@@ -232,6 +215,6 @@ To return to latest: `git checkout main && git pull`.
232215233216## Related
234217235-- [Install Overview](/install) — all installation methods
236-- [Doctor](/gateway/doctor) — health checks after updates
237-- [Migrating](/install/migrating) — major version migration guides
218+- [Install overview](/install): all installation methods.
219+- [Doctor](/gateway/doctor): health checks after updates.
220+- [Migrating](/install/migrating): major version migration guides.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。