Setup guide14 minUpdated 2026-05-06

Install OpenClaw — every path that actually works.

OpenClaw runs on Mac, Windows (via WSL2), Linux, Docker, Raspberry Pi, and any VPS. Five distinct install paths, and the right pick depends on whether you're trying it out, leaving it running 24/7, or putting it in front of a team. This guide walks each one with the exact commands.

Quick answers

  • What's the easiest way to install OpenClaw?

    The one-line installer on macOS or Linux: curl -fsSL https://openclaw.ai/install-cli.sh | bash. It detects your OS, installs Node if missing, installs OpenClaw, and launches the conversational onboarding wizard. Total time: ~10 minutes.
  • How do I install OpenClaw on Mac?

    Run brew install node@22, then curl -fsSL https://openclaw.ai/install-cli.sh | bash, then openclaw onboard. Works identically on M-series and Intel Macs.
  • How do I install OpenClaw on Windows?

    Install WSL2 first (wsl --install -d Ubuntu from admin PowerShell), reboot, then run the standard one-liner inside the Ubuntu shell. Native Windows is partially supported but not the recommended path.
  • How do I install OpenClaw on Linux?

    Install Node 22+, create a non-root user named openclaw, then run the one-line installer as that user. Don't run OpenClaw as root.
  • What's the fastest setup for OpenClaw?

    DigitalOcean's 1-Click OpenClaw app — provisions a VPS with OpenClaw, NGINX, and a default config in 60 seconds. Harden it after with the day-1 security checklist.
  • Do I need an API key to install OpenClaw?

    Not to install — but you need one to run a useful agent. Free options: Anthropic ($5 in trial credit), OpenRouter (pay as you go), or Ollama (local model, no API key needed at all).

Decide first

Pick your path

The fastest install for your situation depends on where you'll run OpenClaw and how long it needs to live. Pick a platform below and the rest of the page assumes that path.

Pick your platform

  1. 1

    Install Node 22+

    brew install node@22
  2. 2

    Run the OpenClaw installer

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

    Onboard

    openclaw onboard

    Pick QuickStart, paste your Anthropic or OpenAI key, name your agent.

  4. 4

    First chat

    openclaw chat

Rule of thumb

Trying it out for an afternoon? Use the one-liner on your laptop. Running it past Friday? Move it to a VPS with Docker before you build memory you don't want to lose.

Before you start

Prerequisites

  • Node.js 22 or higher. Earlier versions break on the gateway's structured-clone usage.
  • An LLM API key. Anthropic (Claude), OpenAI, OpenRouter, or a local Ollama install. You'll paste it during onboarding.
  • 2 GB free RAM minimum, 4 GB recommended. Browser automation pushes that to 8 GB.
  • A non-root user. If you're on a fresh VPS, create one before you run anything.

Easiest

Path 1 — the one-line installer

The official installer detects your OS, installs Node if it's missing, installs OpenClaw, and launches the conversational onboarding flow. Works on macOS and Linux out of the box.

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

The onboarding wizard asks for:

  • Install option (pick QuickStart)
  • LLM provider (Anthropic, OpenAI, OpenRouter, or local Ollama)
  • API key (paste it; never committed to git)
  • Agent name (the one your channels will see)

Verify the installer's source

curl | bash is convenient and dangerous. Read the script first if you're security-conscious: openclaw.ai/install-cli.sh.

Granular control

Path 2 — npm (advanced)

If you'd rather manage Node and binaries yourself:

npm install -g @openclaw/cli
openclaw onboard

You get the same onboarding flow. Use this path when you want to pin a specific OpenClaw version, run multiple OpenClaw versions side by side, or integrate with an existing Node toolchain.

Most production setups

Path 3 — Docker

The recommended way to run OpenClaw long-term. Process isolation, easy updates, sane resource limits, and persistence that survives crashes.

docker-compose.ymlyaml
services:
  openclaw:
    image: openclaw/openclaw:latest
    restart: unless-stopped
    ports:
      - "127.0.0.1:18789:18789"
    volumes:
      - ./state:/root/.openclaw
    environment:
      - ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
    deploy:
      resources:
        limits:
          memory: 4G

Then:

docker compose up -d
docker compose exec openclaw openclaw onboard

The full Docker setup (volumes, browser, updates, monitoring) is in the OpenClaw on Docker guide.

Always-on

Path 4 — VPS

For 24/7 operation. Hetzner CPX21 (€7/mo) or DigitalOcean s-2vcpu-4gb ($14/mo) is the sweet spot for personal use. Pick the dedicated guide for the full hardening walk-through.

The minimum sequence on a fresh Ubuntu 24.04:

# As root
adduser openclaw
usermod -aG sudo openclaw
ssh-copy-id openclaw@your-vps-ip   # from your laptop

# As openclaw
curl -fsSL https://openclaw.ai/install-cli.sh | bash
openclaw onboard
openclaw service install   # registers with systemd

Full guide: deploy OpenClaw on a VPS.

Windows users

Path 5 — Windows / WSL2

OpenClaw on Windows means OpenClaw on WSL2 (Windows Subsystem for Linux). PowerShell-only setups are not supported.

# In an admin PowerShell:
wsl --install -d Ubuntu

# Reboot if prompted, then in your new Ubuntu shell:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
curl -fsSL https://openclaw.ai/install-cli.sh | bash
openclaw onboard

Don't lose your shell

WSL preserves state between sessions. Once OpenClaw is set up, opening a new Windows Terminal tab and running openclaw chat drops you straight into the agent.

Sanity check

Verify it's working

After install, run these three commands. They should all return clean output.

openclaw gateway status
openclaw models list
openclaw chat
OutputMeaningFix
Runtime: stoppedDaemon never startedopenclaw gateway start
Runtime: running, healthyAll goodMove on
models list returns []API key wrong or wrong base URLSee troubleshooter
chat hangs foreverOpenRouter base URL bugtroubleshooting

Day 2

What to do next

You have an agent that responds to chat. Now make it useful:

  • Add a channel. Telegram is the easiest — 3 minutes from BotFather to working bot. See Telegram setup.
  • Install a few skills. tavily-search for proper web search, imap-smtp-email for email. Browse ClawHub.
  • Set a cron job. A daily 09:00 digest is the canonical "I love this thing" moment. See the tutorial.
  • Lock it down. Run through the day-1 security checklist before you connect anything important.

FAQ

Which install path should I pick?
If you're trying it out: the one-line installer on Mac or Linux. If you'll leave it running 24/7: Docker on a $5–$15 VPS. If you're on Windows: WSL2 + the one-liner inside WSL. The interactive picker above shows the exact commands for each.
Can I install OpenClaw on Windows without WSL?
Native Windows support is partial — the gateway runs but several skills (especially shell-heavy ones) assume a POSIX environment. WSL2 is the supported path and works flawlessly on Windows 11.
How much disk space does it need?
About 1 GB for OpenClaw itself plus dependencies. Memory and skills add over time — budget 5–10 GB for typical usage, more if you store screenshots or large research outputs.
Should I install OpenClaw as root?
No, never. The installer warns you. Always run as a dedicated non-root user — `adduser openclaw && su - openclaw` then install. It's not paranoia; OpenClaw runs arbitrary code via skills.
How do I update OpenClaw later?
`openclaw update`. It pulls the latest version, restarts the gateway, runs migrations. Safe to run any time. If the post-update restart fails (a known regression), `openclaw gateway restart` finishes the job.
Can I uninstall cleanly?
Yes. `openclaw uninstall` removes the binary and service. To wipe state too, also remove `~/.openclaw/`. Both commands are idempotent.

Want OpenClaw without the ops?

Provision is the managed OpenClaw cloud — agents, channels, browser, and skills, all running. $99/mo. 48-hour free trial.