๐Ÿš€Setup & Installation

How to Run OpenClaw on WSL2 (Windows)

Intermediate45-90 minutesUpdated 2025-01-10

Running OpenClaw on Windows requires WSL2 for optimal performance and compatibility. This comprehensive guide walks you through enabling WSL2, installing Ubuntu, configuring resource limits, and optimizing filesystem performance. You'll avoid common pitfalls like slow filesystem access and network bridging issues that plague most WSL2 setups.

Why This Is Hard to Do Yourself

These are the common pitfalls that trip people up.

๐ŸชŸ

WSL2 installation hurdles

Windows version requirements, BIOS virtualization, distro management

๐ŸŒ

Network bridging issues

WSL2's NAT networking makes OpenClaw inaccessible from LAN without port forwarding

๐Ÿ“

Filesystem performance

Running Node.js on Windows filesystem from WSL2 is 10x slower

๐Ÿ”‹

Resource management

WSL2 can consume all available RAM without .wslconfig limits

Step-by-Step Guide

Step 1

Enable WSL2 on Windows

# Run in PowerShell as Administrator:
wsl --install
# Restart your computer
Step 2

Install Ubuntu on WSL2

wsl --install -d Ubuntu-22.04
# Set up your Linux username and password
Step 3

Configure WSL2 resources

Create .wslconfig to limit RAM/CPU.

# Create C:\Users\YourUser\.wslconfig
[wsl2]
memory=8GB
processors=4
swap=2GB

Warning: Without .wslconfig, WSL2 will use up to 80% of your system RAM, which can make Windows unresponsive.

Step 4

Install Node.js in WSL2

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
node --version
Step 5

Clone and install OpenClaw (inside WSL2 filesystem)

# IMPORTANT: Work in the Linux filesystem, not /mnt/c/
cd ~
git clone https://github.com/openclaw/openclaw.git
cd openclaw
npm install

Warning: Always clone into the Linux filesystem (~/), not the Windows mount (/mnt/c/). Running from the Windows filesystem is 10-50x slower.

Step 6

Configure and start OpenClaw

cp .env.example .env
nano .env  # Add your API keys
npm start
Step 7

Access from Windows browser

# OpenClaw runs at localhost:3000 by default
# Access from Windows browser: http://localhost:3000
# For LAN access, set up port forwarding:
netsh interface portproxy add v4tov4 listenport=3000 listenaddress=0.0.0.0 connectport=3000 connectaddress=$(wsl hostname -I)

WSL2 Setup Getting Complicated?

Windows + WSL2 + OpenClaw has a lot of moving parts. Our experts configure everything โ€” WSL2 resources, networking, filesystem optimization, and auto-start โ€” so you can focus on using OpenClaw, not debugging Windows.

Get matched with a specialist who can help.

Sign Up for Expert Help โ†’

Frequently Asked Questions