Home›Developer Center›OpenClaw Windows

OpenClaw Windows

API DocumentationOpenAI ChatGPT APIAnthropic (Claude) APIGoogle Gemini APIGoogle Search APIGoogle News APIOpenRouter APIAPI Pricing
CLI & Agent Guidescc-switch macOScc-switch Windowscc-switch LinuxOpenCode macOSOpenCode WindowsOpenCode LinuxOpenClaw macOSOpenClaw WindowsOpenClaw LinuxHermes Agent macOSHermes Agent WindowsHermes Agent LinuxClaude Code CLI macOSClaude Code CLI WindowsClaude Code CLI LinuxCodex CLI macOSCodex CLI WindowsCodex CLI Linux
MYAI168 API & MCPMYAI168 MCP CLIMYAI168 MCP Web & App
No matching questions on this page.Search the whole site
Installation Overview (Windows Native, no WSL)

OpenClaw Installation and MYAI168 Setup Guide — Windows Native (no WSL)

Goal of this guide: install OpenClaw (nicknamed "the lobster" 🦞, an open-source AI agent that runs on your own computer) natively on Windows "without WSL", connect it to MYAI168 with cc-switch, and use Claude Opus 4.8.

Note: OpenClaw is primarily Linux-based, and the official Windows route uses WSL2. This guide takes the "native PowerShell + npm" route and does not require WSL. The biggest difference in native mode: the background service (Gateway) runs as a "Windows Scheduled Task" instead of Linux systemd, and must be started manually (see "4. Initialize and Start the Gateway").

Endpoint and Model

  • Anthropic native endpoint: https://www.myai168.com/en/api/anthropic (without /v1)
  • Primary model: claude-opus-4-8

Config File Location

%USERPROFILE%\.openclaw\openclaw.json (usually C:\Users\your-account\.openclaw\)

Important Security Notes

  • OpenClaw has broad system permissions (read files, run commands, send messages, browse the web). It is strongly recommended to install it on a test machine or an isolated environment, not on a main machine holding lots of sensitive data.
  • The admin dashboard (Control UI) binds to 127.0.0.1 (localhost) by default; never expose it to the public network.
  • Always install the latest version (older versions had serious security vulnerabilities).
  • Treat your API key like a password; if it leaks, revoke and replace it in the MYAI168 console.
0.5 Install Node.js (if not installed)

OpenClaw is installed with npm, which requires Node.js (official requirement 22.22.3+, 24.15+, or 25.9+; Node 24 is the default target and the recommended choice). First check in PowerShell:

node --version
npm --version

If you get version numbers, skip to "1. Install OpenClaw". If you get "command not recognized":

  • Method A (recommended): go to https://nodejs.org, download the LTS Windows installer (.msi), double-click and click Next all the way through, then "close and reopen PowerShell" and check node --version again.
  • Method B (fallback): winget install OpenJS.NodeJS.LTS, then reopen PowerShell after it finishes.
1. Install OpenClaw

If PowerShell's execution policy blocks you, allow scripts first (affects the current user only):

Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned

Install with npm:

npm install -g openclaw@latest

(You may see prompts like "npm warn allow-scripts" or a notice that a newer npm is available — harmless, ignore them.)

Verify:

openclaw --version

Seeing a version number (for example OpenClaw 2026.6.11) means the installation succeeded.

2. Configure MYAI168 with cc-switch

(Prerequisite: cc-switch is already installed — for installation, see the "cc-switch Windows" page in the Developer Center.)

  • Open cc-switch and click the "OpenClaw" tab at the top.
  • Click "+" to add a provider and fill in:
    • Provider Key: myai168-claude (lowercase, with a hyphen)
    • Provider Name: MYAI168 Claude
    • API Protocol: choose Anthropic (not the default OpenAI Completions)
    • API Endpoint: https://www.myai168.com/en/api/anthropic (without /v1)
    • API Key: your MYAI168 key
    • Models: click "+ Add Model" and enter claude-opus-4-8 as the Model ID
  • Click "+ Add" to save, then Enable it on the card.

Confirm cc-switch wrote the config file:

Get-Content $env:USERPROFILE\.openclaw\openclaw.json

Under models.providers you should see myai168-claude, claude-opus-4-8, baseUrl, and api: anthropic-messages.

3. Add gateway.mode (cc-switch does not write it — critical)

cc-switch only writes the "model providers"; it does not write the Gateway settings. Without gateway.mode, OpenClaw's Gateway "cannot start" (the log will show: Gateway start blocked: existing config is missing gateway.mode).

So you must add this one line manually:

openclaw config set gateway.mode local

(Seeing Updated gateway.mode. Restart the gateway to apply. means it succeeded.)

4. Initialize and Start the Gateway

Run doctor to initialize (it will ask a few questions):

openclaw doctor

Recommended answers:

  • Generate and configure a gateway token now? → Yes
  • Create Session store dir? → Yes
  • Tighten permissions? → Yes
  • Update gateway service config to recommended defaults? → Yes
  • Disable unavailable skills? → Yes (tools not installed in this environment; disabling them keeps things clean)
  • Enable shell completion? → Yes

(If you see "No command owner configured" along the way, that is for Telegram / Discord remote control and can be ignored for local use.)

Windows native key point: the Gateway must be started manually

In native mode the Gateway is managed as a "Windows Scheduled Task"; after installation it is "not running automatically". The official Windows flow installs the Gateway service first (which creates the managed scheduled task), then starts it:

openclaw gateway install
openclaw gateway start
openclaw gateway status

The status output must show the following for the Gateway to be healthy:

Runtime: running
Connectivity probe: ok
Listening: 127.0.0.1:18789

If you see ECONNREFUSED / stopped / unreachable, see "6. Quick Troubleshooting".

5. Launch and Verify
openclaw

On first launch you will enter the built-in OpenClaw setup agent (formerly called Crestodian). Just type a sentence and it will take you to the normal chat interface (main agent); the status bar at the bottom should show myai168-claude/claude-opus-4-8.

Ask a math question in the main agent:

What is 123456 times 789? Reply with the number only.

If it answers 97406784, the status bar shows myai168-claude/claude-opus-4-8, and the token count increases, the connection works. (Do not verify with "who are you" — model self-identification is unreliable; for actual usage, check the call records in the MYAI168 console.)

You can also open the dashboard (browser): http://127.0.0.1:18789/

6. Quick Troubleshooting
  • Gateway unreachable / ECONNREFUSED 127.0.0.1:18789 → the Gateway is not running. First confirm gateway.mode was added in "3. Add gateway.mode", then run openclaw gateway install, openclaw gateway start and openclaw gateway status.
  • Gateway goes stopped right after starting (Service is loaded but not running) and the log shows "missing gateway.mode" → gateway.mode is missing. Run openclaw config set gateway.mode local, then openclaw gateway start.
  • openclaw command not found → open a new PowerShell so PATH takes effect, and confirm %USERPROFILE%\AppData\Roaming\npm is in PATH.
  • Scripts blocked by the execution policy → Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
  • config set is also blocked (missing gateway.mode / clobbered) → add a flag: openclaw config set gateway.mode local --allow-unconfigured, or rerun openclaw onboard --mode local.
  • See why the Gateway exited → Get-Content "$env:LOCALAPPDATA\Temp\openclaw\openclaw-*.log" -Tail 40
7. Maintenance and Security

Update: npm update -g openclaw (or openclaw update).

Security audit:

openclaw security audit

Change the API key: update the API Key on the OpenClaw card in cc-switch and Enable it again; or edit the apiKey in %USERPROFILE%\.openclaw\openclaw.json directly, then run openclaw gateway restart.

Gateway control: openclaw gateway start / status / restart

Config file location: %USERPROFILE%\.openclaw\openclaw.json; Gateway logs: %LOCALAPPDATA%\Temp\openclaw\

Official docs: https://docs.openclaw.ai, https://docs.openclaw.ai/platforms/windows

‹ Previous page: OpenClaw macOSNext page: OpenClaw Linux ›
↑
Question link copied.

Other FAQ pages

API Documentation

  • OpenAI ChatGPT API
  • Anthropic (Claude) API
  • Google Gemini API
  • Google Search API
  • Google News API
  • OpenRouter API
  • API Pricing

CLI & Agent Guides

  • cc-switch macOS
  • cc-switch Windows
  • cc-switch Linux
  • OpenCode macOS
  • OpenCode Windows
  • OpenCode Linux
  • OpenClaw macOS
  • OpenClaw Linux
  • Hermes Agent macOS
  • Hermes Agent Windows
  • Hermes Agent Linux
  • Claude Code CLI macOS
  • Claude Code CLI Windows
  • Claude Code CLI Linux
  • Codex CLI macOS
  • Codex CLI Windows
  • Codex CLI Linux

MYAI168 API & MCP

  • MYAI168 MCP CLI
  • MYAI168 MCP Web & App