← Back to Guides Guide

Run OpenClaw on Windows
with Ubuntu (WSL)

You don't need a Mac. Windows Subsystem for Linux gives you a full Ubuntu terminal inside Windows — and OpenClaw runs perfectly on it. This guide walks you through everything from scratch.

Last updated: February 16, 2026

Total time: ~15 minutes
💻 Difficulty: Beginner
🪟 Requires: Windows 10/11

Why WSL? OpenClaw is built for Linux. WSL lets you run a real Ubuntu environment inside Windows without dual-booting or VMs. It's fast, lightweight, and officially supported by Microsoft. Once it's set up, everything works exactly like a native Linux machine.

1 Install WSL + Ubuntu

Open PowerShell as Administrator (right-click the Start button → "Terminal (Admin)" or search for "PowerShell" and choose "Run as administrator") and run this single command:

PowerShell (Admin)
wsl --install

This installs WSL 2 and Ubuntu in one go. When it finishes, restart your PC.

After rebooting, Ubuntu will open automatically and ask you to create a username and password. Pick whatever you like — this is your Linux user account, separate from your Windows login.

Already have WSL installed? Run wsl --update to make sure you're on the latest version, then skip to Step 2.

2 Update Ubuntu

Now you're inside your Ubuntu terminal. First thing, update everything:

Ubuntu Terminal
sudo apt update && sudo apt upgrade -y

This pulls the latest packages. Takes a minute or two. You'll need to enter the password you just created.

3 Install Node.js & Git

OpenClaw needs Node.js to run. Install it using the NodeSource setup script, which gives you the latest LTS version:

Ubuntu Terminal
# Install Node.js (LTS) curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash - sudo apt install -y nodejs # Verify both installed correctly node --version npm --version

You should see version numbers for both. Git comes pre-installed on Ubuntu, but just in case:

Ubuntu Terminal
sudo apt install -y git git --version

4 Install OpenClaw

Install OpenClaw globally using npm:

Ubuntu Terminal
sudo npm install -g openclaw

Once installed, initialise your agent:

Ubuntu Terminal
openclaw init

This creates your configuration at ~/.openclaw/openclaw.json. Follow the prompts — it'll ask for your Anthropic API key (you'll need a Claude API key from console.anthropic.com) and which messaging platforms to connect.

5 Start your agent

Launch your OpenClaw agent:

Ubuntu Terminal
openclaw start

You should see your agent start up and the webhook endpoint will be available at:

Output
Agent running on http://127.0.0.1:18789 Webhook endpoint: http://127.0.0.1:18789/hooks/agent

That's it — your OpenClaw agent is running on Windows. Keep this terminal open (closing it stops the agent). You can open a new Ubuntu terminal any time from the Start menu by searching "Ubuntu".

+ Optional: Connect Clawfy

If you use the Clawfy browser extension, you can connect it to your running agent. You'll need two things from your config file:

Ubuntu Terminal
# Print your config to grab the webhook token cat ~/.openclaw/openclaw.json

Look for the hookToken value in the output. Then in Chrome:

That's it. If you browse any tech-related page, Clawfy will start sending context to your agent.

Useful Commands

Day-to-day commands

Keep these handy for daily use:

Ubuntu Terminal
# Start your agent openclaw start # Stop your agent openclaw stop # Check agent status openclaw status # Install a ClawHub skill clawhub install <skill-name> # Search for skills clawhub search "your query" # Open Ubuntu terminal from Windows # Just search "Ubuntu" in Start menu, or type: wsl
Troubleshooting

Common issues

"wsl --install" says virtualisation is disabled
You need to enable hardware virtualisation in your BIOS. Restart your PC, enter BIOS (usually by pressing F2, F12, or DEL during boot — it varies by motherboard manufacturer), find "Intel VT-x" or "AMD-V" / "SVM Mode" under CPU or Advanced settings, enable it, save and exit. WSL 2 requires this to be on.
Clawfy can't connect — webhook fails
Make sure your agent is actually running (openclaw status). WSL shares localhost with Windows, so 127.0.0.1 should work. If it doesn't, try localhost instead. Also check that no firewall or antivirus is blocking port 18789. Windows Defender sometimes blocks WSL network traffic — add an inbound rule to allow it.
Agent stops when I close the terminal
That's expected — the agent runs in the foreground by default. You can run it in the background with openclaw start & or use a terminal multiplexer like tmux (install with sudo apt install tmux). With tmux, start a session with tmux, run your agent, then press Ctrl+B then D to detach. Your agent keeps running even after closing the terminal. Reattach later with tmux attach.
WSL is using too much memory
Create a file at C:\Users\YourName\.wslconfig with these contents to cap memory usage:

[wsl2]
memory=4GB
swap=2GB

Then restart WSL with wsl --shutdown from PowerShell and reopen Ubuntu. Adjust the values to suit your system.
How do I access my Windows files from Ubuntu?
Your Windows drives are mounted at /mnt/c/, /mnt/d/, etc. So your Windows Desktop is at /mnt/c/Users/YourName/Desktop. You can cd into these directories and work with your Windows files directly from the Ubuntu terminal.

You're all set.

Your OpenClaw agent is running on Ubuntu inside Windows. Start connecting your messaging platforms and installing skills from ClawHub. Happy building.