The OpenClaw installer script
What the three scripts do, the Node rule, the flags, and how to run it headless
The one-line installer is the docs’ recommended way to get OpenClaw, and the internals page explains what that line actually does. There are three scripts, served from the project’s domain: the main one for macOS, Linux and WSL, a rootless variant that installs into a local prefix, and a PowerShell one for Windows. Here is what each does, the Node rule they all enforce, how they behave around nvm and a source checkout, the flags that make them scriptable, and the post-install steps that decide whether onboarding runs.
The three scripts
- The main script: detects the OS, ensures a supported Node, ensures Git, installs OpenClaw through npm by default or from git, and can run onboarding.
- The CLI script: installs Node and OpenClaw into a local prefix under the OpenClaw directory, through npm or git, with no root required, on macOS, Linux, WSL and FreeBSD.
- The PowerShell script: the Windows equivalent, installing Node through winget, Chocolatey or Scoop when needed, or a portable fallback.
The Node rule
All three want Node 24.16 or later, or 26.1 or later, with a SQLite library that survives a write-ahead-log reset; Node 22, 23 and 25 are unsupported. When Node is missing and nvm is not detected, the main script installs Node 26 through Homebrew on macOS and the Node 24 LTS line through NodeSource on Linux; an RPM-owned Node that links an unsafe SQLite is left in place while OpenClaw gets a user-space runtime. Before touching packages, every installer probes the exact npm it will use, and newer npm releases receive a scoped script-approval flag for the OpenClaw package only. On upgrades the scripts run the doctor’s repair, and the success banner appears only after repair and verification pass.
Node 24.16+ and Node 26.1+ are supported; Node 22, 23, and 25 are unsupported.
nvm, checkouts, flags
- With nvm present, the script keeps an active compatible Node, checks installed nvm versions, and offers to install Node 26 inside that nvm, asking first whether to pin the current default alias; it never installs a second nvm and never rewrites shell profiles.
- Run inside an OpenClaw checkout, the script offers the checkout or a global npm install; with no terminal and no method set it defaults to npm and warns. The git method accepts a full commit SHA and checks it out detached with a frozen lockfile.
- Flags: the install method, a version, dist-tag or package spec, a beta switch, the checkout directory, no prompt, no onboard or onboard, a post-install verify, a dry run and verbose; the same choices exist as environment variables for CI.
How to install OpenClaw sets the script beside npm, pnpm, bun, source, Docker and the desktop apps, and OpenClaw system requirements covers the machine it lands on.
After the install
The script resolves the just-installed binary, and for an unconfigured install starts onboarding before any doctor or gateway probe; with the no-onboard flag or no terminal it prints the command to finish later. For a configured install it refreshes and restarts a loaded gateway service best-effort and runs the repair doctor, where upgrade repair failures are fatal and plugin update failures are warnings. Updating OpenClaw is where that upgrade path continues.
On Diali
On Diali there is no installer to run and no Node to keep supported: each release is installed on our side and tested on our own assistants before it reaches yours. Hosted OpenClaw on Diali is the assistant.
- Three scripts, one Node rule, npm by default.
- nvm is respected, never replaced; a checkout is offered, never assumed.
- No onboard and verify are the flags for a headless install.
Stop reading about it, build one
Set up an agent, pick a channel, and have it working inside the app you already keep open.
