OpenClaw Config Edit: Complete Setup & Configuration Guide (2026)
Master openclaw config edit commands for WhatsApp, Discord, Telegram, Ollama, and more. Step-by-step guide to configure channels, models, providers, and fix common OpenClaw configuration errors.
TL;DR
Quick reference for the most common OpenClaw config commands:
# Open the config editor
openclaw config edit
# Set a specific value
openclaw config set channels.whatsapp.enabled true
openclaw config set model.provider openai
openclaw config set model.name gpt-4o
# View current config
openclaw config show
# Validate and fix config issues
openclaw doctor
openclaw doctor --fix
# Reset to defaults
openclaw config reset
What Is OpenClaw?
OpenClaw is an open-source AI assistant framework that connects large language models to messaging channels like WhatsApp, Discord, Telegram, and Slack. It supports multiple model providers — OpenAI, Anthropic, Ollama (local models), Google, and more — and can be extended with custom skills and plugins.
The core of OpenClaw is its configuration system. Almost everything — which channels are active, which model to use, which skills are loaded — is controlled through config files. Mastering openclaw config edit is the key to getting OpenClaw running the way you want.
openclaw config edit: The Basics
Opening the Config Editor
The primary command to configure OpenClaw is:
openclaw config edit
This opens your configuration file in your default terminal editor (usually nano, vim, or whatever $EDITOR is set to). The config file is typically located at ~/.openclaw/config.yaml or ~/.config/openclaw/config.yaml depending on your installation.
Config File Structure
The OpenClaw config file is YAML-formatted and organized into sections:
# Model configuration
model:
provider: openai # openai, anthropic, ollama, google
name: gpt-4o # model identifier string
temperature: 0.7
max_tokens: 4096
# Channel configuration
channels:
whatsapp:
enabled: false
phone_number_id: ""
access_token: ""
discord:
enabled: false
bot_token: ""
telegram:
enabled: false
bot_token: ""
slack:
enabled: false
bot_token: ""
app_token: ""
# Skills and plugins
skills:
- web_search
- calculator
- weather
# Speech-to-text
stt:
provider: whisper
model: whisper-1
# System prompt
system_prompt: "You are a helpful assistant."
Setting Individual Values
Instead of editing the full file, you can set individual config values from the command line:
openclaw config set model.provider anthropic
openclaw config set model.name claude-sonnet-4-6
openclaw config set model.temperature 0.5
This is useful for scripting or quick changes without opening an editor.
Be first to build with AI
Y Build is the AI-era operating system for startups. Join the waitlist and get early access.
Setting Up Channels
WhatsApp integration requires a Meta Business account and WhatsApp Business API access.
# Enable WhatsApp channel
openclaw config set channels.whatsapp.enabled true
openclaw config set channels.whatsapp.phone_number_id "YOUR_PHONE_NUMBER_ID"
openclaw config set channels.whatsapp.access_token "YOUR_ACCESS_TOKEN"
openclaw config set channels.whatsapp.verify_token "YOUR_VERIFY_TOKEN"
# Set the webhook URL
openclaw config set channels.whatsapp.webhook_url "https://your-domain.com/webhook/whatsapp"
Discord
Discord setup is simpler — you just need a bot token from the Discord Developer Portal.
openclaw config set channels.discord.enabled true
openclaw config set channels.discord.bot_token "YOUR_DISCORD_BOT_TOKEN"
Telegram
Telegram requires a bot token from @BotFather:
openclaw config set channels.telegram.enabled true
openclaw config set channels.telegram.bot_token "YOUR_TELEGRAM_BOT_TOKEN"
Telegram supports both polling and webhook modes. Polling is easier for development (no public URL needed):
openclaw config set channels.telegram.mode polling
For production, use webhook mode:
openclaw config set channels.telegram.mode webhook
openclaw config set channels.telegram.webhook_url "https://your-domain.com/webhook/telegram"
Slack
Slack integration uses Socket Mode (recommended) or Events API:
openclaw config set channels.slack.enabled true
openclaw config set channels.slack.bot_token "xoxb-YOUR-BOT-TOKEN"
openclaw config set channels.slack.app_token "xapp-YOUR-APP-TOKEN"
Socket Mode is recommended because it doesn't require a public URL.
Configuring Model Providers
OpenAI
openclaw config set model.provider openai
openclaw config set model.name gpt-4o
Set your API key as an environment variable (don't put it in the config file):
export OPENAI_API_KEY="sk-..."
Anthropic (Claude)
openclaw config set model.provider anthropic
openclaw config set model.name claude-sonnet-4-6
export ANTHROPIC_API_KEY="sk-ant-..."
Ollama (Local Models)
This is where OpenClaw shines for privacy-conscious users. Ollama lets you run models locally with no API keys or data leaving your machine.
# Install Ollama first
# https://ollama.ai
# Pull a model
ollama pull llama3.3
# Configure OpenClaw to use Ollama
openclaw config set model.provider ollama
openclaw config set model.name llama3.3
openclaw config set model.base_url "http://localhost:11434"
ollama serve) and the base URL matches. The default Ollama port is 11434.
Google (Gemini)
openclaw config set model.provider google
openclaw config set model.name gemini-2.5-pro
export GOOGLE_API_KEY="..."
xAI (Grok)
openclaw config set model.provider openai # xAI uses OpenAI-compatible API
openclaw config set model.name grok-4.1
openclaw config set model.base_url "https://api.x.ai/v1"
export OPENAI_API_KEY="xai-..." # Use xAI key with OpenAI provider
Common Config Errors and Fixes
Error: "Unknown config key"
Error: Unknown config key 'chanels.whatsapp.enabled'
This usually means a typo in the config key. Check your spelling. Common mistakes:
chanels→channelsprovidr→providertelgram→telegram
Run
openclaw config show to see all valid keys.
Error: "Channel auto-enabled without credentials"
Some OpenClaw versions auto-enable channels when you set credentials, even if you haven't explicitly enabled them. This can cause startup failures if credentials are incomplete.
Fix:# Explicitly disable channels you're not using
openclaw config set channels.whatsapp.enabled false
openclaw config set channels.discord.enabled false
openclaw config set channels.slack.enabled false
Error: "Model provider not configured"
Error: Model provider 'anthropic' requires ANTHROPIC_API_KEY
You need to set the corresponding environment variable. OpenClaw intentionally does not store API keys in the config file for security reasons.
Fix: Add the API key to your shell profile (~/.bashrc, ~/.zshrc) or use a .env file:
echo 'export ANTHROPIC_API_KEY="sk-ant-..."' >> ~/.zshrc
source ~/.zshrc
Using openclaw doctor
The openclaw doctor command validates your entire configuration and reports issues:
openclaw doctor
Output example:
Checking configuration...
✓ Config file found
✓ Model provider configured
✗ WhatsApp: enabled but missing access_token
✗ Discord: bot token invalid format
✓ Telegram: configured correctly
✓ Ollama: connection successful
2 issues found. Run 'openclaw doctor --fix' to attempt auto-fix.
The --fix flag attempts to resolve issues automatically:
openclaw doctor --fix
This will disable channels with missing credentials, correct known formatting issues, and suggest manual fixes for problems it can't resolve automatically.
Advanced Configuration
Custom Skills
OpenClaw supports custom skills (plugins) that extend the assistant's capabilities:
skills:
- web_search
- calculator
- weather
- custom_skill:
path: ./my-skills/custom_tool.py
config:
api_key_env: CUSTOM_API_KEY
Or via command line:
openclaw skills add web_search
openclaw skills add ./my-skills/custom_tool.py
openclaw skills list
openclaw skills remove calculator
Speech-to-Text (STT) Configuration
For voice message support on WhatsApp and Telegram:
stt:
provider: whisper # whisper, deepgram, google
model: whisper-1
language: auto # auto-detect or specify "en", "es", etc.
openclaw config set stt.provider whisper
openclaw config set stt.model whisper-1
Tuya Smart Home Integration
OpenClaw can control Tuya-compatible smart home devices:
tuya:
enabled: true
access_id: "YOUR_TUYA_ACCESS_ID"
access_key: "YOUR_TUYA_ACCESS_KEY"
endpoint: "https://openapi.tuyaus.com"
This lets you control lights, switches, thermostats, and other Tuya devices through natural language commands in any connected channel.
Multiple Model Configurations
You can define model presets and switch between them:
models:
default:
provider: openai
name: gpt-4o
fast:
provider: ollama
name: llama3.3
reasoning:
provider: anthropic
name: claude-opus-4-6
openclaw config set model.active default
# or switch at runtime
openclaw --model fast
Frequently Asked Questions
Where is the OpenClaw config file stored?
The default location is ~/.openclaw/config.yaml. On some installations it may be at ~/.config/openclaw/config.yaml. Run openclaw config show --path to see the exact location.
Can I use OpenClaw without any cloud API?
Yes. Configure Ollama as your model provider and use Telegram in polling mode. This gives you a fully local, private AI assistant with no data leaving your machine.
How do I update OpenClaw?
pip install --upgrade openclaw
# or
npm update -g openclaw
After updating, run openclaw doctor to check for any config format changes.
Can I run multiple channels simultaneously?
Yes. Enable as many channels as you want — OpenClaw handles them concurrently. Each channel shares the same model and skills configuration.
How do I reset my config to defaults?
openclaw config reset
This overwrites your config file with the default template. Back up your existing config first if needed.
Want Something Simpler?
OpenClaw is powerful but requires terminal comfort and manual configuration. If you want to build and ship AI-powered products without managing config files, model providers, and channel integrations yourself:
Y Build handles the full stack — deployment, product videos, AI SEO, and analytics. No config files. No terminal. Just build and ship. Start free →Sources:
Be first to build with AI
Y Build is the AI-era operating system for startups. Join the waitlist and get early access.