Node.js
Node.js
Section titled “Node.js”OpenClaw requires Node 22.14 or newer. Node 24 is the default and recommended runtime for installs, CI, and release workflows. Node 22 remains supported via the active LTS line. The installer script will detect and install Node automatically — this page is for when you want to set up Node yourself and make sure everything is wired up correctly (versions, PATH, global installs).
Check your version
Section titled “Check your version”node -vIf this prints v24.x.x or higher, you’re on the recommended default. If it prints v22.14.x or higher, you’re on the supported Node 22 LTS path, but we still recommend upgrading to Node 24 when convenient. If Node isn’t installed or the version is too old, pick an install method below.
Install Node
Section titled “Install Node”Homebrew (recommended):
brew install nodeOr download the macOS installer from nodejs.org.
Ubuntu / Debian:
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -sudo apt-get install -y nodejsFedora / RHEL:
sudo dnf install nodejsOr use a version manager (see below).
winget (recommended):
winget install OpenJS.NodeJS.LTSChocolatey:
choco install nodejs-ltsOr download the Windows installer from nodejs.org.
Using a version manager (nvm, fnm, mise, asdf)
Troubleshooting
Section titled “Troubleshooting”openclaw: command not found
Section titled “openclaw: command not found”This almost always means npm’s global bin directory isn’t on your PATH.
Find your global npm prefix
Terminal window npm prefix -gCheck if it's on your PATH
Terminal window echo "$PATH"Look for `
/bin
(macOS/Linux) or` (Windows) in the output.
Add it to your shell startup file
Add to
~/.zshrcor~/.bashrc:Terminal window export PATH="$(npm prefix -g)/bin:$PATH"Then open a new terminal (or run
rehashin zsh /hash -rin bash).Add the output of
npm prefix -gto your system PATH via Settings → System → Environment Variables.
Permission errors on npm install -g (Linux)
Section titled “Permission errors on npm install -g (Linux)”If you see EACCES errors, switch npm’s global prefix to a user-writable directory:
mkdir -p "$HOME/.npm-global"npm config set prefix "$HOME/.npm-global"export PATH="$HOME/.npm-global/bin:$PATH"Add the export PATH=... line to your ~/.bashrc or ~/.zshrc to make it permanent.
Related
Section titled “Related”- Install Overview — all installation methods
- Updating — keeping OpenClaw up to date
- Getting Started — first steps after install