---
title: I Tried Natively Installing OpenClaw on Windows 11
description: "Infrastructure / Self-hosted AI Agent # Native Installation of OpenClaw on Windows 11 Previously, we validated native installation of OpenClaw on Windows Server 2019. This time, we tested the same native route on Windows 11. We are publishing verification records…"
url: "https://bestnetllc.co.jp/en/docs/i-tried-natively-installing-openclaw-on-windows-11/"
updated: "2026-10-19"
category: Tech Blog
---

# I Tried Natively Installing OpenClaw on Windows 11

Infrastructure / Self-hosted AI Agent

# Native Installation of OpenClaw on Windows 11

Previously, we validated native installation of OpenClaw on Windows Server 2019.
This time, we tested the same native route on Windows 11.
We are publishing verification records of whether the numerous obstacles we faced on Server 2019 will reappear on Windows 11,
or whether it will run smoothly.

OpenClaw
Windows 11
Native Installation
pnpm
GPUStack
Self-hosted AI**Relationship to Previous Article**
This article is a continuation of “Installing OpenClaw on Windows Server 2019 (Complete Edition)”.
Please refer to that article for details on Server 2019 verification.

## Why We Chose the Native Route Over WSL2

On Windows 11, WSL2 and Ubuntu can be installed with a single `wsl --install` command,
so normally the WSL2 route is overwhelmingly easier.
We chose the native route anyway because we had the goal of **wanting to operate the Windows machine itself**.

| What We Want to Do | WSL2 | Native |
| --- | --- | --- |
| File Operations (Linux side) | ◎ | △ |
| File Operations (Windows side) | ○ (via /mnt/c) | ◎ |
| Web Browsing & Search | ◎ | ◎ |
| Code Execution & Automation | ◎ | ◎ |
| PowerShell Execution | ○ (via invocation) | ◎ |
| Windows Service Management | △ | ◎ |
| Registry Operations | ✕ | ◎ |
| WMI & COM Operations | ✕ | ◎ |
| Windows GUI Operations | ✕ | ◎ (with skill activation) |
| systemd Service Activation | ◎ | ✕ |
| Stability & Full Features | ◎ | △ |

**Conclusion**
If you want to use Windows as an agent that can operate anything, **native is your only choice**.
If your focus is on information gathering, code generation, and task automation, WSL2 is easier.

## Environment Configuration

OpenClaw Host

- Windows 11
- OpenClaw v2026.4.5 (pnpm installation)
- Node.js v22.14.0
- Gateway Port: 18789

Model & Search Backend

- GPUStack + vLLM 0.17.1
- Qwen2.5-14B-Instruct
- SearXNG (on-premises)
- Custom Provider (OpenAI-compatible)

## Installation Steps

1. ### Install Git for Windows
   Git is required for npm dependency resolution. Run in administrator PowerShell.
   ```
   curl.exe -L -o git.exe "https://github.com/git-for-windows/git/releases/download/v2.47.1.windows.1/Git-2.47.1-64-bit.exe"
   .git.exe /VERYSILENT /NORESTART
   Start-Sleep -Seconds 30
   ```
   Close and reopen PowerShell, then verify with `git --version`.
2. ### Install Node.js 22 LTS
   ```
   curl.exe -L -o nodejs.msi "https://nodejs.org/dist/v22.14.0/node-v22.14.0-x64.msi"
   msiexec /i nodejs.msi /quiet /norestart
   Start-Sleep -Seconds 30
   ```
   Close and reopen PowerShell. Verify with `node --version` showing `v22.x.x`.
3. ### Script Execution Policy and pnpm Setup
   ```
   Set-ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
   npm install -g pnpm
   pnpm setup
   ```
   Close and reopen PowerShell.
4. ### Install OpenClaw with pnpm
   ```
   $env:NODE_OPTIONS=""
   pnpm add -g openclaw@2026.4.5
   ```
   After download completes, approve the build script.
   ```
   pnpm approve-builds -g
   # Select all with spacebar → Enter → y
   pnpm add -g openclaw@2026.4.5
   ```
   Building OpenClaw takes approximately 2 minutes.
5. ### Persist PATH at Machine Level
   Prevents PATH from disappearing each time you open a new PowerShell.
   ```
   $paths = @(
     'C:Program Filesnodejs',
     "$env:APPDATAnpm",
     "$env:LOCALAPPDATApnpm"
   )
   $current = [System.Environment]::GetEnvironmentVariable('PATH','Machine')
   $entries = ($current -split ';') + $paths | Select-Object -Unique
   [System.Environment]::SetEnvironmentVariable('PATH', ($entries -join ';'), 'Machine')
   $env:PATH = ($entries -join ';')
   Write-Host "openclaw:" (Get-Command openclaw -EA SilentlyContinue).Source
   ```
6. ### Onboarding
   ```
   $env:NODE_OPTIONS=""
   openclaw onboard
   ```
   Configure the following in the wizard:
   - Security Warning: Continue with `Yes`
   - Setup mode: `QuickStart`
   - Config handling (if existing config is detected): **Reset** to start fresh
   - Model Provider: **Custom Provider**
   - Base URL: `http://<GPUStack IP>/v1`
   - API Key Delivery Method: **Paste API key now**
   - Endpoint Compatibility: `OpenAI-compatible`
   - Model ID: Model name running on GPUStack
   - Channel: **Skip for now**
   - Skill Dependencies: **Skip for now**
   - Web Search: **SearXNG Search** → Enter URL
   - Hooks: Enable `session-memory` only
   **If “Config handling” screen appears**
   If configuration files created on another machine or from previous installation are detected,
   the `Existing config detected` → `Config handling` option will appear at the start of onboarding.
   If starting fresh, select **Reset**.
7. ### Manually Fix contextWindow
   After onboarding completes, OpenClaw may misdetect the model’s context length.
   Edit the configuration file directly (change provider name to match your environment).
   ```
   $config = Get-Content "$env:USERPROFILE.openclawopenclaw.json" | ConvertFrom-Json
   $config.models.providers.'custom-10-255-253-205'.models[0].contextWindow = 32768
   $config.models.providers.'custom-10-255-253-205'.models[0].maxTokens = 8192
   $config | ConvertTo-Json -Depth 20 | Set-Content "$env:USERPROFILE.openclawopenclaw.json" -Encoding UTF8
   ```
8. ### Start Gateway & Verify Operation
   ```
   $env:NODE_OPTIONS=""
   openclaw gateway run
   ```
   When `[gateway] ready` appears in the log, open the dashboard in another window.
   ```
   $env:NODE_OPTIONS=""
   openclaw dashboard
   ```
   Installation is complete if you can chat in the `main` session.
9. ### Save ocstart.ps1 to Desktop
   Create a shortcut to eliminate the need to set PATH and NODE_OPTIONS every time.
   ```
   $script = @'
   param([switch]$Stop)
   $env:NODE_OPTIONS=""
   $paths = @('C:Program Filesnodejs', "$env:APPDATAnpm", "$env:LOCALAPPDATApnpm")
   foreach ($p in $paths) {
     if (($env:PATH -split ';') -notcontains $p) { $env:PATH += ";$p" }
   }
   if ($Stop) { openclaw gateway stop; exit }
   $action = Read-Host "[1] Start Gateway  [2] Stop  [3] Dashboard  [4] TUI  [5] Status`n> "
   switch ($action) {
     '1' { openclaw gateway run }
     '2' { openclaw gateway stop }
     '3' { openclaw dashboard }
     '4' { openclaw tui }
     '5' { openclaw gateway status; openclaw doctor }
   }
   '@
   $script | Out-File "$env:USERPROFILEDesktopocstart.ps1" -Encoding UTF8
   $ws = New-Object -ComObject WScript.Shell
   $sc = $ws.CreateShortcut("$env:USERPROFILEDesktopOpenClaw Start.lnk")
   $sc.TargetPath = "powershell.exe"
   $sc.Arguments = "-ExecutionPolicy Bypass -File `"$env:USERPROFILEDesktopocstart.ps1`""
   $sc.Save()
   Write-Host "Complete"
   ```

## GPUStack Configuration

Add the following to the model backend parameters in the GPUStack admin panel and restart the model.

```
--max-model-len 32768
--generation-config vllm
--enable-auto-tool-choice
--tool-call-parser hermes
```

**Note**
After saving, a message appears stating “Changes will only apply after deleting and recreating the instance”. Stop and restart the model.

## Comparison with Server 2019

Improvements on Windows 11

- WSL2 is available as an option
- Native route works as-is with the same procedure as Server 2019
- Microsoft Store enables easy acquisition of various tools

Same Behavior as Server 2019

- npm version may encounter MODULE_NOT_FOUND (pnpm recommended)
- PATH persistence is necessary
- `NODE_OPTIONS` must be cleared
- Manual contextWindow adjustment is required
- GPUStack backend parameter configuration is necessary

**“Config handling” screen is Windows 11 specific**
When running onboarding on Windows 11 after Server 2019 verification,
the existing configuration file was detected and `Config handling` options appeared.
This occurs when configuration files configured on another machine are shared
or when reinstalling on the same machine.
If starting fresh, select **Reset**.

## Operation Verification Checklist

- `openclaw --version` displays output
- `[gateway] ready` appears in the log
- Dashboard (`http://127.0.0.1:18789`) opens in browser
- Chat returns responses in the `main` session
- GPUStack log displays `POST /v1/chat/completions HTTP/1.1" 200 OK`
- Session screen TOKENS shows `xxxxx / 32768`
- SearXNG search functions

## Summary

Native installation on Windows 11 can reuse the procedure established for Server 2019 almost as-is.
**Use pnpm, persist PATH, and clear NODE_OPTIONS**—these three principles remain unchanged on Windows 11.

A key difference from Server 2019 is that Windows 11 offers WSL2 as an option,
allowing you to choose routes based on your use case.
Use native if you want to operate Windows itself,
and use WSL2 for general AI agent purposes—choose based on your goals.

**Conclusion**
Windows 11 native installation is not simpler than Server 2019,
but it will definitely work if you follow the established procedure.
**Using pnpm from the start is the most important point.**This article’s procedure is based on OpenClaw v2026.4.5, vLLM 0.17.1, and GPUStack as of April 2026.
Behavior may differ if versions change.
