Install OpenClaw: Installer Script, npm, Docker, and More

This page explains how to install OpenClaw using the recommended installer script, npm, pnpm, bun, from source, or Docker. It covers system requirements and Windows-specific options.

Read this when

  • You need an install method other than the Getting Started quickstart
  • You want to download the Windows Hub or macOS desktop app instead of the CLI
  • You want to deploy to a cloud platform
  • You need to update, migrate, or uninstall

System requirements

  • Node 22.22.3+, 24.15+, or 25.9+ - Node 26 serves as the recommended default, and the installer script handles its setup automatically when Node is absent.
  • macOS, Linux, or Windows - On Windows, you can begin with the native Windows Hub application, the PowerShell CLI installer, or a WSL2 Gateway. Additional details are in Windows.
  • pnpm becomes necessary solely when compiling from source.

This is the quickest route to installation. It identifies your operating system, installs Node when required, sets up OpenClaw, and starts the onboarding process.

Note

Windows desktop users have the option to install the native Windows Hub companion application, which provides setup, tray status, chat, node mode, and local MCP mode.

macOS / Linux / WSL2

curl -fsSL https://openclaw.ai/install.sh | bash

Windows (PowerShell)

iwr -useb https://openclaw.ai/install.ps1 | iex

To skip onboarding during installation:

macOS / Linux / WSL2

curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard

Windows (PowerShell)

& ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -NoOnboard

For a complete list of flags and CI/automation options, refer to Installer internals.

Alternative install methods

Local prefix installer (install-cli.sh)

Choose this approach when you want OpenClaw and Node maintained under a local prefix like ~/.openclaw, without relying on a system-wide Node installation:

curl -fsSL https://openclaw.ai/install-cli.sh | bash

It handles npm installs by default, and also supports git-checkout installs within the same prefix workflow. See Installer internals for the full reference.

Already have it set up? Move between package and git installs using openclaw update --channel dev and openclaw update --channel stable. Check Updating for guidance.

npm, pnpm, or bun

If you handle Node management yourself:

npm

With npm 12 or npm 11.16+:

npm install -g openclaw@latest --allow-scripts=openclaw
openclaw onboard --install-daemon

For npm 11.15 and older, run the same command without --allow-scripts=openclaw.

Note

npm 12 denies unapproved package lifecycle scripts by default. The --allow-scripts=openclaw flag explicitly permits OpenClaw's preinstall and postinstall steps; without it, npm flags them as blocked because they are not covered by allowScripts.

npm 11.16 recognizes the flag but only issues warnings that the scripts are not yet covered by allowScripts and executes them anyway. npm 11.15 and earlier lack both the policy and the flag, so their command must go unflagged. The npm approve-scripts openclaw command suggested by npm 11.16 fails for a global install, returning ENOMATCH No installed packages match: openclaw.

Note

The hosted installer clears npm freshness filters such as min-release-age for the OpenClaw package installation. If you install manually via npm, your own npm policy remains in effect.

pnpm

pnpm add -g --allow-build=openclaw openclaw@latest
openclaw onboard --install-daemon

Note

pnpm demands explicit approval for packages with build scripts. approve-builds -g is not supported for global installs, so use --allow-build=openclaw on the pnpm add -g command instead.

bun

bun add -g --trust openclaw@latest
openclaw onboard --install-daemon

Note

--trust enables OpenClaw's package lifecycle scripts for this installation. Bun can install the global package, but the resulting openclaw executable needs a supported Node runtime because OpenClaw state relies on node:sqlite.

From source

For contributors or anyone wanting to run from a local checkout:

git clone https://github.com/openclaw/openclaw.git
cd openclaw
pnpm install && pnpm build && pnpm ui:build
pnpm link --global
openclaw onboard --install-daemon

Alternatively, skip the link and run pnpm openclaw ... from within the repo. Full development workflows are described in Setup.

Install from the GitHub main checkout

curl -fsSL --proto '=https' --tlsv1.2 https://openclaw.ai/install.sh | bash -s -- --install-method git --version main

Containers and package managers

  • Ansible, Automated fleet provisioning.

  • Bun, Optional dependency installer and package-script runner.

  • ClawDock, Community Docker Compose setup and shell helpers.

  • Docker, Containerized or headless deployments.

  • Nix, Declarative install via Nix flake.

  • Podman, Rootless container alternative to Docker.

Verify the install

openclaw --version      # confirm the CLI is available
openclaw doctor         # check for config issues
openclaw gateway status # verify the Gateway is running

For managed startup after installation:

  • macOS: LaunchAgent via openclaw onboard --install-daemon or openclaw gateway install
  • Linux/WSL2: systemd user service through the same commands
  • Native Windows: Scheduled Task first, with a per-user Startup-folder login item fallback if task creation is denied

Hosting and deployment

Deploy OpenClaw on a cloud server or VPS. See Linux server for the full provider picker (DigitalOcean, Hetzner, Hostinger, Fly.io, GCP, Azure, Railway, Northflank, Oracle Cloud, Raspberry Pi, and more), deploy declaratively on Render, or try the experimental Cloudflare Containers template.

  • Cloudflare, Experimental Worker + Container deployment.

  • Docker VM, Shared Docker steps.

  • Kubernetes, Deploying with K8s.

  • macOS VM, A macOS environment that runs in isolation, either locally or on a hosted service.

  • Upstash Box, A managed Linux host where access is secured through an SSH tunnel.

  • VPS, Choose any provider you prefer.

Back up, update, migrate, or uninstall

  • Backups, Make, check, and restore saved state files.

  • Updating, Ensure OpenClaw stays current.

  • Migrating, Relocate to a different machine.

  • Uninstall, Completely erase OpenClaw.

Troubleshooting: openclaw not found

In nearly every case, the culprit is a PATH problem: npm's global bin folder is missing from your shell's PATH. For the complete remedy, including how to handle it on Windows, refer to Node.js troubleshooting.

node -v           # Node installed?
npm prefix -g     # Where are global packages?
echo "$PATH"      # Is the global bin dir in PATH?
944 words · updated Aug 25, 2026