Install OpenClaw on Windows: 2 Methods (Native + WSL2)

15/04/2026
Thuận
install-openclaw-windows

Windows doesn’t have a native Unix terminal, which means installing OpenClaw takes a slightly different path than on Mac or Linux. There are two solid approaches: native Windows installation (simpler, works directly in PowerShell) or using WSL2 (Windows Subsystem for Linux — gives you a full Linux environment and is more stable for long-term use).

This guide covers both methods step by step. Read the comparison below to pick the right one for you.

Looking for the general overview? The How to Install OpenClaw: Complete A-Z Guide covers all 4 installation methods. This article focuses specifically on Windows.


Which method should you choose?

Method 1: Native WindowsMethod 2: WSL2
Steps7 steps7 steps
Setup time~15–20 minutes~25–35 minutes
Hardest partBuilding from source (pnpm build)Installing WSL2 for the first time
Auto-start daemonNo (manual)Yes (systemd)
Best forQuick setup, no need for 24/7Long-term use, full feature support

Recommendation: If you’re just trying OpenClaw out, Method 1 gets you running faster. If you plan to use OpenClaw seriously (especially for 24/7 automation), Method 2 (WSL2) is more stable and gives you a proper Linux environment.


Before you start: common requirements

Both methods require:

  • Windows 10 version 2004+ or Windows 11 — check in Settings → System → About
  • PowerShell 5.1+ — built into Windows 10/11 (search “PowerShell” in Start menu)
  • Internet connection — required throughout setup and for calling AI models
  • 5 GB free disk space

Method 1: Native Windows

This approach installs OpenClaw directly in Windows using PowerShell and the Windows package manager, without any Linux environment.

Step 1.1: Install Node.js

Download the Node.js LTS installer from nodejs.org/en/download. Choose the Windows Installer (.msi), run it, and follow the installation prompts. Accept defaults — make sure the option to add Node to PATH is checked.

Verify: Open a new PowerShell window and run:

node -v

Should show v22.x.x or higher.

Step 1.2: Install pnpm

OpenClaw uses pnpm as its package manager for building from source:

npm install -g pnpm

Verify: pnpm -v returns a version number.

Step 1.3: Install Git

Git is needed to download the source code. Download from git-scm.com and install with default settings.

Verify: git --version returns a version number.

Step 1.4: Download OpenClaw source code

git clone https://github.com/openclaw/openclaw.git
cd openclaw

Step 1.5: Install dependencies and build

pnpm install
pnpm ui:build
pnpm build

This downloads all required libraries and compiles the source. May take 3–7 minutes depending on your internet speed.

Verify: No ERR! or red error lines. PowerShell returns to a normal prompt.

Step 1.6: Start OpenClaw

pnpm gateway:start

In a new PowerShell window:

openclaw onboard

The wizard guides you through choosing an AI model, entering your API key, and connecting a messaging channel.

Verify: Run openclaw doctor — all components show OK.

Step 1.7: Configure your AI model + API key

During the openclaw onboard wizard, you’ll be prompted to choose a model (Claude, GPT, Gemini, etc.) and enter your API key. Don’t have a key yet? See OpenClaw API Key Configuration Guide for step-by-step instructions for each provider.

After shutdown — how to restart

Native Windows doesn’t set up an auto-start daemon. Each time you restart your PC, open PowerShell and run:

cd openclaw
pnpm gateway:start

If you want OpenClaw to start automatically, you can add it to Task Scheduler — but for easier auto-start, consider Method 2 (WSL2) below.


Method 2: WSL2 + Ubuntu (recommended for long-term use)

What is WSL2?

WSL2 (Windows Subsystem for Linux 2) lets you run a real Linux environment directly inside Windows — with full system call compatibility. Unlike a virtual machine, WSL2 runs at near-native speed and integrates seamlessly with your Windows filesystem and apps.

For OpenClaw, WSL2 means you get the same installation experience as Linux (the most stable option) while staying on Windows.

Step 2.1: Install WSL2 and Ubuntu

Open PowerShell as Administrator (right-click → Run as administrator):

wsl --install

This installs WSL2 and Ubuntu in one step. Restart your computer when prompted.

After restart, Ubuntu opens automatically and asks you to create a username and password. Choose anything — this is your Linux user account inside WSL.

Verify: Open the Start menu, search “Ubuntu” — it should appear and open a Linux terminal.

Step 2.2: Install Windows Terminal (optional but recommended)

Windows Terminal is a modern terminal that makes working with WSL2 much more pleasant than the default Ubuntu window:

winget install Microsoft.WindowsTerminal

Or install from the Microsoft Store.

After installing, Windows Terminal automatically shows Ubuntu as an option when you click the dropdown arrow next to the new tab button.

Step 2.3: Install Node.js 24 in WSL

Open your Ubuntu terminal (from Windows Terminal or Start menu) and run:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash

Close and reopen the terminal, then:

nvm install 24
nvm use 24
nvm alias default 24

Verify: node -v shows v24.x.x.

Step 2.4: Install OpenClaw

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

Verify: openclaw --version shows a version number.

Step 2.5: Run the Onboard Wizard + install the daemon

openclaw onboard --install-daemon

The wizard walks you through:

  1. Installing the systemd daemon — OpenClaw starts automatically every time WSL2 starts, even after a Windows reboot
  2. Choosing your AI model — enter your API key for Claude, GPT, or another model
  3. Connecting a channel — Telegram, Slack, Discord, etc.
  4. Configuring Workspace — creates ~/.openclaw/workspace with your agent config files

Verify: Run openclaw doctor — all components show OK.

Step 2.6: Keep WSL running in the background (for 24/7 operation)

By default, WSL2 shuts down when you close all WSL windows. To keep OpenClaw running continuously, you can configure WSL to stay active.

Option A: Keep a minimized Ubuntu window open The simplest approach — just minimize the terminal instead of closing it. OpenClaw and the daemon keep running.

Option B: Use a WSL startup script in Task Scheduler For fully automatic background operation, create a Windows Task Scheduler entry that starts a background WSL process at login. This is more advanced — if you need this setup, the OpenClaw Troubleshooting Guide covers the exact steps.

Option C: Use TryOpenClaw.io If you need 24/7 uptime without managing any of this, TryOpenClaw.io runs OpenClaw on a cloud server — no WSL, no background processes, no configuration needed.

Step 2.7: Test your first task

Open your connected messaging app (e.g. Telegram) and send the OpenClaw bot:

“What’s a quick summary of how OpenClaw works?”

If the bot responds correctly — installation complete.


Tips for working with OpenClaw on Windows

Access your Windows files from WSL: Your Windows drives are mounted in WSL at /mnt/c/, /mnt/d/, etc. So C:\Users\YourName\Documents becomes /mnt/c/Users/YourName/Documents in WSL.

Access WSL files from Windows Explorer: In Windows Explorer address bar, type \\wsl$\Ubuntu to browse your WSL file system directly.

Copy-paste in WSL terminal: Right-click to paste in the Ubuntu terminal window. In Windows Terminal, Ctrl+Shift+V to paste.

Port access: If OpenClaw’s WebChat is running inside WSL on port 18789, you can access it from your Windows browser at http://localhost:18789 — WSL2 forwards ports automatically.


Common errors and fixes

pnpm: command not found in PowerShell (Method 1) npm package wasn’t linked to PATH. Fix: close PowerShell and reopen, or run npm install -g pnpm again with a fresh terminal.

Error: EPERM operation not permitted during build (Method 1) Antivirus or Windows Defender is blocking file operations. Temporarily disable real-time protection during the build step, then re-enable it.

wsl --install fails with error (Method 2) Make sure you’re running PowerShell as Administrator. If Windows version is older than 2004, run Windows Update first.

OpenClaw stops when I close the WSL window (Method 2) Expected behavior. Either keep a minimized WSL window open, or use TryOpenClaw.io for always-on operation.

openclaw: command not found inside WSL after install The PATH wasn’t updated. Fix:

source ~/.bashrc

Full troubleshooting reference: OpenClaw Troubleshooting Guide


Updating and uninstalling

Update OpenClaw

# In WSL or PowerShell
openclaw update

Uninstall OpenClaw

# In WSL — remove OpenClaw
npm uninstall -g openclaw
rm -rf ~/.openclaw

# In PowerShell — remove Ubuntu WSL (if you no longer need it)
wsl --unregister Ubuntu

Don’t want to set anything up? Use TryOpenClaw.io

If both methods sound like too much work, TryOpenClaw.io runs OpenClaw on cloud infrastructure — you access it through your browser:

  • No Node.js, Git, WSL, or any local software to install
  • Dedicated cloud instance, daily backups, 99.9% uptime
  • Starting from $4/month, with a money-back guarantee

Full comparison: OpenClaw Self-Hosted vs Cloud — Which Should You Choose?


Summary

Method 1: Native WindowsMethod 2: WSL2
Steps7 steps7 steps
Time~15–20 min~25–35 min
Hardest partBuilding sourceInitial WSL2 install
Auto-start daemonNoYes (systemd)
Best forQuick tryLong-term daily use

Either way, once installed, you can access OpenClaw’s WebChat at http://localhost:18789 from your browser.


Next step: OpenClaw API Key Configuration Guide to connect your AI model.

Or: Sign up at TryOpenClaw.io — skip the whole setup, start in 2 minutes.

Contact Us

Have a question or need assistance? We're here to help.