OpenClaw on Windows — Complete Installation Guide for Windows 10/11
OpenClaw on Windows
Section titled “OpenClaw on Windows”Setting up OpenClaw on Windows is straightforward — but there are a few Windows-specific quirks you should know about. I’ve tested both the native PowerShell method and the WSL2 approach, and I’ll walk you through both.
TL;DR: WSL2 is the only officially stable path. PowerShell works for quick testing but has limitations.
Prerequisites
Section titled “Prerequisites”Before you start, make sure you have:
- Windows 10 (version 1903+) or Windows 11
- PowerShell 5.1 or later (pre-installed on modern Windows)
- An API key from Anthropic, OpenAI, or Google — or use Ollama for free local models
The installer will handle Node.js for you if it’s not installed.
Method 1: PowerShell (Quick but Limited)
Section titled “Method 1: PowerShell (Quick but Limited)”⚠️ Note: PowerShell native installation is untested by the official team and may have tool compatibility issues. For production use, prefer WSL2.
Open PowerShell as Administrator and run:
iwr -useb https://openclaw.ai/install.ps1 | iexWhat This Does
Section titled “What This Does”- ✅ Checks for Node.js 22+ (installs via winget/Chocolatey/Scoop if missing)
- ✅ Runs
npm install -g openclaw@latest - ✅ Launches the setup wizard
Choose Your Install Method
Section titled “Choose Your Install Method”The PowerShell installer supports two methods:
# Default: npm install (recommended)iwr -useb https://openclaw.ai/install.ps1 | iex
# Alternative: Install from GitHub sourceiwr -useb https://openclaw.ai/install.ps1 | iex -InstallMethod git
# With custom directory for git installiwr -useb https://openclaw.ai/install.ps1 | iex -InstallMethod git -GitDir "C:\openclaw"Method 2: WSL2 (Recommended for Heavy Use)
Section titled “Method 2: WSL2 (Recommended for Heavy Use)”If you’re planning to use OpenClaw heavily or want the most stable experience, WSL2 is the way to go. It gives you a full Linux environment inside Windows.
Step 1: Install WSL2
Section titled “Step 1: Install WSL2”Open PowerShell as Administrator:
wsl --installRestart your computer when prompted.
Step 1.5: Enable systemd (Required)
Section titled “Step 1.5: Enable systemd (Required)”After restart, open Ubuntu and run:
# Enable systemd for OpenClaw gatewaysudo nano /etc/wsl.confAdd these lines:
[boot]systemd=trueSave (Ctrl+O, Enter, Ctrl+X), then restart WSL:
# In PowerShellwsl --shutdownwslStep 2: Set Up Ubuntu
Section titled “Step 2: Set Up Ubuntu”After restart, Ubuntu will launch automatically. Create your username and password.
Step 3: Install OpenClaw in WSL
Section titled “Step 3: Install OpenClaw in WSL”Inside your Ubuntu terminal:
curl -fsSL https://openclaw.ai/install.sh | bashThat’s it. You now have OpenClaw running in a proper Linux environment.
After Installation: Setup Wizard
Section titled “After Installation: Setup Wizard”Once installed, the setup wizard starts automatically. You’ll configure:
1. AI Model Provider
Section titled “1. AI Model Provider”| Provider | Notes |
|---|---|
| Anthropic (Claude) | Best overall, requires API key |
| OpenAI | Great for coding |
| Google Gemini | Free tier available |
| Ollama | 100% free, runs locally |
2. Chat Channel
Section titled “2. Chat Channel”Choose how you’ll talk to OpenClaw:
- WhatsApp, Telegram, Discord, or iMessage
3. Gateway Daemon
Section titled “3. Gateway Daemon”When asked, choose to install the gateway as a daemon:
openclaw onboard --install-daemonThis keeps OpenClaw running in the background.
Verify Installation
Section titled “Verify Installation”# Check versionopenclaw --version
# Run diagnosticsopenclaw doctor
# Open the dashboardopenclaw dashboardTroubleshooting Windows Issues
Section titled “Troubleshooting Windows Issues””openclaw is not recognized”
Section titled “”openclaw is not recognized””Your npm global bin folder isn’t in PATH.
Fix:
# Find your npm prefixnpm config get prefix
# Add the result + \bin to your PATH# Usually: %AppData%\npmThen reopen PowerShell.
”spawn git ENOENT” Error
Section titled “”spawn git ENOENT” Error”Git for Windows is required for source installs.
Fix:
- Download Git from git-scm.com/download/win
- Install with default settings
- Reopen PowerShell and retry
Node.js Version Issues
Section titled “Node.js Version Issues”If you have an older Node.js:
# Using wingetwinget install OpenJS.NodeJS.LTS
# Or Chocolateychoco install nodejs-lts
# Or Scoopscoop install nodejs-ltsWindows Defender Blocks Installation
Section titled “Windows Defender Blocks Installation”Add an exclusion for the OpenClaw directory:
- Open Windows Security → Virus & threat protection
- Click “Manage settings” under Virus & threat protection settings
- Scroll to “Exclusions” → Add or remove exclusions
- Add folder:
%AppData%\npm\node_modules\openclaw
Still stuck? Our AI Setup Assistant is trained on all OpenClaw documentation and can help troubleshoot your specific Windows issue in real-time.
PowerShell vs WSL2: Which Should You Choose?
Section titled “PowerShell vs WSL2: Which Should You Choose?”| Aspect | PowerShell | WSL2 |
|---|---|---|
| Setup time | 2 minutes | 10 minutes |
| Stability | Good | Excellent |
| Shell tools | Limited | Full Linux |
| Updates | Simple | Simple |
| Best for | Quick setup | Power users |
My recommendation: Start with PowerShell. If you run into issues or want more control, switch to WSL2.
What’s Next?
Section titled “What’s Next?”- General installation guide → — All platforms
- Connect Telegram → — Control from your phone
- Docker deployment → — Isolated containerized setup
- Use local AI → — Zero API costs
Need help? Join the OpenClaw Discord or check the official docs.
OpenClaw Expert
Still stuck?
If this page didn't answer your case, ask OpenClaw Expert for step-by-step guidance.