Install and Configure Node.js for OpenClaw
Learn how to install and configure Node.js for OpenClaw, including version requirements, install options for macOS, Linux, and Windows, and PATH troubleshooting. This page is for users who prefer manual setup over the automatic installer.
Read this when
- You need to install Node.js before installing OpenClaw
- You installed OpenClaw but `openclaw` is command not found
- npm install -g fails with permissions or PATH issues
OpenClaw requires Node 22.22.3+, Node 24.15+, or Node 25.9+. For installations, CI pipelines, and release workflows, Node 24 is the default and recommended runtime; the active LTS line also keeps Node 22 supported. Node 23 is not supported. The installer script automatically detects and installs Node. Use this page when you prefer to configure Node manually (versions, PATH, global installs).
Check your version
node -v
v24.15.0 or a later 24.x release is the recommended default. v22.22.3 or a later 22.x release represents the supported Node 22 LTS path; Node v25.9.0+ is also supported. Node 23 is not supported. If Node is absent or falls outside the supported range, choose one of the install methods below.
Install Node
macOS
Homebrew (recommended):
brew install node
Alternatively, grab the macOS installer from nodejs.org.
Linux
Ubuntu / Debian:
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt-get install -y nodejs
Fedora / RHEL:
sudo dnf install nodejs
Or use a version manager (see below).
Windows
winget (recommended):
winget install OpenJS.NodeJS.LTS
Chocolatey:
choco install nodejs-lts
Alternatively, grab the Windows installer from nodejs.org.
Using a version manager (nvm, fnm, mise, asdf)
Version managers make it easy to switch between different Node versions. Well-known choices:
- fnm - fast, cross-platform
- nvm - widely used on macOS/Linux
- mise - polyglot (Node, Python, Ruby, etc.)
Example with fnm:
fnm install 24
fnm use 24
Warning
Initialize your version manager inside your shell startup file (
~/.zshrcor~/.bashrc). Without this step,openclawmight be unavailable in new terminal sessions because Node's bin directory won't be on PATH.
Troubleshooting
openclaw: command not found
This typically means npm's global bin directory is missing from your PATH.
Find your global npm prefix
npm prefix -g
Check if it's on your PATH
echo "$PATH"
Check for <npm-prefix>/bin (macOS/Linux) or <npm-prefix> (Windows) in the output.
Add it to your shell startup file
macOS / Linux
Append to ~/.zshrc or ~/.bashrc:
export PATH="$(npm prefix -g)/bin:$PATH"
Then launch a new terminal (or run rehash in zsh / hash -r in bash).
Windows
Add the result of npm prefix -g to your system PATH through Settings → System → Environment Variables.
Permission errors on npm install -g (Linux)
If EACCES errors appear, change npm's global prefix to a directory your user can write to:
mkdir -p "$HOME/.npm-global"
npm config set prefix "$HOME/.npm-global"
export PATH="$HOME/.npm-global/bin:$PATH"
To make the change permanent, add the export PATH=... line to your ~/.bashrc or ~/.zshrc.
Related
- Install Overview - all installation methods
- Updating - keeping OpenClaw up to date
- Getting Started - first steps after install