OpenClaw Install Guide

Step-by-step installation for every platform. No steps skipped. Every common error documented with an exact fix.

โœ…
Fastest path: If you're on Mac or Linux, run one command and follow the wizard. The installer handles Node.js detection, installation, and setup. Jump to Mac or Linux.

Prerequisites

Before you install OpenClaw, make sure you have (or will have) the following:

๐Ÿ’ฐ
API keys are pay-per-use. For typical personal use with Claude Sonnet, expect $3โ€“$15/month. Budget-conscious? Start with Claude Haiku, which is very cheap and still capable. You can always switch models later.

Mac Installation

Open Terminal

Press Cmd + Space, type Terminal, and hit Enter. Or use iTerm2 if you have it.

Run the installer

Paste this command and press Enter:

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

The script will: detect your OS, install Homebrew if missing, install Node.js 24, install OpenClaw via npm, and launch the onboarding wizard.

Handle the macOS security warning (first run only)

If macOS shows a warning about an "unidentified developer," go to System Settings โ†’ Privacy & Security and click Open Anyway next to the OpenClaw entry. This is a one-time thing.

Complete the onboarding wizard

The wizard (openclaw onboard --install-daemon) will ask you to configure your API provider, set up auth, and optionally connect a channel. See detailed wizard walkthrough below.

Windows Installation

Windows has two paths. WSL2 is strongly recommended because it runs OpenClaw in a Linux environment inside Windows, which is the most stable and supported experience. The native PowerShell path works but has more gotchas.

Path A: Using WSL2 (Recommended)

๐Ÿ’ก
WSL2 (Windows Subsystem for Linux 2) runs a real Linux kernel inside Windows. It sounds intimidating but it's actually straightforward to set up, and it makes OpenClaw significantly more stable.

Install WSL2

Open PowerShell as Administrator (right-click the Start button โ†’ "Windows PowerShell (Admin)" or "Terminal (Admin)") and run:

wsl --install

This installs WSL2 with Ubuntu. Restart your computer when prompted.

Open Ubuntu (WSL2)

After restarting, search for "Ubuntu" in the Start menu. It will finish setup on first launch and ask you to create a username and password. Use a simple username (no spaces). Remember this password; you'll need it for sudo commands.

Install OpenClaw inside WSL2

In the Ubuntu terminal, run:

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

This runs the same installer as Mac/Linux. It will install Node.js and OpenClaw.

Run onboarding

openclaw onboard --install-daemon

Path B: Native PowerShell

โš ๏ธ
Native Windows is supported but OpenClaw's own docs say WSL2 is preferred. If you run into issues on native Windows that you can't fix, switching to WSL2 is the most reliable solution.

Open PowerShell as Administrator

Right-click the Start button โ†’ Terminal (Admin) or Windows PowerShell (Admin). The "as Administrator" part is important because the installer needs elevated permissions to modify PATH.

Run the installer

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

The script will install Node.js via winget (or Chocolatey as fallback), install OpenClaw via npm, add the bin directory to your PATH, and launch onboarding.

Close and reopen PowerShell

After install, close PowerShell completely and open a fresh terminal. This reloads the PATH so the openclaw command is recognized.

Run onboarding

openclaw onboard --install-daemon

Linux / VPS Installation

Connect to your server

For a local Linux machine: open Terminal. For a VPS: ssh user@your-server-ip

โš ๏ธ
Avoid using 1-click marketplace images from DigitalOcean, Linode, etc. for OpenClaw. Start with a clean Ubuntu 22.04 LTS image and install yourself. 1-click images often have outdated Node.js or conflicting setups.

Run the installer

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

On Ubuntu/Debian, the installer uses NodeSource scripts to install Node.js 24. On CentOS/RHEL, it uses dnf/yum. Handles everything automatically.

Run onboarding

openclaw onboard --install-daemon

On a VPS with no TTY (piped input), add --no-prompt for non-interactive setup. Configure via the config file instead.

Set up as a system service (recommended for VPS)

The --install-daemon flag above handles this. It installs OpenClaw as a systemd service that starts automatically on boot. Check status with:

openclaw gateway status

Running the Onboarding Wizard

The onboarding wizard (openclaw onboard) walks you through the essential configuration. Here's what it will ask:

  1. AI provider: Choose Anthropic (Claude), OpenAI, or another provider. Anthropic is recommended for best results.
  2. API key: Paste your API key from the provider's dashboard.
  3. Model: Default is Claude Sonnet (good balance of capability and cost). Claude Haiku for budget-conscious; Claude Opus for maximum capability.
  4. Workspace: The folder where OpenClaw stores your identity files, memory, and workspace files. Default: ~/.openclaw/workspace. Accept the default unless you have a reason to change it.
  5. Channels (optional): Connect Discord, Telegram, or WhatsApp now, or skip and do it later. Discord is the easiest starting point.
  6. Install as service: Whether to install the Gateway as a background service that starts on boot. Recommended: yes.
๐Ÿ’ก
After onboarding, run openclaw setup to create the workspace identity files (SOUL.md, USER.md, AGENTS.md, etc.) with sensible defaults. These files define who your agent is and how it behaves.

Verify It Works

Check Gateway status

openclaw gateway status

Should show "running" or similar. If it shows "stopped," run openclaw gateway start.

Run the doctor

openclaw doctor

Checks for common configuration issues. Fix anything it flags before proceeding.

Open the Control UI

openclaw dashboard

This opens a browser at http://127.0.0.1:18789/. You should see the OpenClaw control panel. Try sending a message in the chat interface. If you get a response from the AI, everything is working.

Common Errors and Exact Fixes

The npm global bin directory isn't in your PATH. Fix:

npm config get prefix

Copy the output (e.g., C:\Users\YourName\AppData\Roaming\npm). Go to System Settings โ†’ Advanced โ†’ Environment Variables, find Path in "User variables," click Edit, and add that directory. Close and reopen PowerShell.

Git isn't installed or not in PATH. Download and install Git for Windows, then close and reopen PowerShell and re-run the installer.

This happens when libvips is installed globally via Homebrew. Fix by setting an environment variable:

SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g openclaw@latest

npm's global prefix is pointing to a root-owned directory. Fix by changing the global npm prefix to your home directory:

mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
npm install -g openclaw@latest

Something else is using that port. Run the gateway on a different port:

openclaw gateway --port 18790

Or kill whatever is using 18789. On Linux/Mac: lsof -i :18789 to find the process, then kill [PID].

Usually an API key issue. Check: openclaw doctor. Common causes: API key not set, API key has no credit, wrong provider selected. Check your config at ~/.openclaw/openclaw.json and verify the agents.defaults.model and auth sections.

First Things To Do After Install

Run setup to create workspace files

openclaw setup

This creates the identity files (SOUL.md, USER.md, AGENTS.md, etc.) with default templates. Edit these to customize your agent's personality and context.

Edit USER.md

Open ~/.openclaw/workspace/USER.md in any text editor. Add your name, timezone, how you like things explained, your work context. The agent reads this at the start of every session, so the more you put in, the better it serves you.

Connect Discord (quickest channel to set up)

Go to discord.com/developers/applications, create a new application, add a Bot, copy the bot token, and add it to your OpenClaw config under channels.discord.token. Invite the bot to your server and you can chat with your agent from Discord.

Test with a real request

Ask the agent to do something useful: "What's the weather today?" or "Search the web for [something relevant to your work] and summarize it." This confirms the full tool stack is working.

๐ŸŽ‰
You're up and running! Next step: read Core Concepts to understand what your agent can do and how to configure it effectively.

Was this guide helpful?