OpenClaw runs on Node.js, which means it works great on Linux — and on Windows via WSL2 (Windows Subsystem for Linux). You get the full Linux environment without dual-booting, and your agent runs alongside your normal Windows workflow.
This guide covers the complete setup from scratch.
Prerequisites
- Windows 10 (version 2004+) or Windows 11
- At least 8GB RAM (16GB recommended)
- Admin access to your machine
- An API key from your AI provider (Anthropic, OpenRouter, etc.)
Step 1: Install WSL2
Open PowerShell as Administrator:
wsl --install
This installs WSL2 with Ubuntu by default. Restart your computer when prompted.
After reboot, Ubuntu opens automatically. Set your Linux username and password.
Verify you’re on WSL2:
wsl --list --verbose
# Should show VERSION 2
Step 2: Update and Install Node.js
Inside your WSL terminal:
# Update packages
sudo apt update && sudo apt upgrade -y
# Install Node.js 22
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo bash -
sudo apt install -y nodejs
# Verify
node --version # v22.x
npm --version
Step 3: Install OpenClaw
sudo npm install -g openclaw
openclaw init
The init wizard will ask for:
- Your AI provider and API key
- Which messaging channels to enable
- Basic agent configuration
Step 4: First Run
openclaw gateway start
Your agent is now running. Connect your messaging channels and start chatting.
Press Ctrl+C to stop when you’re done testing.
Auto-Start on Windows Boot
You probably want OpenClaw running whenever your computer is on. There are two approaches:
Option A: Windows Task Scheduler (Recommended)
Create a batch script at C:\Users\YourName\start-openclaw.bat:
@echo off
wsl -d Ubuntu -u youruser -- bash -c "cd ~ && openclaw gateway start --foreground"
Then in Task Scheduler:
- Create Basic Task → “OpenClaw”
- Trigger: “When the computer starts”
- Action: Start a program → your batch file
- Check “Run whether user is logged on or not”
Option B: Systemd in WSL2
If you have WSL2 with systemd enabled (Windows 11 or recent Windows 10):
# Check if systemd is running
systemctl --version
# If not, enable it:
sudo tee /etc/wsl.conf > /dev/null << 'EOF'
[boot]
systemd=true
EOF
Restart WSL (wsl --shutdown in PowerShell, then reopen Ubuntu), then create a service:
sudo tee /etc/systemd/system/openclaw.service > /dev/null << 'EOF'
[Unit]
Description=OpenClaw AI Agent
After=network-online.target
[Service]
Type=simple
User=youruser
WorkingDirectory=/home/youruser
ExecStart=/usr/bin/openclaw gateway start --foreground
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable openclaw
sudo systemctl start openclaw
Accessing Files Between Windows and WSL
Your WSL files live at \\wsl$\Ubuntu\home\youruser\ in Windows Explorer. You can browse your OpenClaw workspace directly:
\\wsl$\Ubuntu\home\youruser\.openclaw\workspace\
Going the other way, Windows drives are mounted in WSL:
ls /mnt/c/Users/YourName/Documents/
This means your agent can access Windows files if needed — just reference the /mnt/c/ path.
Tips for a Smooth Experience
1. Keep WSL Running
By default, WSL shuts down after all terminals close. Prevent this:
Create or edit %UserProfile%\.wslconfig:
[wsl2]
memory=4GB
processors=2
And keep a WSL instance alive (the Task Scheduler approach handles this).
2. Networking
WSL2 uses a virtual network adapter. Your agent can access the internet, but if you need to access services running inside WSL from Windows, use localhost — WSL2 automatically forwards ports.
3. Windows Terminal
Install Windows Terminal from the Microsoft Store. It’s the best way to interact with WSL — tabbed interface, proper Unicode support, and easy switching between PowerShell and Ubuntu.
4. Notifications
OpenClaw’s messaging channels (Telegram, Discord, etc.) handle notifications through their respective apps. Your agent messages you on whatever platform you’ve configured — same as any other setup.
5. Memory Management
WSL2 can be greedy with RAM. Limit it in .wslconfig:
[wsl2]
memory=4GB
swap=2GB
4GB is plenty for OpenClaw. Adjust based on your total system RAM.
What Works on Windows/WSL
Everything that works on Linux works here:
- All messaging channels (Telegram, Discord, Slack, Signal, WhatsApp)
- Web search, email, calendar skills
- Cron jobs and heartbeats
- Memory system and multi-agent setups
- GitHub, coding agents, file management
- Browser automation (install Chromium in WSL)
What Doesn’t Work
- macOS-specific skills: iMessage, Apple Notes, Apple Reminders, Shortcuts — these require macOS
- GUI apps (without extra setup): If you need browser automation, install a display server (VcXsrv) or use headless Chromium
- Native Windows app control: WSL can’t directly control Windows applications. For that, you’d need a Windows-native agent framework
WSL vs Native Linux vs macOS
| Feature | WSL2 (Windows) | Native Linux | macOS |
|---|---|---|---|
| Setup effort | Medium | Low | Low |
| Performance | Good (95% native) | Best | Best |
| macOS skills | ❌ | ❌ | ✅ |
| Always-on | Needs config | Easy (systemd) | Easy (launchd) |
| File access | Both systems | Linux only | macOS only |
| RAM overhead | +1-2GB for WSL | None | None |
WSL2 is a solid choice if Windows is your daily driver and you don’t want to manage a separate machine.
Troubleshooting
“openclaw: command not found” The npm global bin path might not be in your PATH. Add it:
echo 'export PATH="$PATH:/usr/lib/node_modules/.bin"' >> ~/.bashrc
source ~/.bashrc
Or use the full path: /usr/bin/openclaw or npx openclaw.
WSL won’t start after reboot
Open PowerShell as admin: wsl --shutdown then wsl. If that fails, check Windows Update — WSL2 kernel updates come through there.
Network issues inside WSL
Try: sudo rm /etc/resolv.conf && sudo bash -c 'echo "nameserver 8.8.8.8" > /etc/resolv.conf'
Then prevent WSL from overwriting it:
sudo tee -a /etc/wsl.conf > /dev/null << 'EOF'
[network]
generateResolvConf=false
EOF
High memory usage
Check .wslconfig memory limit. Also run wsl --shutdown periodically to reclaim memory (your systemd service will restart OpenClaw automatically).
Next Steps
Once OpenClaw is running:
- Connect your phone via Telegram, WhatsApp, or Signal
- Set up your agent’s personality
- Install the top 10 beginner skills
- Configure cron jobs for automation
- Review security best practices
Welcome to the always-on AI assistant life — no extra hardware required.