OpenClawSkills
GitHub
Platforms • TutorialHeader.readTime

Windows (WSL2)

Run OpenClaw on Windows via WSL2

On Windows, we recommend running OpenClaw via WSL2 (Ubuntu recommended). The CLI + Gateway run inside Linux, keeping the runtime consistent and greatly improving toolchain compatibility (Node/Bun/pnpm, Linux binaries, skills, etc). Running natively on Windows is usually more work; WSL2 gives you a full Linux environment—install it with one command: wsl --install.

A native Windows companion app is planned.

Tutorial.step

Install (WSL2)

Tutorial.step

Gateway

Tutorial.step

Install Gateway service (CLI)

Inside WSL2:

Terminal
openclaw onboard --install-daemon

Or:

Terminal
openclaw gateway install

Or:

Terminal
openclaw configure

When prompted, choose Gateway service.

Repair / migrate:

Terminal
openclaw doctor
Tutorial.step

Advanced: expose WSL services to LAN (portproxy)

WSL uses a separate virtual network. If you need another machine to reach a service running inside WSL (SSH, a local TTS service, or the Gateway), you must forward a Windows port to the current WSL IP. The WSL IP changes after a reboot, so you may need to refresh the portproxy rule.

Example (run PowerShell as Administrator):

Powershell
$Distro = "Ubuntu-24.04"
$ListenPort = 2222
$TargetPort = 22

$WslIp = (wsl -d $Distro -- hostname -I).Trim().Split(" ")[0]
if (-not $WslIp) { throw "WSL IP not found." }

netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=$ListenPort `
  connectaddress=$WslIp connectport=$TargetPort

Allow through Windows Firewall (one-time):

Powershell
New-NetFirewallRule -DisplayName "WSL SSH $ListenPort" -Direction Inbound `
  -Protocol TCP -LocalPort $ListenPort -Action Allow

Refresh portproxy after WSL restarts:

Powershell
netsh interface portproxy delete v4tov4 listenport=$ListenPort listenaddress=0.0.0.0 | Out-Null
netsh interface portproxy add v4tov4 listenport=$ListenPort listenaddress=0.0.0.0 `
  connectaddress=$WslIp connectport=$TargetPort | Out-Null

Notes:

- When SSHing from another machine, connect to the Windows host IP (e.g. ssh user@windows-host -p 2222).

- Remote nodes must point at a reachable Gateway URL (not 127.0.0.1); check with openclaw status --all.

- listenaddress=0.0.0.0 exposes to LAN; 127.0.0.1 is local-only.

- To automate, register a scheduled task to run the refresh steps on login.

Tutorial.step

WSL2 setup (step-by-step)

Follow these steps to install WSL2 + Ubuntu and set up OpenClaw.

Tutorial.step

1) Install WSL2 + Ubuntu

Open PowerShell (Administrator):

Powershell
wsl --install

wsl --list --online
wsl --install -d Ubuntu-24.04

If Windows asks you to reboot, reboot as instructed.

Tutorial.step

2) Enable systemd (required for Gateway service install)

In the WSL terminal:

Bash
sudo tee /etc/wsl.conf >/dev/null <<'EOF'
[boot]
systemd=true
EOF

Then in PowerShell:

Powershell
wsl --shutdown

Reopen Ubuntu and verify:

Bash
systemctl --user status
Tutorial.step

3) Install OpenClaw inside WSL

Inside WSL, follow the Linux Getting Started flow:

Bash
git clone https://github.com/openclaw/openclaw.git
cd openclaw
pnpm install
pnpm ui:build # First run will auto-install UI dependencies
pnpm build
openclaw onboard

Full guide: Getting Started

Tutorial.step

Windows companion app

There is no Windows companion app yet. Contributions are welcome.