#custom extension handling?
1 messages · Page 1 of 1 (latest)
Don’t put custom stuff under the global npm install (…/.npm-global/.../node_modules/openclaw/...) — npm i -g openclaw@… will reinstall that folder and wipe any edits.
Use the plugin/extension loader paths that live outside the install:
- Workspace extensions:
<workspace>/.openclaw/extensions/... - Global extensions:
~/.openclaw/extensions/... - Or anywhere you want via
plugins.load.paths
The easiest workflow is:
- Keep your plugin in its own folder (git repo is ideal) with an
openclaw.plugin.jsonmanifest - Install it into the persistent OpenClaw state dir:
openclaw plugins install -l /path/to/your-plugin # dev (symlink)
# or
openclaw plugins install /path/to/your-plugin # copy into ~/.openclaw/extensions/<id>
- Enable it + restart the gateway (plugin config changes require restart):
openclaw plugins enable <id>
openclaw gateway restart
Docs (paths + commands): https://docs.openclaw.ai/tools/plugin
the extension currently lives in .npm-global.../openclaw/..., and I have enabled it in openclaw.json. How should I proceed to change it to a global extension?
If it’s currently living under the npm global install (…/.npm-global/.../node_modules/openclaw/...), the fix is basically: move it out into $OPENCLAW_STATE_DIR/extensions (defaults to ~/.openclaw/extensions) so updates don’t touch it.
Recommended way (uses the plugin installer)
-
Copy your plugin/extension folder somewhere stable (outside
node_modules), e.g.
~/openclaw-plugins/<your-plugin>(just a normal directory you control). -
Install it into the global extensions dir:
openclaw plugins install -l ~/openclaw-plugins/<your-plugin> # symlink for dev
# or (if you want a frozen copy under ~/.openclaw/extensions/<id>/)
openclaw plugins install ~/openclaw-plugins/<your-plugin>
- Restart the gateway (plugin discovery/config needs restart):
openclaw gateway restart
- Verify it’s being picked up from the global dir:
openclaw plugins list
openclaw plugins info <id>
Config impact
- If your
openclaw.jsonalready hasplugins.entries.<id>.enabled: true, you can usually keep it unchanged — just make sure the plugin id stays the same after you move it. - If you have
plugins.allow, ensure it includes the id (otherwise it won’t load).
Docs for the exact discovery paths + precedence: https://docs.openclaw.ai/tools/plugin
Those warnings make sense given your history (plugin living in node_modules/openclaw/extensions/... before):
1) plugins.allow is empty…
That’s just a security heads‑up: if you leave plugins.allow empty, OpenClaw will load any discoverable non-bundled plugins (workspace/global/load.paths).
- Safe to ignore for a personal setup.
- If you do set
plugins.allow, be aware it becomes a real allowlist (“only these plugins may load”), so you must include everything you rely on. Easiest way is to first inspect what’s loading:
openclaw plugins list
…and only then decide whether you want an allowlist.
2) duplicate plugin id detected … (/.../node_modules/openclaw/extensions/memory-hybrid/...)
You currently have two copies with the same plugin id: