Windows (WSL2)
Windows (WSL2)
Section titled “Windows (WSL2)”OpenClaw on Windows is recommended via WSL2 (Ubuntu recommended). The CLI + Gateway run inside Linux, which keeps the runtime consistent and makes tooling far more compatible (Node/Bun/pnpm, Linux binaries, skills). Native Windows installs are untested and more problematic.
Native Windows companion apps are planned.
Install (WSL2)
Section titled “Install (WSL2)”- Getting Started (use inside WSL)
- Install & updates
- Official WSL2 guide (Microsoft): https://learn.microsoft.com/windows/wsl/install
Gateway
Section titled “Gateway”Gateway service install (CLI)
Section titled “Gateway service install (CLI)”Inside WSL2:
openclaw onboard --install-daemonOr:
openclaw gateway installOr:
openclaw configureSelect Gateway service when prompted.
Repair/migrate:
openclaw doctorAdvanced: expose WSL services over LAN (portproxy)
Section titled “Advanced: expose WSL services over LAN (portproxy)”WSL has its own virtual network. If another machine needs to reach a service running inside WSL (SSH, a local TTS server, or the Gateway), you must forward a Windows port to the current WSL IP. The WSL IP changes after restarts, so you may need to refresh the forwarding rule.
Example (PowerShell as Administrator):
$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=$TargetPortAllow the port through Windows Firewall (one-time):
New-NetFirewallRule -DisplayName "WSL SSH $ListenPort" -Direction Inbound ` -Protocol TCP -LocalPort $ListenPort -Action AllowRefresh the portproxy after WSL restarts:
netsh interface portproxy delete v4tov4 listenport=$ListenPort listenaddress=0.0.0.0 | Out-Nullnetsh interface portproxy add v4tov4 listenport=$ListenPort listenaddress=0.0.0.0 ` connectaddress=$WslIp connectport=$TargetPort | Out-NullNotes:
- SSH from another machine targets the Windows host IP (example:
ssh user@windows-host -p 2222). - Remote nodes must point at a reachable Gateway URL (not
127.0.0.1); useopenclaw status --allto confirm. - Use
listenaddress=0.0.0.0for LAN access;127.0.0.1keeps it local only. - If you want this automatic, register a Scheduled Task to run the refresh step at login.
Step-by-step WSL2 install
Section titled “Step-by-step WSL2 install”1) Install WSL2 + Ubuntu
Section titled “1) Install WSL2 + Ubuntu”Open PowerShell (Admin):
wsl --install# Or pick a distro explicitly:wsl --list --onlinewsl --install -d Ubuntu-24.04Reboot if Windows asks.
2) Enable systemd (required for gateway install)
Section titled “2) Enable systemd (required for gateway install)”In your WSL terminal:
sudo tee /etc/wsl.conf >/dev/null <<'EOF'[boot]systemd=trueEOFThen from PowerShell:
wsl --shutdownRe-open Ubuntu, then verify:
systemctl --user status3) Install OpenClaw (inside WSL)
Section titled “3) Install OpenClaw (inside WSL)”Follow the Linux Getting Started flow inside WSL:
git clone https://github.com/openclaw/openclaw.gitcd openclawpnpm installpnpm ui:build # auto-installs UI deps on first runpnpm buildopenclaw onboardFull guide: Getting Started
Windows companion app
Section titled “Windows companion app”We do not have a Windows companion app yet. Contributions are welcome if you want contributions to make it happen.