OpenClaw Configuration Guide - AI Models & Chat Channels Setup
Already installed OpenClaw? Learn how to configure AI models, gateway settings, chat channels, and more
What do you want to configure in OpenClaw?
Select what you want to configure and jump to the section
OpenClaw Configuration Overview
OpenClaw stores all configuration in the ~/.openclaw directory. Understanding this structure helps you manage and backup your settings.
File Structure
~/.openclaw/openclaw.json
Main configuration file
~/.openclaw/workspace/
Skills, prompts, memories
~/.openclaw/credentials/
OAuth and API credentials
~/.openclaw/agents/
Multi-agent configurations
~/.openclaw/credentials/oauth.json
OAuth tokens (Claude, etc.)
OpenClaw AI Model Configuration
RequiredOpenClaw supports multiple AI providers. Choose your preferred provider and follow the setup steps.
Best for: Standard API access with usage-based billing. Create your API key in the Anthropic Console.
CLI Setup
Run the configuration wizard or use non-interactive mode
Interactive (Recommended)
$ openclaw onboard# choose: Anthropic API key
Non-interactive
$ openclaw onboard --anthropic-api-key "$ANTHROPIC_API_KEY"
Configuration Structure
After configuration, the relevant settings in openclaw.json:
{ env: { ANTHROPIC_API_KEY: "sk-ant-..." }, agents: { defaults: { model: { primary: "anthropic/claude-opus-4-5" } } },}
Prompt Caching (API Only)
OpenClaw won't override Anthropic's default cache TTL unless you set it. Subscription authentication does not honor TTL settings.
{ agents: { defaults: { models: { "anthropic/claude-opus-4-5": { params: { cacheControlTtl: "5m" }, // or "1h" }, }, }, },}
Verify Configuration
$ openclaw models status
Run this command to confirm authentication is working
OpenClaw Gateway Configuration
RequiredThe gateway is OpenClaw's core service that handles all message routing between AI and chat platforms.
Default Settings
18789
127.0.0.1
token / password
Common Commands
Install daemon service (auto-detects macOS/Linux)
$ openclaw gateway install
Check gateway status
$ openclaw gateway status
View live logs
$ openclaw logs --follow
Remote Access
Securely access gateway on remote server via SSH tunnel:
$ ssh -N -L 18789:127.0.0.1:18789 user@host
OpenClaw Chat Channel Configuration
At least oneConnect OpenClaw to your preferred chat platforms. Each channel has its own setup process.
WhatsApp Account Management
Login or logout WhatsApp account
Login (generate QR code)
$ openclaw channels login whatsapp
Logout (use when reconnecting)
$ openclaw channels logout whatsapp
Scan QR Code
Open WhatsApp on your phone, go to Settings → Linked Devices → Scan the QR code
Scan with WhatsApp mobile app
Approve Pairing
Your first message will receive a pairing code. Approve it to start chatting.
$ openclaw pairing list whatsapp
$ openclaw pairing approve whatsapp [CODE]
OpenClaw Skills Management
OptionalSkills extend OpenClaw's capabilities. Install and manage skills to enhance your AI assistant.
List available skills
$ openclaw skills list
Install a skill
$ openclaw skills install
Enable a skill
$ openclaw skills enable
Popular Skills
Search the web and summarize results
web-search
Execute code in a sandboxed environment
code-interpreter
Read, write, and manage files
file-manager
Manage calendar events and reminders
calendar
OpenClaw Advanced Configuration
OptionalPower user features for complex setups and automation.
Multi-Agent Setup
Create separate agents for different contexts (work, personal, etc.). Each agent has its own workspace, sessions, and credentials.
$ openclaw agents add work
$ openclaw agents list
$ openclaw agents switch work
Non-Interactive Mode
Automate OpenClaw setup in scripts or CI/CD pipelines.
$ openclaw onboard --non-interactive \ --mode local \ --auth-choice apiKey \ --anthropic-api-key "$ANTHROPIC_API_KEY" \ --gateway-port 18789 \ --gateway-bind loopback
Scheduled Tasks
Set up automated messages and tasks using cron-style scheduling.
# ~/.openclaw/cron.json{ "jobs": [ { "schedule": "0 9 * * *", "action": "send", "channel": "telegram", "message": "Good morning! Here's your daily briefing..." } ]}
Configuration Complete!
Your OpenClaw is now fully configured. Start chatting with your AI assistant.