OpenClaw Installation and Configuration Guide
This guide explains how to install OpenClaw and configure it to use CC Club’s API proxy.
About this document
This document focuses on helping you configure the CC Club baseUrl and apiKey in OpenClaw, so you can access Claude without restrictions. For other OpenClaw features and detailed documentation, refer to the official documentation.
System Requirements
| Item | Minimum | Recommended |
|---|---|---|
| Node.js | ≥ 22.12.0 | Latest LTS |
| Memory | 1GB | 4GB+ |
| Operating system | macOS 12+ / Ubuntu 20.04+ / Windows 10+ | macOS 14+ |
1. Install OpenClaw
macOS / Linux / WSL2:
curl -fsSL https://openclaw.ai/install.sh | bashWindows (PowerShell):
iwr -useb https://openclaw.ai/install.ps1 | iexThe install script automatically detects your environment, installs the CLI, and runs the onboarding wizard. To skip the wizard and only install the CLI:
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --no-onboard2. Run the Onboarding Wizard
After installation, run the onboarding to complete the initial configuration:
openclaw onboard --install-daemonThe wizard will guide you through:
- Selecting a model provider (choose Anthropic)
- Entering your API key
- Setting up the Gateway (port, authentication method)
- Configuring messaging channels (Telegram / WhatsApp / Discord, etc.)
- Installing the background service (launchd / systemd / Windows scheduled task)
3. Configure the CC Club API Proxy
Important: Using CC Club requires manually configuring two things: the API key and a custom baseUrl.
Configuration File Locations
OpenClaw’s configuration directory:
~/.openclaw/
├── openclaw.json # Main configuration file
├── .env # Environment variables (API keys and other sensitive info)
└── agents/main/agent/
└── auth-profiles.json # API key credentialsStep 1: Write Your API Key
Edit ~/.openclaw/agents/main/agent/auth-profiles.json (Windows: C:\Users\<username>\.openclaw\agents\main\agent\auth-profiles.json):
{
"version": 1,
"profiles": {
"anthropic:default": {
"type": "api_key",
"provider": "anthropic",
"key": "your-CC-Club-API-Key"
}
},
"lastGood": {
"anthropic": "anthropic:default"
}
}You can also configure this via the command line:
openclaw onboard --auth-choice apiKey --anthropic-api-key your-CC-Club-API-KeyStep 2: Configure the Custom baseUrl
Edit ~/.openclaw/openclaw.json and add a models section:
{
"models": {
"mode": "merge",
"providers": {
"anthropic": {
"baseUrl": "https://claude-code.club/api",
"models": []
}
}
}
}"models": [] is required. Leaving it empty means the provider’s default model list will be used. Omitting this field will cause a configuration validation error:
Invalid config: models.providers.anthropic.models: expected array, received undefinedCC Club API Nodes
Choose the best node based on your network conditions:
| Address | Description |
|---|---|
https://claude-code.club/api | Default address (fastest when direct connection latency < 100ms) |
https://jp.claude-code.club/api | Japan node (Alibaba Cloud, optimized for China) |
https://hk.claude-code.club/api | Hong Kong node (Alibaba Cloud, optimized for China) |
Enter one of the above addresses in the models.providers.anthropic.baseUrl field of openclaw.json.
Step 3: Restart the Gateway
launchctl stop ai.openclaw.gateway
launchctl start ai.openclaw.gatewayOr:
kill $(lsof -ti :18789) && openclaw gateway4. Complete Configuration Example
Here is a complete openclaw.json example using CC Club:
{
"meta": {
"lastTouchedVersion": "2026.2.19"
},
"agents": {
"defaults": {
"model": {
"primary": "anthropic/claude-sonnet-4-6"
},
"workspace": "~/.openclaw/workspace",
"compaction": {
"mode": "safeguard"
}
}
},
"models": {
"mode": "merge",
"providers": {
"anthropic": {
"baseUrl": "https://claude-code.club/api",
"models": []
}
}
},
"commands": {
"native": "auto",
"nativeSkills": "auto"
},
"gateway": {
"mode": "local",
"auth": {
"mode": "token",
"token": "your-gateway-token"
},
"port": 18789
}
}Key configuration notes:
| Config key | Description | Example value |
|---|---|---|
agents.defaults.model.primary | Default model to use — requires provider prefix | anthropic/claude-sonnet-4-6 |
models.providers.anthropic.baseUrl | CC Club API address | https://claude-code.club/api |
models.providers.anthropic.models | Model list — leave empty to use defaults | [] |
gateway.auth.token | Dashboard access token | Generate with openssl rand -hex 32 |
gateway.port | Gateway listening port | 18789 |
5. Start the Gateway
# Foreground (for debugging)
openclaw gateway --port 18789 --verbose
# Background service (recommended)
openclaw onboard --install-daemonWhen the Gateway starts successfully, it will display:
[gateway] listening on ws://127.0.0.1:18789 (PID xxxxx)Service Management
# Check status
launchctl list | grep openclaw
# Stop / Start
launchctl stop ai.openclaw.gateway
launchctl start ai.openclaw.gateway6. Access the Dashboard
# Open automatically (recommended)
openclaw dashboard
# Or navigate manually
# http://127.0.0.1:18789/#token=your-gateway-tokenDashboard features:
| Feature | Description |
|---|---|
| Chat | Chat directly with AI |
| Agents | Manage agent sessions and history |
| Channels | View channel status |
| Models | View available models |
| Settings | Configure tokens, themes, etc. |
7. Configure Messaging Channels
Telegram
Create a Bot
Open Telegram, find @BotFather, send /newbot, set a name and username as prompted, and obtain the Bot Token (format: 123456789:ABCDEF...).
Configure the Channel
Add the following to ~/.openclaw/openclaw.json:
{
"channels": {
"telegram": {
"enabled": true,
"dmPolicy": "open",
"allowFrom": ["*"],
"groupPolicy": "allowlist",
"streamMode": "partial"
}
},
"plugins": {
"entries": {
"telegram": { "enabled": true }
}
}
}Set the Bot Token
# ~/.openclaw/.env
TELEGRAM_BOT_TOKEN=123456789:ABCDEF...Pair with Telegram
Send a message to your Bot in Telegram. The Bot will return a pairing code, which you then approve on the server:
openclaw pairing approve telegram XXXXXXXXDiscord / Slack / WhatsApp
WhatsApp requires scanning a QR code to log in:
openclaw channels login --channel whatsappFor Discord and Slack, configure the Bot Token in .env — see the official documentation for details.
8. Complete Ubuntu Server Setup
Full steps for deploying OpenClaw on a remote Ubuntu server:
Install Node.js (via nvm)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
\. "$HOME/.nvm/nvm.sh"
nvm install 24Install OpenClaw
npm install -g openclaw@latestConfigure CC Club API Key
Edit ~/.openclaw/agents/main/agent/auth-profiles.json:
{
"version": 1,
"profiles": {
"anthropic:default": {
"type": "api_key",
"provider": "anthropic",
"key": "cr_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
},
"lastGood": {
"anthropic": "anthropic:default"
}
}Configure the Custom baseUrl
Edit ~/.openclaw/openclaw.json:
{
"models": {
"mode": "merge",
"providers": {
"anthropic": {
"baseUrl": "https://claude-code.club/api",
"models": []
}
}
}
}Run the Onboarding Wizard
openclaw onboard --install-daemonSelect the Anthropic model in the wizard and configure your Telegram Bot Token.
Pair with Telegram
openclaw pairing approve telegram XXXXXXXX9. Troubleshooting
API Key Error: No API key found for provider "anthropic"
Checklist:
- Confirm the file exists:
~/.openclaw/agents/main/agent/auth-profiles.json - Confirm the format is correct (refer to Section 3)
- Restart the Gateway
Configuration File Validation Failure
Invalid config: models.providers.anthropic.models: expected array, received undefinedFix: Add "models": [] under models.providers.anthropic in openclaw.json.
Gateway Port Already in Use
Port 18789 is already in use. pid xxxxxFix (Linux/macOS):
kill $(lsof -ti :18789)Fix (Windows):
Stop-Process -Id <pid> -ForceTUI shows pairing required or device token mismatch
# Clear old device pairing files
rm -f ~/.openclaw/devices/paired.json \
~/.openclaw/identity/device-auth.json \
~/.openclaw/identity/device.json
# Restart Gateway
systemctl --user restart openclaw-gateway.service
# Verify status
sleep 5 && openclaw gateway statusDashboard shows “unauthorized”
Access with a token-bearing URL:
http://localhost:18789/#token=your-gateway-tokenOr view the current token:
openclaw config get gateway.auth.tokenVerify Proxy Reachability
curl -X POST "https://claude-code.club/api/v1/messages" \
-H "x-api-key: your-API-Key" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model":"claude-sonnet-4-6","max_tokens":64,"messages":[{"role":"user","content":"hi"}]}'Update OpenClaw
# Stable release (recommended)
openclaw update --channel stable
# Or update directly via npm
npm update -g openclawQuick Command Reference
openclaw --version # Show version
openclaw doctor # Diagnose configuration issues
openclaw doctor --repair # Auto-fix configuration
openclaw gateway --verbose # Start Gateway (verbose logging)
openclaw dashboard # Open Dashboard
openclaw status # Show running status
openclaw onboard # Re-run the onboarding wizard
openclaw tui # Open the terminal interactive interface
openclaw logs --follow # Stream logs in real time
openclaw update --channel stable # Update to stable releaseComparison with Claude Code
| Item | Claude Code | OpenClaw |
|---|---|---|
| Purpose | Command-line coding assistant | Self-hosted multi-channel AI gateway |
| Configuration tool | CC Switch / environment variables | Manual JSON editing |
| Configuration file | ~/.claude/settings.json | ~/.openclaw/openclaw.json |
| API key storage | Environment variables | auth-profiles.json |
| Interface | Command line | Web Dashboard |
| Messaging platforms | Terminal | Telegram, WhatsApp, and 20+ more |
References
- Official documentation: https://docs.openclaw.ai/
- GitHub repository: https://github.com/openclaw/openclaw
- Get CC Club API Key
- CC Club Node Configuration
Note: Compared to Claude Code, OpenClaw may consume more quota because it needs to handle more channels and context requests.