Lesson 01 — Quick Start: Get Your Personal AI Assistant Running in 5 Minutes
Goal: Install OpenClaw, configure the MiniMax model, start the gateway, and send your first message.
What You Need
- macOS / Linux (Windows requires WSL2)
- Node.js 22+ (nvm recommended)
- pnpm 9+
- MiniMax API Key (register here)
Step 1: Clone and Install Dependencies
git clone https://github.com/openclaw/openclaw.git
cd openclaw
pnpm installStep 2: Configure Environment Variables
Copy the example .env file and fill in your MiniMax API Key:
cp .env.example .env # If there's no example file, create ~/.openclaw/.env directlyEdit .env and add:
MINIMAX_API_KEY=sk-your-keyStep 3: Create the Configuration File
Create ~/.openclaw/openclaw.json:
{
"gateway": { "mode": "local" },
"env": { "MINIMAX_API_KEY": "${MINIMAX_API_KEY}" },
"agents": {
"defaults": {
"model": { "primary": "minimax/MiniMax-M2.1" }
}
},
"models": {
"mode": "merge",
"providers": {
"minimax": {
"baseUrl": "https://api.minimax.io/anthropic",
"apiKey": "${MINIMAX_API_KEY}",
"api": "anthropic-messages",
"models": [
{
"id": "MiniMax-M2.1",
"name": "MiniMax M2.1",
"reasoning": false,
"input": ["text"],
"cost": { "input": 15, "output": 60, "cacheRead": 2, "cacheWrite": 10 },
"contextWindow": 200000,
"maxTokens": 8192
}
]
}
}
}
}Step 4: Install and Start the Gateway
pnpm openclaw gateway install
pnpm openclaw gateway startCheck status:
pnpm openclaw gateway status
# You should see Runtime: running and RPC probe: okStep 5: Open WebChat
Open in your browser:
http://127.0.0.1:18789/
Type your first message, for example:
"Hello! Write me a Python bubble sort implementation"
Verify the Model
pnpm openclaw models list
# You should see minimax/MiniMax-M2.1 defaultFAQ
Does OpenClaw support Windows?
OpenClaw supports macOS and Linux. Windows users need to install WSL2 (Windows Subsystem for Linux) and follow the same steps inside the WSL2 environment. Refer to Microsoft's official documentation for WSL2 installation instructions.
Besides MiniMax, what other AI models does OpenClaw support?
OpenClaw supports multiple mainstream model providers, including MiniMax (M2.1, M2.5, VL-01), Anthropic (Claude Sonnet, Opus), OpenAI (GPT-4o), and more. See Lesson 05 for multi-model configuration.
What should I do if the browser can't connect after the gateway starts?
First confirm the port isn't occupied: lsof -i :18789. If there's a port conflict, change the gateway.port field in openclaw.json and restart. If it's a firewall issue, make sure localhost access isn't blocked.
How do I fix pnpm install errors?
The most common cause is an unsupported Node.js version (requires 22+). Run node -v to check your version. We recommend using nvm: nvm install 22 && nvm use 22, then run pnpm install again.
The AI isn't responding after I send a message — what do I do?
Run pnpm openclaw gateway status to check that the gateway is running (you should see Runtime: running). Then run pnpm openclaw models list to confirm the model is loaded correctly. If the model list is empty, check that your API Key is configured correctly.