English

Install and use ClawHub in OpenClaw for Docker

This article documents the entire process of properly installing and using ClawHub in OpenClaw running in a Docker environment, and explains common permission issues, configuration misunderstandings, and the correct way to install custom skills and ClawHub skills.

Applicable scenarios:

  • OpenClaw runs via Docker / Docker Compose
  • The user in the container is node(not root)
  • Want to use ClawHub to manage Skills

1. What is ClawHub? and OpenClaw

In the OpenClaw system, the roles of the three are different:

ComponentsFunction
OpenClaw (Service)Run Gateway / Agent / Provider
ClawHubSkill Marketplace and Skill Installation Tool
SkillRules or tools that actually inject the model's capabilities

Key conclusions:

ClawHub is not part of OpenClaw
You don't need and shouldn't "install ClawHub into OpenClaw"
Just use ClawHub to install the Skill to the directory that OpenClaw will scan


2. Enter the OpenClaw running container

Start by confirming that OpenClaw is running:

docker ps

Find the gateway container name, for example:

openclaw-openclaw-gateway-1

Entering the container:

docker exec -it openclaw-openclaw-gateway-1 /bin/bash

The prompt after entering is usually the following:

node@<container-id>:/app$

3. Why npm i -g clawhub did it fail?

Direct execution:

npm i -g clawhub

Errors are usually reported:

EACCES: permission denied, mkdir '/usr/local/lib/node_modules'

The reason is simple:

  • The default user in the Docker image isnode
  • nodeThe user does not have permission to write/usr/local/lib
  • Global npm installation fails

This is not a misconfiguration, but a container security design


4. Recommended solution: User-level global installation of ClawHub (Scheme 2)

This is the most stable and recommended way.

1️⃣ Configure npm's user-level global directory

Perform in a container:

mkdir -p /home/node/.npm-global
npm config set prefix /home/node/.npm-global

Add the directory to the PATH:

echo 'export PATH=/home/node/.npm-global/bin:$PATH' >> /home/node/.bashrc
source /home/node/.bashrc

2️⃣ Install ClawHub

npm i -g clawhub

Verify successful installation:

clawhub --help

If you see a help message, the installation is complete.


5. Configure ClawHub's working directory (very important)

The skill directory that OpenClaw scans by default is:

/home/node/.openclaw/skills

So it is necessary to tell ClawHub:
Install the ability here

export CLAWHUB_WORKDIR=/home/node/.openclaw

(can be written in .bashrc for long-term use)


6. Use ClawHub installation skills

1️⃣ Search for skills

clawhub search pdf
clawhub search ocr
clawhub search classify

2️⃣ Installation skills

Suppose the skill slug is <skill-slug>:

clawhub install <skill-slug>

Once installed, the skill will appear in:

/home/node/.openclaw/skills/<skill-slug>/SKILL.md

3️⃣ Restart OpenClaw Gateway (recommended)

docker restart openclaw-openclaw-gateway-1

7. Do you also use ClawHub for custom skills?

No, you don't.

The correct way to customize a skill is:

/home/node/.openclaw/skills/
└── your-skill-name/
    └── SKILL.md

As long as the directory is structured correctly, OpenClaw automatically recognizes it.

ClawHub is only used for:

  • Download Community Skills
  • Update existing skills
  • Manage the Skill Registry

8. How do I confirm that the SKILL is active?

This version of OpenClaw does not print skill loading information piece by piece in the log.

The correct way to judge is:

  • Use the skill in the web / Telegram / Chat UI
  • Observe whether the model strictly adheres to SKILL.md the output constraints in

For example:

  • Force JSON output
  • Fixed field structure
  • No more free play

Whenever the behavior changes, the Skill has been injected.


9. Summary of common misunderstandings

Wrong practiceResult
In a containernpm i -g clawhubEACCES permission error
 ConfigurationskillsDirOpenClaw reports Unknown key
Skill is placed in /app or project rootwill not be loaded
Use the old style skill.json + index.jsThe current version is not recognized

10. Conclusion

In the current version of OpenClaw:

  • Skill is a rule, not a plugin
  • ClawHub is the installer, not the runtime
  • Proper directory structure is more important than any CLI

Once you understand this, Skill management becomes very clean and controlled.

Scroll to Top