Install
Already followed Getting Started? You’re all set — this page is for alternative install methods, platform-specific instructions, and maintenance.System requirements
- Node 22+ (the installer script will install it if missing)
- macOS, Linux, or Windows
pnpmonly if you build from source
On Windows, we strongly recommend running OpenClaw under WSL2.
Install methods
Installer script
Installer script
Downloads the CLI, installs it globally via npm, and launches the onboarding wizard.That’s it — the script handles Node detection, installation, and onboarding.To skip onboarding and just install the binary:For all flags, env vars, and CI/automation options, see Installer internals.
- macOS / Linux / WSL2
- Windows (PowerShell)
- macOS / Linux / WSL2
- Windows (PowerShell)
npm / pnpm
npm / pnpm
If you already have Node 22+ and prefer to manage the install yourself:
- npm
- pnpm
sharp build errors?
sharp build errors?
From source
From source
For contributors or anyone who wants to run from a local checkout.For deeper development workflows, see Setup.
Clone and build
Clone the OpenClaw repo and build:
Link the CLI
Make the Alternatively, skip the link and run commands via
openclaw command available globally:pnpm openclaw ... from inside the repo.Other install methods
Docker
Containerized or headless deployments.
Nix
Declarative install via Nix.
Ansible
Automated fleet provisioning.
Bun
CLI-only usage via the Bun runtime.
After install
Verify everything is working:OPENCLAW_HOMEfor home-directory based internal pathsOPENCLAW_STATE_DIRfor mutable state locationOPENCLAW_CONFIG_PATHfor config file location
Troubleshooting: openclaw not found
PATH diagnosis and fix
PATH diagnosis and fix
Quick diagnosis:If On Windows, add the output of
$(npm prefix -g)/bin (macOS/Linux) or $(npm prefix -g) (Windows) is not in your $PATH, your shell can’t find global npm binaries (including openclaw).Fix — add it to your shell startup file (~/.zshrc or ~/.bashrc):npm prefix -g to your PATH.Then open a new terminal (or rehash in zsh / hash -r in bash).