Guide
Install OpenClaw with npm — Quick Start Guide 2026
How to install OpenClaw with npm, set it up with openclaw onboard, and keep it running — plus when managed hosting is a better choice.
npm install -g openclaw, then openclaw onboard --install-daemon. Or skip npm entirely with the official installer, which sets up Node for you. Checked against OpenClaw 2026.9.8 on 7 October 2026.Prerequisites
- Node.js 24.16 or newer within 24.x, or Node 26.1 or newer. OpenClaw 2026.9.8 declares
>=24.16.0 <25 || >=26.1.0, so Node 22 and Node 25 will not work. Check withnode --version, and install Node 24 from nodejs.org or with nvm. - A terminal: bash or zsh on macOS and Linux, or PowerShell on Windows.
Don't want to manage Node yourself? The official installer handles Node, installs OpenClaw and starts onboarding in one step:
# macOS, Linux or WSL2
curl -fsSL https://openclaw.ai/install.sh | bash
# Windows PowerShell
iwr -useb https://openclaw.ai/install.ps1 | iexInstall with npm
npm install -g openclawThis puts the openclaw command on your PATH. Confirm it worked:
openclaw --version
openclaw --helpOpenClaw uses date-based versions such as 2026.9.8. If you see "command not found", see the common issues section below.
npx openclaw --version also works for a quick look without a global install, but use the global install for a real agent: the background service needs a stable path to the openclaw command.
Set Up: openclaw onboard
Onboarding is interactive. It sets up your AI provider first, checks that the connection works, then walks you through the rest of the setup, such as chat channels:
openclaw onboard --install-daemonThe --install-daemon flag also installs the gateway as a background service (launchd on macOS, systemd on Linux, a Scheduled Task on Windows), so your agent keeps running after you close the terminal. Your config is saved to ~/.openclaw/openclaw.json. You rarely need to edit it by hand; re-run openclaw onboard or use openclaw configure to change settings.
Running the Gateway
The gateway is the long-running process that connects your chat channels to the agent. Manage the background service with:
openclaw gateway status # is it installed and running?
openclaw gateway restart
openclaw gateway stop
openclaw gateway install # install the service if you skipped it during onboardingTo run it in the foreground instead, for example while testing, use openclaw gateway run. Open http://localhost:18789 to use the web dashboard. openclaw daemon ... still works as an older alias for these commands.
Adding Skills
Skills extend what your agent can do. Search ClawHub from the CLI and install by owner and name:
openclaw skills search "calendar"
openclaw skills install @owner/<slug>Updating OpenClaw
openclaw updateopenclaw update updates the install and handles the gateway service for you. npm install -g openclaw@latest also works, followed by openclaw gateway restart. To pin a version, use npm install -g [email protected]. Release notes are on the OpenClaw releases page.
npm vs Docker vs Managed Hosting
OpenClaw can be installed and run in three different ways. Here is when to use each:
| npm CLI | Docker | OpenClaw Launch | |
|---|---|---|---|
| Best for | Local dev, testing | Self-hosted production | Everyone else |
| Node.js required | Yes (24.16+ or 26.1+) | No | No |
| Runs 24/7 | Yes, as a background service | Yes (with restart policy) | Yes — always on |
| Config format | Interactive onboarding | Setup script + onboarding | Visual editor |
| HTTPS / SSL | Manual setup | Manual setup | Automatic |
| Updates | openclaw update | docker pull + restart | Automatic |
| Time to deploy | 10–30 min setup | 30–60 min setup | Under 30 seconds |
| Cost | Free (+ server cost) | Free (+ server cost) | From $3/mo first month, then $6/mo |
Use npm when you want OpenClaw on your own computer or server and are comfortable managing Node.js. With the gateway installed as a service it runs in the background, but only while that machine is on.
Use Docker when you want self-hosted production with full control. Docker provides process isolation, easy restarts, and consistent environments. See our OpenClaw Docker guide for details.
Use OpenClaw Launch when you want to skip all of the above. No Node.js, no Docker, no server — just configure your agent in a visual editor and click deploy. Your instance runs 24/7 on managed infrastructure starting at $3/mo first month, then $6/mo.
Common npm Issues
These are the most frequent problems people run into when installing OpenClaw with npm:
Permission denied (EACCES)
Global npm installs write to a system directory that requires elevated access. Fix this by configuring a user-owned npm prefix instead of using sudo. Run: mkdir ~/.npm-global && npm config set prefix ~/.npm-global then add export PATH="$HOME/.npm-global/bin:$PATH" to your shell profile (~/.bashrc or ~/.zshrc). After reloading your shell, run npm install -g openclaw again without sudo.
Wrong Node.js version (EBADENGINE)
OpenClaw 2026.9.8 requires Node 24.16 or newer within 24.x, or Node 26.1 or newer. Node 22 and Node 25 are not supported. Check your version with node --version, then upgrade with nvm: nvm install 24 && nvm use 24. On Ubuntu/Debian you can also use the NodeSource repo: curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash - && sudo apt install nodejs.
openclaw: command not found after install
This means the global npm bin directory is not in your PATH. Run npm prefix -g to find where npm installs global packages (the openclaw command is in its bin subdirectory on macOS and Linux). Add that directory to your PATH in your shell profile, then run source ~/.bashrc or source ~/.zshrc to reload it.
npm ERR! code ENOTFOUND or network timeout
This is a network or registry connectivity issue. Try switching to the official npm registry: npm config set registry https://registry.npmjs.org/ then retry. If you are behind a corporate proxy, configure npm's proxy settings: npm config set proxy http://proxy.example.com:8080.
The gateway does not start or stops after a reboot
Run openclaw doctor, which checks your config, Node version and gateway service and suggests fixes. openclaw gateway status shows whether the background service is installed and running. If you updated from an older version, openclaw gateway install --force reinstalls the service.
Skipping npm Entirely with OpenClaw Launch
Installing OpenClaw is the easy part. Keeping it online is the work: the right Node version, a machine that never sleeps, updates, backups, and remote access to the dashboard.
OpenClaw Launch eliminates all of this. There is no npm, no Node.js, no Docker, and no server to maintain. You pick a model and a chat app in the dashboard, and your agent is live in under 30 seconds. There is a free 30-minute trial. Plans start at $3/mo for the first month then $6/mo — often less than the VPS you'd need to host it yourself.
Want to compare your self-hosting costs? See our OpenClaw hosting guide or read about the full OpenClaw install options.