Windows Installation
Install and configure OpenClaw on Windows
1System Requirements
- Windows 10 (1903+) or Windows 11
- At least 8GB RAM
- Node.js 22+ (via WSL2 or native install)
2Option 1: WSL2 Install (Recommended)
Get the best Linux-compatible experience via WSL2:
terminal
# Enable WSL2
wsl --install
# After restart, enter Ubuntu
wsl
# Install Node.js
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
# Install OpenClaw
npm install -g clawdbot3Option 2: Native Windows Install
Use Node.js directly on Windows:
terminal
# Install Node.js via winget
winget install OpenJS.NodeJS.LTS
# Or download installer: https://nodejs.org
# Install OpenClaw
npm install -g clawdbot4Configure Environment Variables
Set your API key in PowerShell:
terminal
# Temporary (current session)
$env:ANTHROPIC_API_KEY="your-api-key"
# Permanent
[System.Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY", "your-api-key", "User")5Start the Service
Launch OpenClaw after installation:
terminal
clawdbot startTips
- β’Windows Terminal is recommended for the best experience
- β’WSL2 offers better performance and full Linux compatibility
- β’Use nssm or Task Scheduler for auto-start on boot
Warning
- β’WSL2 requires Windows 10 version 1903 or later
- β’Some features may be limited in native Windows mode
Frequently Asked Questions
Should I use WSL2 or native Windows for OpenClaw?βΎ
WSL2 is recommended for best performance and full Linux compatibility. Native Windows works but some features may be limited.
How do I set up WSL2 for OpenClaw?βΎ
Run "wsl --install" in PowerShell as administrator, restart your computer, then install Node.js and OpenClaw inside the WSL2 Ubuntu environment.
How do I set environment variables permanently on Windows?βΎ
Use [System.Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY", "your-key", "User") in PowerShell to persist the variable across sessions.