Skip to content

How to Install OpenClaw on Windows (WSL2 Guide)

Install OpenClaw on Windows the reliable way — through WSL2. Prerequisites, Node.js, cloning and running OpenClaw, connecting a model, and the common gotchas.

MGMCSA Guru Team February 3, 2026 5 min read
Installing OpenClaw inside WSL2 on Windows 11 with a terminal showing the running daemon

The short version of installing OpenClaw on Windows: do it inside WSL2, not native PowerShell. OpenClaw is built around a Unix-style environment — shell commands, file paths, a background daemon — and WSL2 gives it exactly that, running inside Windows with almost no performance cost. People who fight to run it directly on Windows usually end up switching to WSL anyway, so we’ll start there and save you the detour.

This guide covers the prerequisites, getting WSL2 ready, installing OpenClaw, connecting a model, and the gotchas that trip people up. If you’re brand new to OpenClaw, the explainer gives the background; otherwise, open a terminal.

Before you start

Prerequisites

  • Windows 11, or Windows 10 on a recent build
  • WSL2 installed with a Linux distro (Ubuntu is the common choice)
  • Node.js and git inside the WSL distro
  • A model API key (e.g. DeepSeek) or Ollama for local models

If WSL2 isn’t set up yet, our WSL2 install guide gets you there, and Microsoft’s WSL environment setup covers installing Node and git inside the distro. Come back once wsl drops you into a Linux shell and node -v works.

Step 1: open your WSL shell

Everything from here happens inside WSL, not PowerShell. Launch your distro:

wsl

You’re now in Linux. Confirm the basics are present:

node -v
git --version

If either is missing, install it inside the distro before continuing — Node and git living in Windows don’t count here; OpenClaw needs them in the Linux environment.

Step 2: get OpenClaw

Clone the repository into your WSL home directory and install dependencies. The exact install steps can change as the project moves, so cross-check the OpenClaw repo README, but the shape is:

cd ~
git clone https://github.com/openclaw/openclaw.git
cd openclaw
npm install

Some releases offer a one-line install script instead of a manual clone. If the README points to one, prefer it — it handles the steps above and any extras the current version needs.

Step 3: connect a model

OpenClaw needs a brain before it’s useful. You set the provider’s endpoint and key, then choose the model. Keep the key in an environment variable rather than pasting it into a config file:

export OPENCLAW_API_KEY="your-provider-key"

Which provider you point at is the decision that controls cost:

Common model choices

Provider Why pick it
DeepSeek Cheapest pay-per-use
GLM (Z.AI) Flat monthly plan
Ollama (local) Free and private

For the lowest-friction cheap start, follow the DeepSeek setup; for fully free and private, the Ollama local setup. Both pick up exactly where this guide leaves off.

Step 4: run the daemon

Start OpenClaw. Again, confirm the current command against the repo, but it’s typically a start script:

npm start

On first run it walks you through configuration — picking the model, choosing a channel to talk through, enabling skills. Start by talking to it in the terminal; you can add Telegram or Discord later once it works.

Step 5: confirm it works

Talk to it. Ask it something simple that exercises a capability — “what files are in this directory?” — and check it responds and acts. If the model answers but can’t touch files, the model is connected but a permission or skill isn’t enabled; if nothing answers, the model connection is the issue.

Install checklist

  • WSL2 with a Linux distro, Node and git inside it
  • OpenClaw cloned into your WSL home, dependencies installed
  • Model provider endpoint and key set as environment variables
  • Daemon started; talking to it from the terminal works
  • Files kept on the Linux filesystem, not /mnt/c
  • A process manager or VPS in mind if you want it always-on

Common gotchas

A few things that cause most first-install trouble:

  • Running in PowerShell instead of WSL. The number-one source of pain. If setup is fighting you on native Windows, move to WSL2 and most of it evaporates.
  • Node/git installed on Windows but not in the distro. They have to exist inside WSL. Check with node -v in the WSL shell.
  • Working from /mnt/c. Slow and permission-prone. Use your Linux home.
  • Key in a config file that gets shared. Keep it in an environment variable so it doesn’t leak.

Wrapping up

Installing OpenClaw on Windows is mostly about choosing the right environment: WSL2, not native PowerShell. Get WSL2 and a distro ready with Node and git, clone OpenClaw into your Linux home, connect a model with the key in an environment variable, and start the daemon. Talk to it in the terminal first, then expand to messaging channels and skills once it’s working.

Next, give it a brain on a budget with the DeepSeek setup or go fully local with Ollama. The power-user guide maps everything else you can do from here.

Frequently asked questions

Can I run OpenClaw on Windows without WSL?

You can try, but it's the harder, more error-prone path. OpenClaw expects a Unix-style environment — shell commands, file paths, a background daemon — which native PowerShell handles differently. WSL2 gives it the Linux environment it was built for, with almost no performance cost, so it's the recommended route.

What do I need before installing OpenClaw?

Windows 10 (recent build) or 11 with WSL2 installed, a Linux distro like Ubuntu inside it, Node.js, git, and either an API key for a model provider or Ollama for a local model. Once those are ready, the OpenClaw install itself is short.

Where do my files live — Windows or WSL?

Keep OpenClaw and its working files on the WSL (Linux) filesystem, under your home directory, not on the Windows /mnt/c path. Working across the boundary is slower and causes permission quirks. Treat the WSL home as where OpenClaw lives.

How do I connect a model after installing?

Set the provider's base URL and API key in OpenClaw's configuration or environment, then pick the model. For a cheap start, point it at DeepSeek; for free and local, point it at Ollama. The per-model setup guides cover the exact values.

Does OpenClaw keep running after I close the terminal?

OpenClaw runs as a daemon, so you can keep it running in the background. In WSL, people commonly run it under a process manager or a persistent session so it survives closing the terminal window. For an always-on assistant, a small VPS is also a common choice.

Sources & further reading

Official vendor documentation referenced while writing this guide.

MG

MCSA Guru Team

IT & Systems Administration

We are working IT pros and system administrators who spend our days in Windows Server, Microsoft 365, and the wider Microsoft stack. MCSA Guru is where we write down the fixes and walkthroughs we wish we had found the first time.

MCSA Guru provides independent, educational IT guidance. Microsoft, Windows, Windows Server, Microsoft 365, Exchange, and Microsoft Teams are trademarks of Microsoft Corporation; Docker is a trademark of Docker, Inc. MCSA Guru is not affiliated with or endorsed by Microsoft or Docker. Always test changes in a safe environment before applying them in production.

Related guides

Fixing something right now?

Jump straight into the guide library or search for the exact error or task you are dealing with.