All guides
Getting startedSetup

How to install OpenClaw AI — complete setup guide

Install OpenClaw AI in under 15 minutes on Windows, macOS, or Linux. Complete step-by-step guide with commands, troubleshooting, and first setup walkthrough.

10 min readUpdated 2026-04-04

What you'll learn

  • What OpenClaw actually is and why it's worth setting up
  • Exact install commands for macOS, Linux, and Windows
  • How to complete the onboarding wizard and connect your first AI model
  • How to verify everything is working
  • The 3 most common install errors and how to fix them

What is OpenClaw?

OpenClaw is an open-source AI agent that runs on your own machine. Think of it as a personal AI assistant that lives on your hardware — not in someone else's cloud — and connects to every major AI model through a single gateway.

Once it's running, you can control it from your terminal, a browser dashboard, or even WhatsApp and Telegram. You pick the AI model. You keep your data. You pay only for what you use.

It has over 199,000 GitHub stars for a reason. Let's get it installed.

Before you start

What you need:

  • A computer running macOS, Linux, or Windows (Windows users: you'll need WSL2 — covered below)
  • An API key from at least one AI provider — OpenRouter is the easiest starting point (free to sign up, pay per use)
  • About 15 minutes

Node.js: OpenClaw requires Node.js 22.16 or higher (Node 24 recommended). The installer handles this automatically for most setups.

Step 1 — Install OpenClaw

macOS or Linux

Open your terminal and run this single command:

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

That's it. The script detects your OS, installs Node.js if needed, installs OpenClaw globally, and launches the onboarding wizard automatically.

If you already have Node 22+ and prefer to manage things yourself:

npm install -g openclaw@latest
openclaw onboard --install-daemon

Windows (WSL2) — Recommended

WSL2 is the recommended way to run OpenClaw on Windows. If you don't have it yet:

  1. Open PowerShell as Administrator
  2. Run: wsl --install
  3. Restart your computer when prompted
  4. Open the new Ubuntu app and set your username and password

Then inside WSL2, run the same command as macOS/Linux:

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

Windows (Native PowerShell)

Prefer to skip WSL2? Run this in PowerShell:

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

Step 2 — Complete the onboarding wizard

After install, the onboarding wizard launches automatically. If it doesn't, run:

openclaw onboard --install-daemon

The wizard walks you through four things:

1. Gateway setup

The Gateway is OpenClaw's control plane — a background service that keeps everything running. It's installed as a system service (launchd on macOS, systemd on Linux) so it starts automatically with your computer. Just confirm when prompted.

2. Connect an AI provider

This is where you paste your API key. OpenRouter is the best starting point — one key unlocks Claude, GPT-4o, Gemini, Mistral, and dozens more.

To connect OpenRouter directly:

openclaw onboard --provider openrouter --token YOUR_OPENROUTER_API_KEY

Or just paste your key when the wizard asks. Anthropic and OpenAI direct connections are supported too.

3. Workspace and channels

Your workspace lives at ~/.openclaw/ — this is where skills, settings, and history are stored. Channels are how you talk to OpenClaw. Enable the default WebChat channel for now. WhatsApp, Telegram, Slack, and Discord can be added later.

4. First conversation

The wizard ends with a test message to confirm everything is connected. A response from your chosen model means the install is complete.

Step 3 — Verify the install

# Check OpenClaw version
openclaw --version

# Check the gateway is running
openclaw status

# Catch any config issues
openclaw doctor

# Open the browser dashboard
openclaw dashboard

If openclaw status shows the gateway running and openclaw doctor comes back clean, you're set. The dashboard opens at http://localhost:18789 and gives you a full visual interface for models, skills, and conversations.

Step 4 — Send your first message

openclaw message "What can you help me with?"

If you get a response, the full install is working.

Common errors and fixes

"openclaw: command not found"

The npm bin directory isn't in your PATH. Add this to your ~/.zshrc or ~/.bashrc:

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

Then reload your shell:

source ~/.zshrc

"sharp: Please add node-gyp to your dependencies"

Conflict with a globally installed libvips (common on macOS with Homebrew). Fix:

SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g openclaw@latest

"Permission denied" on Linux

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

Or fix your npm permissions to avoid needing sudo for global installs.

Gateway won't start

Run openclaw doctor — it surfaces exactly what's misconfigured. Most often it's a missing or expired API key.

What to do next

  1. Connect OpenRouter — unlocks every major AI model from one place. See the connecting OpenClaw to OpenRouter guide.
  2. Add your first skill — skills are what make OpenClaw genuinely powerful. Start with the top 5 skills for productivity guide.
  3. Pick the right model — the default might not be the best for your use case. The which AI model should you use guide tells you exactly which model fits.

Quick reference

# Install (macOS / Linux / WSL2)
curl -fsSL https://openclaw.ai/install.sh | bash

# Install (Windows PowerShell)
iwr -useb https://openclaw.ai/install.ps1 | iex

# Install via npm (Node 22+ already installed)
npm install -g openclaw@latest
openclaw onboard --install-daemon

# Status and health
openclaw status
openclaw doctor

# Open dashboard
openclaw dashboard

# Send a message
openclaw message "your message here"

# Update
openclaw update

Enjoyed this? Get more guides in your inbox.

Weekly OpenClaw tips, new guides, and skill pack updates.

No spam. Unsubscribe anytime.

Related guides

Something not working or have a question? Ask in the ClawMatic Discord →