Windows Guide
OpenClaw for Windows: install guide
Install OpenClaw on Windows with the cleanest supported path: WSL2 first, PowerShell second. This guide covers Windows-first setup, gateway verification, and the Ubuntu-on-WSL route most teams end up using in practice.
If you need generic cross-platform install instructions, go to install OpenClaw. If you want the gateway-specific follow-up, use OpenClaw gateway install and setup. If OpenClaw is installed but failing to run, use setup troubleshooting.
WSL2 is strongly recommended for the cleanest OpenClaw experience on Windows. It provides a Linux-compatible environment with better compatibility for Node.js tooling and the gateway.
Install OpenClaw on Ubuntu inside WSL2
Most Windows users searching for an OpenClaw Ubuntu install actually want Ubuntu inside WSL2. That is the recommended path because it gives you the Linux install flow while keeping Windows as your primary desktop.
wsl --install -d Ubuntu wsl curl -fsSL https://openclaw.ai/install.sh | bash openclaw onboard --install-daemon
Prerequisites
- Windows 10/11 (build 1903+ for WSL2).
- PowerShell 5.1+ or Windows Terminal.
- Node 22+ (installed in WSL2 or via nvm-windows).
- LLM provider credentials (OpenAI/Anthropic/Gemini).
Option A: WSL2 (recommended)
1. Enable WSL2:
wsl --install
2. Restart your computer, then open Ubuntu (or your preferred distro).
3. Inside WSL2, install OpenClaw:
curl -fsSL https://openclaw.ai/install.sh | bash
4. Run onboarding:
openclaw onboard --install-daemon
5. Verify gateway:
openclaw gateway status openclaw dashboard
Option B: Direct Windows install
1. Open PowerShell as Administrator.
2. Run the installer:
iwr -useb https://openclaw.ai/install.ps1 | iex
3. Verify installation:
openclaw doctor openclaw status
4. Run onboarding:
openclaw onboard --install-daemon
5. Open dashboard:
openclaw dashboard
Configure gateway port
By default, the gateway runs on port 18789. To change it:
openclaw gateway --port 18790
Verify the change:
openclaw config get gateway.auth.token
Common errors and quick fixes
Execution policy error
If PowerShell blocks the script:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
"openclaw is not recognized"
Ensure Node global bin is in PATH:
npm prefix -g
Add to PATH if needed, then restart PowerShell.
WSL2 not supported
Ensure Windows is up to date and enable Virtual Machine Platform:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Gateway fails to start
Check port availability:
netstat -ano | findstr 18789
Use a different port if needed.
Dashboard shows "unauthorized" (1008)
Generate or retrieve your gateway token:
openclaw doctor --generate-gateway-token openclaw config get gateway.auth.token