Zero‑to‑Hero OpenClaw Guide: Install, Configure, and Use the AI Gateway on Windows

This step‑by‑step guide shows how a complete beginner can install OpenClaw on Windows 10, obtain an Alibaba Cloud Qwen API key, configure the gateway, start the service, and interact with the AI model through the web UI, all within a few hours.

Advanced AI Application Practice
Advanced AI Application Practice
Advanced AI Application Practice
Zero‑to‑Hero OpenClaw Guide: Install, Configure, and Use the AI Gateway on Windows

Practice 1 – Local deployment on Windows 10

Prerequisites

OS: Windows 10 or Windows 11

Node.js 22 LTS (or Node 24, recommended)

Network access to GitHub and npm

Alibaba Cloud account for a Qwen API key

Step 1 – Obtain a Qwen API key

Open https://bailian.console.aliyun.com/ and log in.

Navigate to the API‑Key management page.

Create a new key; copy the value that looks like sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx. Store it securely – it is shown only once.

Step 2 – Install Node.js

Download the LTS MSI from https://nodejs.org/ (e.g., node-v22.x-x64.msi, ~35 MB).

Run the installer and accept defaults.

Verify the installation:

C:\> node --version
v22.x.x
C:\> npm --version
10.x.x
✅ Installation successful

Step 3 – Install OpenClaw

Method 1 (recommended) – run the official PowerShell script: iwr -useb https://openclaw.ai/install.ps1 | iex The script checks for Node.js and npm, then installs OpenClaw. Expected output:

🔍 Checking system…
✅ Node.js 22.x installed
✅ npm 10.x installed
📦 Installing OpenClaw…
████████████████████ 100%
🎉 Installation complete!
Run <strong>openclaw init</strong> to start.

Method 2 – install via npm globally: npm install -g openclaw@latest If a sharp build error occurs, set the environment variable before reinstalling:

$env:SHARP_IGNORE_GLOBAL_LIBVIPS=1
npm install -g openclaw@latest

Step 4 – Configure the Qwen model

Run the onboarding wizard to create the configuration directory and enable auto‑start: openclaw onboard --install-daemon Edit C:\Users\<em>YourName</em>\.openclaw\openclaw.json (or use the CLI) to add the model and API key. Example JSON:

{
  "agents": {
    "defaults": {
      "model": {
        "primary": "dashscope-api/qwen-turbo",
        "fallbacks": ["dashscope-api/qwen-plus"]
      }
    }
  },
  "providers": {
    "dashscope-api": {
      "baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
      "apiKey": "YOUR_API_KEY"
    }
  }
}

Alternatively, configure via CLI:

openclaw config set agents.defaults.model.primary "dashscope-api/qwen-turbo"
openclaw config set providers.dashscope-api.apiKey "sk-YOUR_API_KEY"
openclaw config set providers.dashscope-api.baseUrl "https://dashscope.aliyuncs.com/compatible-mode/v1"

Step 5 – Start the service

Run diagnostics: openclaw doctor If problems are reported, follow the suggested fixes.

Launch the gateway on port 18789: openclaw gateway --port 18789 Expected output:

✓ Gateway started on port 18789
✓ Control UI: http://127.0.0.1:18789

Open the control panel in a browser at http://127.0.0.1:18789. The UI shows the running status, selected model (Qwen Turbo), and channel configuration.

Step 6 – Test a conversation

In the UI, select the Chat tab.

Enter a message, e.g., “Hello, introduce yourself in one sentence.”

The AI replies, for example:

你好!我是 OpenClaw,一个可以帮你集成各种大模型的 AI 助理网关。有什么可以帮你的吗?

Common issues

Command not found: Ensure the npm global bin directory is in PATH.

Invalid API key: Verify the key was copied correctly and that the Alibaba Cloud account has sufficient quota.

Network timeout: Confirm connectivity to dashscope.aliyuncs.com and configure a proxy if needed.

Practice 2 – Configuring the Qwen large model

Model comparison (recommended for beginners)

qwen-turbo – fast, low cost; suitable for casual chat and simple tasks.

qwen-plus – balanced performance and cost; general‑purpose use.

qwen-max – strongest inference; best for complex tasks and code generation.

qwen-long – supports very long context; ideal for long‑document analysis.

Step 1 – Set the API key

Via configuration file (edit openclaw.json):

{
  "providers": {
    "dashscope-api": {
      "baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
      "apiKey": "sk-YOUR_API_KEY"
    }
  }
}

Via CLI:

openclaw config set providers.dashscope-api.apiKey "sk-YOUR_API_KEY"

Step 2 – Add multiple models

{
  "agents": {
    "defaults": {
      "models": {
        "dashscope-api/qwen-turbo": {"alias": "Qwen Turbo"},
        "dashscope-api/qwen-plus": {"alias": "Qwen Plus"},
        "dashscope-api/qwen-max": {"alias": "Qwen Max"}
      }
    }
  }
}

During a chat you can switch models with the command /model qwen-max.

Step 3 – Test model invocation

openclaw message send --target "test" --message "你好"

Practice 3 – Basic usage tutorial

Step 1 – Open the control panel

Navigate to http://127.0.0.1:18789. The top menu contains Home , Chat , Skills , Sessions , and Settings . Status indicators show the service state, current model, and daily call count.

Step 2 – Send the first message

Click the Chat tab.

Type a message in the input box.

Press Send .

You: 你好
AI: 你好!有什么可以帮你的吗?

Step 3 – View conversation history

Select the Sessions tab and choose a session entry, e.g., “Session 1 – 2026‑03‑29 15:30”.

Step 4 – Adjust model parameters

In the Settings tab you can modify:

Temperature (default 0.7; higher values increase randomness).

Maximum token length (default 2048).

Click Save to apply changes.

Step 5 – Configure automatic session reset

{
  "session": {
    "reset": {
      "mode": "daily",
      "atHour": 4
    }
  }
}

Learning checklist

✅ Install OpenClaw independently.

✅ Configure a large‑model API.

✅ Chat via the Control UI.

✅ View session history.

✅ Adjust model parameters (temperature, max tokens).

✅ Set up daily session reset.

Node.jswindowstutorialChatbotAI gatewayOpenClawQwen model
Advanced AI Application Practice
Written by

Advanced AI Application Practice

Advanced AI Application Practice

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.