Guides

OpenClaw Install Overview

5 min read

Browse more in Guides.

All guides guides →

This guide walks you through the OpenClaw install options so you can pick the right path for your machine and workflow. You see how the installer script, package managers, and source installs fit together, and how to verify that the CLI and Gateway run correctly.

By the end, you have OpenClaw installed, onboarded, and ready to deploy on your local machine or a server.

Setup flow

Prerequisites

  • A machine running macOS, Linux, or Windows (native Windows or WSL2; WSL2 is more stable).
  • Node 24 (recommended) or Node 22.14+ — the installer script can install this for you.
  • pnpm installed only if you plan to build and run OpenClaw from source.

Steps

  1. 1

    Run the recommended installer script

    Start with the installer script if you want the fastest path: it detects your OS, installs Node if needed, installs OpenClaw, and launches onboarding. Use the bash variant on macOS, Linux, or WSL2, and the PowerShell variant on Windows.

    This keeps you on the supported Node versions without manual setup.

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

    Install on Windows with PowerShell

    On native Windows, use the PowerShell installer so OpenClaw sets up correctly in the Windows environment. This path mirrors the bash installer but uses Windows-native tooling.

    Run it from an elevated or user PowerShell session depending on how you manage global tools.

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

    Install without running onboarding

    If you automate installs or want to defer onboarding, use the `--no-onboard` flag. This installs OpenClaw but skips the interactive onboarding flow, which is useful in CI or scripted setups.

    You can run onboarding later with the CLI.

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

    Install without onboarding on Windows

    For Windows automation, use the PowerShell installer variant that disables onboarding. This keeps the install non-interactive while still setting up the CLI correctly.

    It is a better fit for scripts and repeatable setups.

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

    Use the local prefix installer when you want an isolated install

    sh` script. This keeps your OpenClaw environment self-contained and avoids conflicts with other Node setups.

    It supports npm and git-checkout installs under the same prefix.

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

    Install OpenClaw with npm when you manage Node yourself

    If you already manage Node, install OpenClaw globally with npm and then run onboarding to set up the Gateway daemon. This path fits well into existing Node workflows and lets you control Node versions yourself.

    Make sure your global npm bin directory is on your PATH.

    bash
    npm install -g openclaw@latest
    openclaw onboard --install-daemon
  7. 7

    Install OpenClaw with pnpm and approve builds

    With pnpm, you install OpenClaw globally and then explicitly approve packages with build scripts. The `pnpm approve-builds -g` step is required after the first install or pnpm will block builds.

    After that, onboarding installs the daemon like with npm.

    bash
    pnpm add -g openclaw@latest
    pnpm approve-builds -g
    openclaw onboard --install-daemon
  8. 8

    Install OpenClaw with bun for CLI-only usage

    If you prefer bun for global CLI tools, you can install OpenClaw with bun and then run onboarding. Bun is supported for the CLI install path, but Node remains the recommended runtime for the Gateway daemon.

    Use this when bun already fits into your toolchain.

    bash
    bun add -g openclaw@latest
    openclaw onboard --install-daemon
  9. 9

    Work around sharp build errors during npm install

    If the npm install fails with `sharp` build errors due to a globally installed libvips, set `SHARP_IGNORE_GLOBAL_LIBVIPS=1` for the install command. This tells sharp to ignore the global libvips and proceed with its own build.

    It is a targeted fix for a common native dependency issue.

    bash
    SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g openclaw@latest
  10. 10

    Install OpenClaw from source for development

    When you contribute or want a local checkout, clone the repo and use pnpm to install dependencies, build the UI, and build the project. Linking globally exposes the `openclaw` command, and onboarding then installs the daemon.

    You can also skip the link and run via `pnpm openclaw` inside the repo.

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

    Install OpenClaw from GitHub main

    If you want the latest main branch without cloning the repo, install directly from GitHub. This gives you a global CLI built from `main`, which may be ahead of the latest release.

    Use this when you need unreleased fixes or features and accept the extra churn.

    bash
    npm install -g github:openclaw/openclaw#main
  12. 12

    Verify the OpenClaw install and Gateway status

    After any install path, verify that the CLI is available and the Gateway is running. `openclaw --version` confirms the binary, `openclaw doctor` checks for config issues, and `openclaw gateway status` confirms the daemon.

    Run these before debugging anything more complex.

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

    Configure managed startup for the Gateway

    If you want OpenClaw to start automatically, use onboarding or the gateway install command to set up a managed service. On macOS this creates a LaunchAgent, on Linux/WSL2 a systemd user service, and on native Windows a Scheduled Task with a Startup-folder fallback.

    This keeps your Gateway running across reboots without manual commands.

    bash
    openclaw onboard --install-daemon

Troubleshooting

npm install fails with sharp build errors related to a globally installed libvips

This happens when sharp picks up a globally installed libvips that is incompatible with the build. Force sharp to ignore the global libvips by setting `SHARP_IGNORE_GLOBAL_LIBVIPS=1` on the npm install command, then reinstall OpenClaw globally.

bash
SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g openclaw@latest

`openclaw: command not found` after install

The install likely succeeded but your shell cannot see the global npm bin directory. Check that Node is installed, find the global npm prefix, and confirm that its `bin` directory is on your PATH; if not, export it in your shell startup file and open a new terminal.

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

export PATH="$(npm prefix -g)/bin:$PATH"

Frequently asked questions

Powered by Mem0

Add persistent memory to OpenClaw

Official Mem0 plugin for OpenClaw keeps context across chats and tools. Smaller prompts, lower cost, better continuity for your agents.

More in Guides