Files
Peter Steinberger b85a049da5 chore: migrate tooling and source installs to pnpm 12 (#131043)
* build: migrate tooling and source installs to pnpm 12

Pin the verified native toolchain without changing application dependency
versions. Preserve the existing release-age policy explicitly and separate
package-manager lock metadata from the application dependency graph.

Use exact checkout pins for bootstrap and rollback, approve only the native
pnpm installer where npm requires it, and retain global install ownership
without equating the CLI major to the storage layout. Verify the Docker
runtime toolchain offline as its non-root user.

Remove duplicate bootstrap paths and obsolete prune input, update native
CLI flags and regression fixtures, and preserve UTF-8 in macOS Bash
installer NDJSON output.

* fix(build): isolate production dependency installs for pnpm 12

Build production dependencies from the same frozen manifest inputs instead
of pruning the inherited development tree. pnpm 12's native hoisted
importer cannot rename lower-layer OverlayFS directories during pruning.
Preserve native addon outputs, workspace builds, and offline non-root
Corepack use while deleting the obsolete production-store seeder.

Exercise runtime assembly and explicitly consent to the local agent-plugin
E2E fixture under the current plugin capability contract.

Validated full Matrix image and offline non-root runtime, focused Docker
regressions, full checks with test types and architecture, docs, real
agent-plugin gateway E2E, and isolated Codex autoreview.

* test: align package smoke with pnpm 12 global installs

* test: follow native pnpm artifact approval in distribution guard

* test: modernize pnpm fixtures for v12

* test: align rebased update fixtures with pnpm 12

* test: retain sanitized upgrade restart diagnostics

* test: expose CI navigation failures and register diagnostics

* test: retain post-core outcomes and plugin artifact identity

* chore(tooling): group upgrade diagnostic entrypoints

* fix(update): support native pnpm global installs and source links

Qualify local source and archive specs, carry verified global ownership through pnpm configuration, and verify intentional checkout links with shared runtime-readiness checks. Preserve strict packaged-install verification and manager ownership safeguards.

Verified the production updater with pnpm 11.22 and 12 using default and custom roots, source links, and tarball updates.

* test: preserve survivor diagnostics after service sealing

Promote incomplete exit-zero runs before failure capture and exercise the sealed-service manager fixture without inventing successful child exits.

* fix(update): preserve legacy pnpm global ownership

Carry the verified root and bin through both pnpm and npm configuration dialects after original-environment probes. Real pnpm 10 custom-root updates and pnpm 11/12 source and tarball matrices pass without redirecting the caller or weakening ownership checks.

* test(update): verify wizard consent through checkout handoff

Use the prepared checkout and fresh-process finalization boundary introduced by the updater repair. Preserve explicit consent forwarding before and after the wizard subcommand without assuming plugin callbacks run in the old process.

* refactor(update): validate checkout build metadata records

Use the canonical record coercer instead of carrying an unchecked assertion into the shared runtime verifier. Remove the now-unused grandfathered assertion entry; no allowance is added.

* docs(sandbox): document standalone common-image inputs

* test(packaging): account for required native prebuilds

Align installer and release size budgets at 235 MiB for the required native payload added on main. Keep both loader layouts, upstream binaries, explicit overrides, and missing-data rejection intact. Exercise actual defaults and the one-byte boundary. Retain bounded stderr diagnostics for the intermittent Bun signal test without claiming a production signal fix.

* test: align refreshed installer fixtures with pnpm 12

* fix(test): share Bun smoke force-kill ownership

Record the successful force-kill once across the timer and post-close drain. Native Darwin traces reproduced both duplicate-signal orders; genuine permission failures and uncleared groups still fail without extending deadlines.
2026-08-28 17:43:09 -07:00

10 KiB

summary, read_when, title
summary read_when title
Install OpenClaw - desktop app downloads, installer script, npm/pnpm/bun, from source, Docker, and more
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
Install

System requirements

  • Node 22.22.3+, 24.15+, or 25.9+ - Node 26 is recommended; the installer provisions Node 26 on macOS and Node 24 LTS on Linux when Node is missing.
  • macOS, Linux, or Windows - Windows users can start with the native Windows Hub app, the PowerShell CLI installer, or a WSL2 Gateway. See Windows.
  • pnpm is only needed if you build from source.

Download the desktop app

Prefer a normal app download over the CLI? OpenClaw ships desktop companions:

Both desktop apps can provision a local Gateway during first-run setup, or connect to an existing remote Gateway.

The fastest way to install. It detects your OS, installs Node if needed, installs OpenClaw, and launches onboarding.

Windows desktop users can also install the native [Windows Hub](/platforms/windows#recommended-windows-hub) companion app, which includes setup, tray status, chat, node mode, and local MCP mode. ```bash curl -fsSL https://openclaw.ai/install.sh | bash ``` ```powershell iwr -useb https://openclaw.ai/install.ps1 | iex ```

To install without running onboarding:

```bash curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard ``` ```powershell & ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -NoOnboard ```

For all flags and CI/automation options, see Installer internals.

Alternative install methods

Local prefix installer (install-cli.sh)

Use this when you want OpenClaw and Node kept under a local prefix such as ~/.openclaw, without depending on a system-wide Node install:

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

It supports npm installs by default, plus git-checkout installs under the same prefix flow. Full reference: Installer internals.

Already installed? Switch between package and git installs with openclaw update --channel dev and openclaw update --channel stable. See Updating.

npm, pnpm, or bun

If you already manage Node yourself:

On npm 12 or npm 11.16+:
```bash
npm install -g openclaw@latest --allow-scripts=openclaw
openclaw onboard --install-daemon
```

On npm 11.15 and earlier, use the same command without
`--allow-scripts=openclaw`.

<Note>
npm 12 blocks unapproved package lifecycle scripts by default. The
`--allow-scripts=openclaw` option explicitly allows OpenClaw's `preinstall`
and `postinstall` steps; without it, npm reports them as `blocked because
they are not covered by allowScripts`.

npm 11.16 accepts the option but otherwise only warns that the scripts are
`not yet covered by allowScripts` and still runs them. npm 11.15 and earlier
have neither the policy nor the option, so their command must be unflagged.
The `npm approve-scripts openclaw`
command suggested by npm 11.16 does not work for a global install — it fails
with `ENOMATCH  No installed packages match: openclaw`.
</Note>

<Note>
The hosted installer clears npm freshness filters such as `min-release-age`
for the OpenClaw package install. If you install manually with npm, your own
npm policy still applies.
</Note>
```bash pnpm add -g --allow-build=openclaw openclaw@latest openclaw onboard --install-daemon ```
<Note>
pnpm requires explicit approval for packages with build scripts. `approve-builds -g` is not supported for global installs, so pass `--allow-build=openclaw` on the `pnpm add -g` command instead.
</Note>
```bash bun add -g --trust openclaw@latest bun run --bun openclaw onboard --install-daemon --daemon-runtime bun ```
<Note>
`--trust` allows OpenClaw's package lifecycle scripts for this install. Bun
1.4 or newer can also run OpenClaw's CLI, local agent, and Gateway. Node
remains the primary runtime, so the plain `openclaw` executable keeps its
Node shebang. `bun run --bun` forces the Bun runtime, while
`--daemon-runtime bun` installs the managed Gateway under Bun.
</Note>

From source

For contributors or anyone who wants to run from a local checkout:

git clone https://github.com/openclaw/openclaw.git
cd openclaw
corepack enable
pnpm install && pnpm build && pnpm ui:build
pnpm add --global "openclaw@link:$PWD"
openclaw onboard --install-daemon

pnpm add --global "openclaw@link:$PWD" links the CLI to this checkout without changing its package files. If pnpm reports that its global bin directory is not on PATH, run pnpm setup, reopen your shell, and retry.

Corepack selects the exact pnpm version from package.json (currently pnpm 12). If Corepack is unavailable, install that version explicitly with npm install -g pnpm@12.0.0 --allow-scripts=pnpm@12.0.0; keep npm install scripts and optional dependencies enabled so pnpm can provision its native executable.

Or skip the global install and use pnpm openclaw ... from inside the repo. See Setup for full development workflows.

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

Automated fleet provisioning. Optional dependency installer and package-script runner. Community Docker Compose setup and shell helpers. Containerized or headless deployments. Declarative install via Nix flake. 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

If you want managed startup after install:

  • macOS: LaunchAgent via openclaw onboard --install-daemon or openclaw gateway install
  • Linux/WSL2: systemd user service via 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.

Experimental Worker + Container deployment. Shared Docker steps. K8s deployment. Isolated local or hosted macOS deployment. Managed Linux host with SSH-tunneled access. Pick a provider.

Back up, update, migrate, or uninstall

Create, verify, and restore state archives. Keep OpenClaw up to date. Move to a new machine. Remove OpenClaw completely.

Troubleshooting: openclaw not found

Almost always a PATH issue: npm's global bin directory isn't on your shell's PATH. See Node.js troubleshooting for the full fix, including the Windows path.

node -v           # Node installed?
npm prefix -g     # Where are global packages?
echo "$PATH"      # Is the global bin dir in PATH?