How to Install OpenClaw on Windows (Step-by-Step WSL2 Guide) | Code Boost
Description: OpenClaw (formerly known as Clawdbot and Moltbot) is a self-hosted AI assistant that runs on your own hardware and connects to your messaging apps. If you're a Windows user looking...

Article

# How to Install OpenClaw on Windows (Step-by-Step WSL2 Guide)

By Matt · Feb 20, 2026

OpenClaw (formerly known as Clawdbot and Moltbot) is a self-hosted AI assistant that runs on your own hardware and connects to your messaging apps. If you're a Windows user looking to set it up, there's one important thing to know upfront: OpenClaw does not support native Windows installation. The official and only stable method is running it through WSL2 (Windows Subsystem for Linux).

Don't let that scare you off — WSL2 setup is straightforward, and this guide will walk you through every step from a fresh Windows machine to a working OpenClaw assistant. If you're not sure what OpenClaw is or why you'd want it, start with our complete explainer on what OpenClaw is.

## Why WSL2 Is Required

OpenClaw's CLI, gateway, and tooling are all built around Linux-based services, package managers, and binaries. The WhatsApp Web protocol, process management, and Unix-based tooling all assume a POSIX environment that native Windows can't provide reliably. WSL2 solves this by running a full Linux environment alongside Windows, giving you complete compatibility with minimal overhead.

The good news is that WSL2 provides excellent performance, seamless integration with Windows, and proper systemd support for background services. Once installed, you'll barely notice it's there.

## Prerequisites

Before you start, make sure you have the following:

Windows 10 (version 2004 or later) or Windows 11 — WSL2 requires a relatively recent version of Windows. Most systems updated in the last few years will work fine.

At least 4GB of RAM — WSL2 runs a lightweight Linux virtual machine. For comfortable use, 8GB or more is recommended.

An API key from an AI model provider — You'll need this during setup. OpenClaw supports Anthropic (Claude), OpenAI (GPT-4), Google (Gemini), and local models via Ollama. Have your API key ready before starting the onboarding wizard.

## Step 1: Install WSL2 and Ubuntu

Open PowerShell as Administrator (right-click the Start button and select "Terminal (Admin)" or search for PowerShell and choose "Run as administrator"). Then run:

`wsl --install`

This command enables WSL2 and installs Ubuntu 24.04 by default. If Windows asks you to reboot, do so and then continue.

After rebooting, Ubuntu should launch automatically. If it doesn't, open "Ubuntu" from your Start Menu. You'll be prompted to create a Linux username and password — this is separate from your Windows login and is used inside the Linux environment.

Verify you're running WSL version 2 by opening PowerShell and running:

`wsl --list --verbose`

The output should show your Ubuntu distribution with VERSION = 2. If it shows VERSION = 1, upgrade it with:

`wsl --set-version Ubuntu 2`

## Step 2: Enable Systemd

OpenClaw uses systemd to manage its gateway service. Some WSL2 distributions don't enable it by default. Inside your Ubuntu terminal, run:

`sudo tee /etc/wsl.conf > /dev/null <<'EOF'`

`[boot]`

`systemd=true`

`EOF`

Then shut down WSL from PowerShell:

`wsl --shutdown`

Reopen Ubuntu from the Start Menu. Verify systemd is running with:

`systemctl --version`

If this returns a version number, you're good to go.

## Step 3: Install Node.js 22

OpenClaw requires Node.js version 22 or newer. Inside your Ubuntu terminal, run:

`sudo apt update && sudo apt upgrade -y`

`curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -`

`sudo apt-get install -y nodejs`

Verify the installation:

`node --version`

You should see v22.x.x or higher. If you see an older version, you may have a conflicting Node.js installation from Windows leaking into WSL through your PATH. To fix this, you can disable Windows PATH injection by adding the following to `/etc/wsl.conf`:

`[interop]`

`appendWindowsPath=false`

Then restart WSL with `wsl --shutdown` and reopen Ubuntu.

## Step 4: Install OpenClaw

With Node.js 22 installed, you can now install OpenClaw globally:

`npm install -g openclaw@latest`

Alternatively, you can use the one-liner install script that handles everything automatically:

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

## Step 5: Run the Onboarding Wizard

Start the interactive setup wizard:

`openclaw onboard --install-daemon`

The `--install-daemon` flag ensures the gateway will run in the background 24/7, even when you close your terminal.

The wizard will walk you through several prompts:

Gateway settings — Choose "local" for single-device use. The gateway binds to localhost (127.0.0.1) by default, which is the secure option.

Model provider — Select your AI provider (Anthropic, OpenAI, etc.) and paste your API key when prompted. Claude Opus 4.5 is recommended for complex tasks, while Claude Haiku 4.5 is faster and cheaper for simpler use.

Messaging channel — Choose which platform you want to interact through. Telegram is the easiest to set up (you create a bot via @BotFather on Telegram), but WhatsApp, Discord, Slack, and others are also supported.

Skills — You can skip skill setup for now and add them later. Skills are modular plugins that extend what OpenClaw can do.

Say "Yes" to all permission prompts during setup. You can tighten permissions later once you're comfortable with how everything works.

## Step 6: Verify the Installation

After onboarding completes, check that everything is running:

`openclaw doctor`

`openclaw status`

To open the web-based dashboard for quick testing:

`openclaw dashboard`

This will give you a URL (typically `http://127.0.0.1:18789/`) that you can open in your Windows browser. If it prompts for authentication, the tokenized link printed by the dashboard command will include the required token.

You can also test by sending a message to your bot through whichever messaging channel you configured. Try something simple like "Hello, what's my status?" to confirm it's working.

## Important Windows-Specific Tips

Always work in the Linux filesystem. Store your OpenClaw data in your WSL home directory (`/home/yourusername/`), not on the Windows mount (`/mnt/c/`). Cross-filesystem access between Windows and WSL is 10-20x slower and can cause issues.

Configure WSL resource limits. By default, WSL2 can use up to 80% of your system RAM, which may make Windows feel sluggish. Create a `.wslconfig` file in your Windows user directory (`C:\Users\YourName\.wslconfig`) to set limits:

`[wsl2]`

`memory=4GB`

`processors=2`

Use Node.js, not Bun. Bun has known compatibility issues with WhatsApp and Telegram channels on WSL2. Stick with Node.js for a stable experience.

WSL IP changes on restart. If you need to access OpenClaw from another machine on your network, you'll need to set up port forwarding from Windows to WSL. The WSL IP address changes after each restart, so the forwarding rule may need to be refreshed.

## Common Troubleshooting

"Node.js 22+ required" error — Your Node version is too old. Use nvm to install the correct version: `curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash`, then `nvm install 22` and `nvm use 22`.

Port 18789 already in use — Something else is using the gateway port. Find the process with `sudo lsof -i :18789` and terminate it, or change the port in your OpenClaw config.

Dashboard shows "unauthorized" — Run `openclaw dashboard` and use the tokenized URL it prints (the one with `?token=...` in it).

Gateway not starting — Check your API keys are valid with `openclaw doctor`. If the daemon stopped, restart it with `openclaw gateway restart`.

## What's Next?

Once OpenClaw is running, the real fun begins. Check out our guide to 10 practical things you can do with OpenClaw to start putting your new AI assistant to work. And before you go too deep, we strongly recommend reading our OpenClaw security guide to understand the safety considerations of running an AI agent with system access.

If you're on a Mac instead, head over to our macOS installation guide. If you'd prefer a cloud-hosted setup instead of running on your local machine, see our DigitalOcean deployment guide.

## Related Guides on Code Boost

What Is OpenClaw (Formerly Clawdbot)? The Self-Hosted AI Assistant Explained

How to Install OpenClaw on Mac (macOS Setup Guide)

How to Install OpenClaw on DigitalOcean (Cloud VPS Guide)

10 Things You Can Do With OpenClaw (Practical Use Cases)

Is OpenClaw Safe? Security Guide for Self-Hosted AI Agents