2026-01-12 01:08:00 +00:00
---
2026-01-30 03:15:10 +01:00
summary: "Install OpenClaw (recommended installer, global install, or from source)"
2026-01-12 01:08:00 +00:00
read_when:
2026-01-30 03:15:10 +01:00
- Installing OpenClaw
2026-01-12 01:08:00 +00:00
- You want to install from GitHub
2026-01-31 16:04:03 -05:00
title: "Install"
2026-01-12 01:08:00 +00:00
---
# Install
2026-01-20 07:42:21 +00:00
Use the installer unless you have a reason not to. It sets up the CLI and runs onboarding.
2026-01-12 01:08:00 +00:00
2026-01-20 07:42:21 +00:00
## Quick install (recommended)
2026-01-16 23:18:44 +00:00
```bash
2026-01-31 13:57:35 +01:00
curl -fsSL https://openclaw.ai/install.sh | bash
2026-01-16 23:18:44 +00:00
```
2026-01-20 07:42:21 +00:00
Windows (PowerShell):
2026-01-16 23:18:44 +00:00
2026-01-20 07:42:21 +00:00
```powershell
2026-01-30 03:15:10 +01:00
iwr -useb https://openclaw.ai/install.ps1 | iex
2026-01-20 07:42:21 +00:00
```
Next step (if you skipped onboarding):
2026-01-16 23:18:44 +00:00
```bash
2026-01-30 03:15:10 +01:00
openclaw onboard --install-daemon
2026-01-16 23:18:44 +00:00
```
2026-01-20 07:42:21 +00:00
## System requirements
2026-01-16 23:10:10 +00:00
2026-01-20 07:42:21 +00:00
- **Node >=22**
- macOS, Linux, or Windows via WSL2
- `pnpm` only if you build from source
## Choose your install path
### 1) Installer script (recommended)
2026-01-30 03:15:10 +01:00
Installs `openclaw` globally via npm and runs onboarding.
2026-01-12 01:08:00 +00:00
```bash
2026-01-31 13:57:35 +01:00
curl -fsSL https://openclaw.ai/install.sh | bash
2026-01-12 01:08:00 +00:00
```
2026-01-20 07:42:21 +00:00
Installer flags:
2026-01-12 02:00:09 +00:00
```bash
2026-01-31 13:57:35 +01:00
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --help
2026-01-12 02:00:09 +00:00
```
Details: [Installer internals ](/install/installer ).
2026-01-12 01:08:00 +00:00
Non-interactive (skip onboarding):
```bash
2026-01-31 13:57:35 +01:00
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard
2026-01-12 01:08:00 +00:00
```
2026-01-20 07:42:21 +00:00
### 2) Global install (manual)
If you already have Node:
```bash
2026-01-30 03:15:10 +01:00
npm install -g openclaw@latest
2026-01-20 07:42:21 +00:00
```
If you have libvips installed globally (common on macOS via Homebrew) and `sharp` fails to install, force prebuilt binaries:
```bash
2026-01-30 03:15:10 +01:00
SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g openclaw@latest
2026-01-20 07:42:21 +00:00
```
2026-01-22 07:09:20 +00:00
If you see `sharp: Please add node-gyp to your dependencies` , either install build tooling (macOS: Xcode CLT + `npm install -g node-gyp` ) or use the `SHARP_IGNORE_GLOBAL_LIBVIPS=1` workaround above to skip the native build.
2026-02-01 15:36:19 +01:00
Or with pnpm:
2026-01-20 07:42:21 +00:00
```bash
2026-01-30 03:15:10 +01:00
pnpm add -g openclaw@latest
2026-02-01 15:36:19 +01:00
pnpm approve-builds -g # approve openclaw, node-llama-cpp, sharp, etc.
pnpm add -g openclaw@latest # re-run to execute postinstall scripts
2026-01-20 07:42:21 +00:00
```
2026-02-01 15:36:19 +01:00
pnpm requires explicit approval for packages with build scripts. After the first install shows the "Ignored build scripts" warning, run `pnpm approve-builds -g` and select the listed packages, then re-run the install so postinstall scripts execute.
2026-01-20 07:42:21 +00:00
Then:
```bash
2026-01-30 03:15:10 +01:00
openclaw onboard --install-daemon
2026-01-20 07:42:21 +00:00
```
### 3) From source (contributors/dev)
```bash
2026-01-30 03:15:10 +01:00
git clone https://github.com/openclaw/openclaw.git
cd openclaw
2026-01-20 07:42:21 +00:00
pnpm install
pnpm ui:build # auto-installs UI deps on first run
pnpm build
2026-01-30 03:15:10 +01:00
openclaw onboard --install-daemon
2026-01-20 07:42:21 +00:00
```
2026-01-30 03:15:10 +01:00
Tip: if you don’ t have a global install yet, run repo commands via `pnpm openclaw ...` .
2026-01-20 07:42:21 +00:00
### 4) Other install options
- Docker: [Docker ](/install/docker )
- Nix: [Nix ](/install/nix )
- Ansible: [Ansible ](/install/ansible )
- Bun (CLI only): [Bun ](/install/bun )
## After install
2026-01-30 03:15:10 +01:00
- Run onboarding: `openclaw onboard --install-daemon`
- Quick check: `openclaw doctor`
- Check gateway health: `openclaw status` + `openclaw health`
- Open the dashboard: `openclaw dashboard`
2026-01-20 07:42:21 +00:00
## Install method: npm vs git (installer)
2026-01-12 01:08:00 +00:00
The installer supports two methods:
2026-01-30 03:15:10 +01:00
- `npm` (default): `npm install -g openclaw@latest`
2026-01-12 01:08:00 +00:00
- `git` : clone/build from GitHub and run from a source checkout
### CLI flags
```bash
# Explicit npm
2026-01-31 13:57:35 +01:00
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --install-method npm
2026-01-12 01:08:00 +00:00
# Install from GitHub (source checkout)
2026-01-31 13:57:35 +01:00
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --install-method git
2026-01-12 01:08:00 +00:00
```
Common flags:
- `--install-method npm|git`
2026-01-30 03:15:10 +01:00
- `--git-dir <path>` (default: `~/openclaw` )
2026-01-12 01:08:00 +00:00
- `--no-git-update` (skip `git pull` when using an existing checkout)
- `--no-prompt` (disable prompts; required in CI/automation)
- `--dry-run` (print what would happen; make no changes)
- `--no-onboard` (skip onboarding)
### Environment variables
Equivalent env vars (useful for automation):
2026-01-30 03:15:10 +01:00
- `OPENCLAW_INSTALL_METHOD=git|npm`
- `OPENCLAW_GIT_DIR=...`
- `OPENCLAW_GIT_UPDATE=0|1`
- `OPENCLAW_NO_PROMPT=1`
- `OPENCLAW_DRY_RUN=1`
- `OPENCLAW_NO_ONBOARD=1`
2026-01-12 04:24:46 +00:00
- `SHARP_IGNORE_GLOBAL_LIBVIPS=0|1` (default: `1` ; avoids `sharp` building against system libvips)
2026-01-12 01:08:00 +00:00
2026-01-30 03:15:10 +01:00
## Troubleshooting: `openclaw` not found (PATH)
2026-01-12 01:08:00 +00:00
2026-01-20 07:42:21 +00:00
Quick diagnosis:
2026-01-12 01:08:00 +00:00
```bash
2026-01-20 07:42:21 +00:00
node -v
npm -v
2026-01-22 04:26:18 +00:00
npm prefix -g
2026-01-20 07:42:21 +00:00
echo "$PATH"
2026-01-12 01:08:00 +00:00
```
2026-01-30 03:15:10 +01:00
If `$(npm prefix -g)/bin` (macOS/Linux) or `$(npm prefix -g)` (Windows) is **not** present inside `echo "$PATH"` , your shell can’ t find global npm binaries (including `openclaw` ).
2026-01-12 04:24:46 +00:00
2026-01-20 07:42:21 +00:00
Fix: add it to your shell startup file (zsh: `~/.zshrc` , bash: `~/.bashrc` ):
2026-01-12 01:08:00 +00:00
```bash
2026-01-22 04:26:18 +00:00
# macOS / Linux
export PATH="$(npm prefix -g)/bin:$PATH"
2026-01-12 01:08:00 +00:00
```
2026-01-22 04:26:18 +00:00
On Windows, add the output of `npm prefix -g` to your PATH.
2026-01-20 07:42:21 +00:00
Then open a new terminal (or `rehash` in zsh / `hash -r` in bash).
2026-01-12 01:08:00 +00:00
2026-01-20 07:42:21 +00:00
## Update / uninstall
- Updates: [Updating ](/install/updating )
2026-01-26 12:59:06 -08:00
- Migrate to a new machine: [Migrating ](/install/migrating )
2026-01-20 07:42:21 +00:00
- Uninstall: [Uninstall ](/install/uninstall )