Files
openclaw/docs/install/node.md
T
06804b95b4 fix(installer): preserve Fedora Node packages with unsafe SQLite (#134166)
* fix(installer): preserve Fedora Node packages on unsafe SQLite

* fix(installer): annotate child shell expansion

Signed-off-by: sallyom <somalley@redhat.com>

---------

Signed-off-by: sallyom <somalley@redhat.com>
Co-authored-by: roboclaw-bot <309084314+roboclaw-bot@users.noreply.github.com>
Co-authored-by: sallyom <somalley@redhat.com>
2026-08-31 14:19:07 -04:00

4.6 KiB

summary, title, read_when
summary title read_when
Install and configure Node.js for OpenClaw - version requirements, install options, and PATH troubleshooting Node.js
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+ (which includes Node 26) with a WAL-reset-safe linked SQLite library. Node 26 is the recommended runtime — it starts the Gateway noticeably faster and uses less memory than Node 24. The installer provisions Node 26 on macOS and the supported Node 24 LTS line on Linux when Node is missing; CI and release workflows also pin Node 24. On RPM-based Linux, the installer preserves a supported distro-owned Node package that links unsafe SQLite and uses a user-space Node runtime for OpenClaw instead. Node 22 remains supported via its LTS line. Node 23 is unsupported. The installer script detects and installs Node automatically — use this page when you want to set up Node yourself (versions, PATH, global installs).

Check your version

node -v

v26 (any release) is the recommended default. v24.15.0 or newer 24.x remains fully supported (and is what CI pins); v22.22.3 or newer 22.x is the supported Node 22 LTS path; Node v25.9.0+ is also supported. Node 23 is unsupported. If Node is missing or outside the supported range, pick an install method below.

Install Node

**Homebrew** (recommended):
```bash
brew install node
```

Or download the macOS installer from [nodejs.org](https://nodejs.org/).
**Ubuntu / Debian:**
```bash
curl -fsSL https://deb.nodesource.com/setup_24.x | sudo -E bash -
sudo apt-get install -y nodejs
```

**Fedora / RHEL:**

```bash
sudo dnf install nodejs
```

Some distro Node packages link the system SQLite library. The recommended OpenClaw installer checks the effective Node and SQLite combination and automatically uses a user-space Node runtime when the distro build is unsafe; it does not remove the distro package.

Or use a version manager (see below).
**winget** (recommended):
```powershell
winget install OpenJS.NodeJS.LTS
```

**Chocolatey:**

```powershell
choco install nodejs-lts
```

Or download the Windows installer from [nodejs.org](https://nodejs.org/).
Version managers let you switch between Node versions easily. Popular options:
  • fnm - fast, cross-platform
  • nvm - widely used on macOS/Linux
  • mise - polyglot (Node, Python, Ruby, etc.)

Example with fnm:

fnm install 26
fnm use 26
Initialize your version manager in your shell startup file (`~/.zshrc` or `~/.bashrc`). If you skip this, `openclaw` may not be found in new terminal sessions because PATH won't include Node's bin directory.

Troubleshooting

openclaw: command not found

This almost always means npm's global bin directory isn't on your PATH.

```bash npm prefix -g ``` ```bash echo "$PATH" ```
Look for `<npm-prefix>/bin` (macOS/Linux) or `<npm-prefix>` (Windows) in the output.
Add to `~/.zshrc` or `~/.bashrc`:
    ```bash
    export PATH="$(npm prefix -g)/bin:$PATH"
    ```

    Then open a new terminal (or run `rehash` in zsh / `hash -r` in bash).
  </Tab>
  <Tab title="Windows">
    Add the output of `npm prefix -g` to your system PATH via Settings → System → Environment Variables.
  </Tab>
</Tabs>

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.