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").
https://www.myai168.com/en/api/anthropic (without /v1)claude-opus-4-8%USERPROFILE%\.openclaw\openclaw.json (usually C:\Users\your-account\.openclaw\)
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":
node --version again.winget install OpenJS.NodeJS.LTS, then reopen PowerShell after it finishes.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.
(Prerequisite: cc-switch is already installed — for installation, see the "cc-switch Windows" page in the Developer Center.)
myai168-claude (lowercase, with a hyphen)MYAI168 Claudehttps://www.myai168.com/en/api/anthropic (without /v1)claude-opus-4-8 as the Model IDConfirm 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.
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.)
Run doctor to initialize (it will ask a few questions):
openclaw doctor
Recommended answers:
(If you see "No command owner configured" along the way, that is for Telegram / Discord remote control and can be ignored for local use.)
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".
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/
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.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.Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSignedopenclaw config set gateway.mode local --allow-unconfigured, or rerun openclaw onboard --mode local.Get-Content "$env:LOCALAPPDATA\Temp\openclaw\openclaw-*.log" -Tail 40Update: 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