OpenClaw Manual OpenClaw
Deep Configuration

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

Required

OpenClaw supports multiple AI providers. Choose your preferred provider and follow the setup steps.

Current config : Anthropic - API Key

Best for: Standard API access with usage-based billing. Create your API key in the Anthropic Console.

1

Get API Key

Create an API key from the Anthropic Console

2

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"
3

Configuration Structure

After configuration, the relevant settings in openclaw.json:

~/.openclaw/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.

~/.openclaw/openclaw.json
{
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

Anthropic Claude is recommended for the best experience. Supported models: anthropic/claude-opus-4-5, anthropic/claude-sonnet-4-20250514, anthropic/claude-haiku, etc.
Note: Authentication is per-agent. New agents require separate credential configuration.

OpenClaw Gateway Configuration

Required

The gateway is OpenClaw's core service that handles all message routing between AI and chat platforms.

Default Settings

Port
18789
Bind Address
127.0.0.1
Authentication
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 one

Connect OpenClaw to your preferred chat platforms. Each channel has its own setup process.

Current config : WhatsApp
1

WhatsApp Account Management

Login or logout WhatsApp account

Login (generate QR code)

$ openclaw channels login whatsapp

Logout (use when reconnecting)

$ openclaw channels logout whatsapp
2

Scan QR Code

Open WhatsApp on your phone, go to Settings → Linked Devices → Scan the QR code

QR Code

Scan with WhatsApp mobile app

3

Approve Pairing

Your first message will receive a pairing code. Approve it to start chatting.

$ openclaw pairing list whatsapp
$ openclaw pairing approve whatsapp [CODE]
Use a dedicated phone number. VoIP numbers are not recommended as they may be blocked easily.
Credentials are stored in ~/.openclaw/credentials/whatsapp/ directory.

OpenClaw Skills Management

Optional

Skills 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

Web Search

Search the web and summarize results

web-search
Code Interpreter

Execute code in a sandboxed environment

code-interpreter
File Manager

Read, write, and manage files

file-manager
Calendar

Manage calendar events and reminders

calendar

OpenClaw Advanced Configuration

Optional

Power 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.

cron.json
# ~/.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.

Next Steps