Windows Guide

OpenClaw Windows install

This page is specifically for installing OpenClaw on Windows. Use it when you need a Windows-first flow with PowerShell commands, WSL2 recommendations, and post-install checks.

If you need generic cross-platform install instructions, go to install OpenClaw. If OpenClaw is installed but failing to run, use setup troubleshooting.

Recommendation

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.

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
Cookie preferences