How to Run OpenClaw on Windows with WSL2 (2026 Guide)

How to Run OpenClaw on Windows with WSL2 (2026 Guide)

If you run Windows as your primary operating system and want to use OpenClaw, you don’t need to dual-boot Linux or spin up a separate machine. With WSL2 (Windows Subsystem for Linux version 2), you can run OpenClaw in a full Linux environment directly inside Windows. By the end of this guide, you will have OpenClaw installed, running, and accessible at http://localhost:3000 in your Windows browser.

This guide is written for Windows 10 (version 2004 and later) and Windows 11 users. No prior Linux experience is required. Let’s get started.

What WSL2 Is and Why It’s the Right Choice for OpenClaw on Windows

WSL2 is a major upgrade from WSL1. WSL1 was a translation layer that mapped Linux system calls to Windows kernel calls. It worked for many tools but had compatibility gaps and slower file system performance. WSL2 runs a real Linux kernel inside a lightweight virtual machine. This means near-native performance for most command-line tools, full system call compatibility, and seamless integration with Windows.

OpenClaw is built to run on Linux (and macOS). It requires Node.js and works with the Linux file system for optimal performance. Running OpenClaw on WSL2 gives you:

  • Full Linux environment without leaving Windows
  • Near-native performance for Node.js and agent execution
  • Automatic port forwarding from WSL2 to Windows (localhost:3000 works out of the box)
  • Access to your WSL2 files from Windows Explorer at \wsl$\Ubuntu\
  • No dual-boot, no separate VM, no extra hardware

If you want to run openclaw windows wsl2, this is the definitive 2026 guide to get it done.

Step 1: Install WSL2 with Ubuntu

The fastest way to install WSL2 is with a single command in PowerShell.

Open PowerShell as Administrator

  1. Press the Windows key, type PowerShell
  2. Right-click Windows PowerShell and select Run as administrator
  3. Click Yes when the UAC prompt appears

Run the WSL Install Command

In the Administrator PowerShell window, run:

wsl --install

This command:

  • Enables the required Windows features (Virtual Machine Platform, Windows Subsystem for Linux)
  • Downloads and installs the Linux kernel update package
  • Sets WSL2 as the default version
  • Installs Ubuntu as the default Linux distribution

After the installation finishes, you will be prompted to restart your computer. Restart when asked.

Note: If wsl --install fails, make sure virtualization is enabled in your BIOS. Virtualization is usually labeled as Intel VT-x, AMD-V, or SVM Mode in BIOS settings. Most modern computers have it enabled by default.

Set Up Ubuntu

After restarting, open the Start Menu and launch Ubuntu. The first launch will take a minute or two as it completes the installation. You will be asked to create a UNIX username and password:

Installing, this may take a few minutes...
Please create a default UNIX user account.
Username: [enter your username]
Password: [enter your password]

This username and password are for your WSL2 Ubuntu environment. They are separate from your Windows credentials. You will need the password for sudo commands later.

Step 2: Update Ubuntu and Install Node.js

Now that Ubuntu is installed and running, update the package list and upgrade all existing packages:

sudo apt update && sudo apt upgrade -y

This may take a few minutes depending on your internet connection.

Install Node.js via NodeSource

OpenClaw requires Node.js. We recommend installing Node.js 22.x from NodeSource, which provides the latest stable version:

curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt install -y nodejs

Once the installation completes, verify that Node.js and npm are installed correctly:

node --version
npm --version

You should see output similar to:

v22.x.x
11.x.x

If you see version numbers, Node.js is ready to use.

Step 3: Install and Start OpenClaw

With Node.js installed, installing OpenClaw is a single npm command:

sudo npm install -g openclaw

The -g flag installs OpenClaw globally so you can run the openclaw command from anywhere in your terminal.

Start OpenClaw

openclaw start

OpenClaw will start and output something like:

OpenClaw Gateway running at http://localhost:3000

Access OpenClaw from Your Windows Browser

Open any browser in Windows (Chrome, Edge, Firefox) and navigate to:

http://localhost:3000

WSL2 automatically forwards port 3000 from the Linux environment to Windows. The OpenClaw web UI will load just as it would on a native Linux machine.

If the page does not load, try:

http://127.0.0.1:3000

Working with Files: WSL2 and Windows Explorer

One of WSL2’s best features is that your Linux files are accessible from Windows and vice versa.

Accessing WSL2 Files from Windows

Open Windows Explorer and type the following into the address bar:

\wsl$\Ubuntu\home\your-username\

Replace your-username with the username you created during Ubuntu setup. This gives you direct access to your WSL2 home directory from Windows. You can open files, copy them, and edit them with Windows tools.

Performance Tip: Keep Your Workspace Inside WSL2

For the best performance with OpenClaw, keep your workspace files inside the WSL2 file system (under ~/).

You can access your Windows drives from WSL2 at /mnt/c/, but file operations across the Linux-Windows boundary are significantly slower. Cloning repos, running npm install, and agent execution will all be faster if you work entirely within the WSL2 home directory.

Recommended: Install Windows Terminal

Windows Terminal is Microsoft’s modern terminal application. It supports tabs, split panes, GPU-accelerated rendering, and full WSL2 integration. Install it from the Microsoft Store for the best WSL2 experience.

Keeping OpenClaw Running: tmux and Task Scheduler

By default, when you close the WSL2 terminal window, the running processes are terminated. This means OpenClaw stops. There are two reliable solutions.

Solution 1: tmux

tmux is a terminal multiplexer that keeps sessions running even after you detach from them.

sudo apt install tmux

Start a new tmux session for OpenClaw:

tmux new -s openclaw

Inside the tmux session, run OpenClaw:

openclaw start

You can now safely close the terminal window. To reconnect later, open Ubuntu or Windows Terminal and run:

tmux attach -t openclaw

To detach from a tmux session without killing it, press Ctrl+B then D.

Solution 2: Windows Task Scheduler

For a more permanent solution, configure Windows Task Scheduler to start WSL2 with OpenClaw automatically at login.

  1. Open Task Scheduler from the Start Menu
  2. Click Create Basic Task on the right
  3. Name: OpenClaw Startup
  4. Trigger: When I log on
  5. Action: Start a program
  6. Program/script: wsl
  7. Arguments: -d Ubuntu -u your-username -- openclaw start

Replace your-username with your actual WSL2 username. OpenClaw will now start automatically every time you log into Windows.

Common WSL2 Issues and Fixes

wsl –install fails

If the install command fails, virtualization may be disabled in your BIOS. Restart your computer, enter BIOS setup (usually by pressing F2, F10, Del, or Esc during boot), and enable Intel VT-x, AMD-V, or SVM Mode. Save and exit.

Ubuntu not found after install

Some older builds of Windows 10 require a manual update. Run the following from PowerShell:

wsl --update

Then install Ubuntu explicitly:

wsl --install -d Ubuntu

If that still fails, check your Windows version by running winver. You need Windows 10 build 19041 or higher.

localhost:3000 not loading in Windows browser

This is usually a quick fix:

  • Try http://127.0.0.1:3000 instead of localhost
  • Make sure OpenClaw is actually running in WSL2 (check the terminal)
  • Restart the WSL2 instance: in PowerShell run wsl --shutdown then reopen Ubuntu and restart OpenClaw
  • If you are using a VPN, try disconnecting it temporarily

Slow file access on /mnt/c/

Accessing Windows files from WSL2 via /mnt/c/ is slow because every file operation crosses the Linux-Windows filesystem boundary. The fix is simple: keep all your OpenClaw workspace files inside the WSL2 home directory (~/). Use \wsl$\Ubuntu\ from Windows when you need to access those files from Windows applications.

What to Do After Install

OpenClaw is running at http://localhost:3000. Here is what to explore next:

  • Configure your agents in the openclaw.json config file, located in your WSL2 home directory
  • Connect companion apps for your devices (the web UI includes setup codes for pairing)
  • Install skills to extend OpenClaw’s capabilities
  • Explore the skills directory at ~/.openclaw/skills/ to see what’s available
  • Set up Tailscale for remote access if you want to reach OpenClaw from outside your home network

If you run into any issues, the OpenClaw community is active and helpful. Check the project’s documentation and GitHub issues for troubleshooting.

Sources

Related Reading on RedRook

Similar Posts