How to Install OpenClaw on Windows: The Complete WSL2 Setup Guide
A step-by-step guide to installing OpenClaw on Windows using WSL2, from enabling WSL2 to your first agent conversation. No prior Linux experience required.
#OpenClaw on Windows: Yes, It Works
OpenClaw was built on macOS and Linux, and most of the community runs it there. But Windows is fully supported — you just need to know the right path.
That path is WSL2 (Windows Subsystem for Linux). WSL2 gives you a real Linux environment running inside Windows, with full access to the Windows filesystem and near-native performance. OpenClaw runs inside WSL2 exactly the same way it runs on a native Linux machine.
This guide takes you from a fresh Windows installation to a working OpenClaw agent. No prior Linux experience needed.
#Why WSL2 (and Not Native Windows)?
OpenClaw technically has a PowerShell installer, but the official recommendation — and what actually works reliably — is WSL2. Here is why:
- Shell compatibility: OpenClaw's tools and skills assume a Unix-like shell (bash/zsh). Many commands, scripts, and skills simply do not work in PowerShell or CMD.
- Node.js behavior: Some Node.js packages that OpenClaw depends on behave differently on native Windows (path separators, file permissions, signal handling). WSL2 eliminates these issues.
- Tool ecosystem: Most OpenClaw skills expect Unix tools (curl, git, ssh, grep). WSL2 provides all of these natively.
- Community support: When you ask for help in the OpenClaw Discord, most answers assume a Unix environment. Running WSL2 means those answers work for you.
The good news: WSL2 is not a compromise. It is a full Linux system with excellent performance and seamless Windows integration. You can access your Windows files from WSL2 and vice versa.
Want step-by-step guides for this and more?
ClawDocx Pro includes 500+ curated prompts, setup guides, SKILL.md files, and templates — everything to make your AI agent unstoppable.
See plans & pricing#Step 1: Enable WSL2
Open PowerShell as Administrator (right-click the Start menu → Terminal (Admin)) and run:
wsl --installThis command:
- Enables the required Windows features
- Installs the WSL2 kernel
- Downloads and installs Ubuntu (the default distribution)
When it finishes, restart your computer.
After restarting, Ubuntu will open automatically and ask you to create a username and password. These are for your Linux environment — they do not need to match your Windows credentials.
Already have WSL1? Upgrade to WSL2 with
wsl --set-default-version 2. WSL1 will work but is slower and has compatibility issues.
#Step 2: Update Your Linux Environment
Open your Ubuntu terminal (search for "Ubuntu" in the Start menu) and run:
sudo apt update && sudo apt upgrade -yThis ensures your Linux packages are current. It might take a minute or two.
#Step 3: Install Node.js 22+
OpenClaw requires Node.js 22 or newer. The easiest way to install it in WSL2:
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -sudo apt install -y nodejsVerify the installation:
node --version # Should show v22.x.x or highernpm --version # Should show 10.x.x or higherAlternative: If you prefer version management, install nvm first, then run
nvm install 22.
#Step 4: Install OpenClaw
Now the straightforward part. Run the official installer:
curl -fsSL https://openclaw.ai/install.sh | bashThis script will:
- Detect your Node.js installation
- Install the OpenClaw CLI globally via npm
- Launch the onboarding wizard
#The Onboarding Wizard
The wizard walks you through:
-
API key setup: You need at least one AI model provider. The wizard supports:
- Anthropic (Claude) — recommended for best agent performance
- OpenAI (GPT models) — widely available
- Google (Gemini) — good free tier
- Ollama (local models) — free, runs on your hardware. See our Ollama guide.
-
Messaging channel: How you will talk to your agent. Telegram is the most popular choice — see our Telegram setup guide. You can also skip this and use the terminal initially.
-
Daemon installation: The wizard can set up OpenClaw to run as a background service that starts automatically.
#Step 5: Start the Gateway
If the wizard set up the daemon, OpenClaw is already running. Check with:
openclaw statusIf you need to start it manually:
openclaw gatewayYou should see output confirming the gateway is running and any configured channels are connected.
#Step 6: Talk to Your Agent
If you configured a messaging channel (Telegram, Discord, etc.), message your agent there.
If you did not set up a channel yet, you can talk to your agent directly from the terminal:
openclaw chatTry sending something like "Hello, what can you do?" to verify everything is working.
#Windows-Specific Configuration
#Accessing Windows Files from WSL2
Your Windows drives are mounted under /mnt/ in WSL2:
ls /mnt/c/Users/YourName/DocumentsIf you want your agent to work with files on your Windows filesystem, you can either:
- Reference them directly via
/mnt/c/...paths - Create symbolic links in your workspace:
ln -s /mnt/c/Users/YourName/Documents ~/documents
Performance note: File operations on
/mnt/c/are slower than operations within the WSL2 filesystem. For best performance, keep your OpenClaw workspace inside WSL2 (the default~/.openclaw/workspace/).
#Starting WSL2 Automatically at Boot
If you want OpenClaw to run 24/7, WSL2 needs to start when Windows boots. Create a scheduled task:
- Open Task Scheduler (search in Start menu)
- Click "Create Basic Task"
- Name it "Start WSL2"
- Trigger: "When the computer starts"
- Action: "Start a program"
- Program:
wsl - Arguments:
-d Ubuntu -- bash -c "openclaw gateway &"
Alternatively, add this to your Windows startup folder:
wsl -d Ubuntu -- bash -c "nohup openclaw gateway > /dev/null 2>&1 &"#Windows Terminal Integration
Windows Terminal (the modern terminal app) is the best way to interact with WSL2. It supports multiple tabs, custom profiles, and good Unicode rendering.
To create a dedicated OpenClaw profile:
- Open Windows Terminal Settings
- Add a new profile
- Set the command line to:
wsl -d Ubuntu - Optional: set a custom icon and name
#Firewall Considerations
If your OpenClaw agent needs to receive incoming connections (for example, webhook-based channel integrations), you may need to add a Windows Firewall rule:
# Run in PowerShell as AdminNew-NetFirewallRule -DisplayName "OpenClaw Gateway" -Direction Inbound -LocalPort 3456 -Protocol TCP -Action AllowMost users do not need this — Telegram and Discord use outbound connections that work without firewall changes.
#Running Local Models on Windows
If you have an NVIDIA GPU, you can run local language models through Ollama inside WSL2 with GPU acceleration:
curl -fsSL https://ollama.com/install.sh | shollama pull llama3.2NVIDIA's CUDA drivers pass through to WSL2 automatically on recent Windows versions. Verify GPU access with:
nvidia-smiIf this shows your GPU, Ollama will automatically use it for inference. For a complete local model setup, see our Ollama guide.
NVIDIA published an official guide for running OpenClaw on RTX GPUs that covers WSL2 + Ollama in detail.
#Troubleshooting
"WSL2 requires an update to its kernel component":
Run wsl --update in PowerShell as Admin, then restart.
Node.js installation fails:
If the NodeSource script fails, try installing Node.js directly: sudo apt install nodejs npm, then verify the version is 22+. If your distribution ships an older version, use nvm.
OpenClaw cannot connect to the internet: WSL2 networking occasionally has DNS issues. Try:
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.confSlow file access on /mnt/c/: This is expected. WSL2 file access to Windows drives goes through a translation layer. Keep your workspace inside the WSL2 filesystem for best performance.
Agent cannot find tools (git, curl, etc.):
Install them: sudo apt install -y git curl wget jq
"Permission denied" errors:
Make sure your OpenClaw workspace has correct permissions: chmod -R 755 ~/.openclaw/
#Next Steps
Your OpenClaw agent is running on Windows. From here:
- Connect to Telegram to message your agent from your phone
- Customize your agent's personality with SOUL.md and IDENTITY.md
- Set up automated cron jobs for recurring tasks
- Run it for free with Ollama if you have a capable GPU
- Explore the best skills to extend your agent's capabilities
Windows users are a growing part of the OpenClaw community. If you run into issues not covered here, the OpenClaw Discord has an active support channel where Windows-specific questions get answered quickly.