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?
Runbrew install node@22, thencurl -fsSL https://openclaw.ai/install-cli.sh | bash, thenopenclaw onboard. Works identically on M-series and Intel Macs.How do I install OpenClaw on Windows?
Install WSL2 first (wsl --install -d Ubuntufrom 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 namedopenclaw, 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
Install Node 22+
brew install node@22 - 2
Run the OpenClaw installer
curl -fsSL https://openclaw.ai/install-cli.sh | bash - 3
Onboard
openclaw onboardPick QuickStart, paste your Anthropic or OpenAI key, name your agent.
- 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 | bashThe 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 onboardYou 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.
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: 4GThen:
docker compose up -d
docker compose exec openclaw openclaw onboardThe 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 systemdFull 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 onboardDon't lose your shell
WSL preserves state between sessions. Once OpenClaw is set up, opening a new Windows Terminal tab and runningopenclaw 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| Output | Meaning | Fix |
|---|---|---|
| Runtime: stopped | Daemon never started | openclaw gateway start |
| Runtime: running, healthy | All good | Move on |
| models list returns [] | API key wrong or wrong base URL | See troubleshooter |
| chat hangs forever | OpenRouter base URL bug | troubleshooting |
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-searchfor proper web search,imap-smtp-emailfor 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
Want OpenClaw without the ops?
Provision is the managed OpenClaw cloud — agents, channels, browser, and skills, all running. $99/mo. 48-hour free trial.