Clawdbot Gateway Configuration
Complete guide to configuring Clawdbot AI assistant gateway. Learn about configuration options, environment variables, and advanced settings.
Clawdbot Gateway Configuration Overview
The Clawdbot gateway is configured through ~/.clawdbot/clawdbot.json. This guide covers all configuration options for customizing your gateway.
Configuration File
Location
~/.clawdbot/clawdbot.jsonBasic Structure
{
"gateway": {
"port": 3010,
"host": "localhost"
},
"providers": {},
"agents": {},
"tools": {},
"sessions": {}
}Gateway Settings
Core Settings
{
"gateway": {
"port": 3010,
"host": "localhost",
"logLevel": "info",
"maxConnections": 100
}
}Options
| Option | Default | Description |
|---|---|---|
port | 3010 | WebSocket server port |
host | localhost | Bind address |
logLevel | info | Log verbosity |
maxConnections | 100 | Max concurrent connections |
Provider Configuration
{
"providers": {
"whatsapp": {
"enabled": true,
"authStrategy": "qr",
"dmPolicy": "main"
}
}
}Telegram
{
"providers": {
"telegram": {
"enabled": true,
"token": "${TELEGRAM_BOT_TOKEN}"
}
}
}Discord
{
"providers": {
"discord": {
"enabled": true,
"token": "${DISCORD_BOT_TOKEN}",
"intents": ["GUILDS", "GUILD_MESSAGES", "DIRECT_MESSAGES"]
}
}
}Agent Configuration
Single Agent
{
"agents": {
"main": {
"workspace": "~/.clawdbot/workspace",
"model": "claude-3-sonnet"
}
}
}Multi-Agent
{
"agents": {
"main": {
"workspace": "~/.clawdbot/agents/main/workspace"
},
"work": {
"workspace": "~/.clawdbot/agents/work/workspace"
}
}
}Session Configuration
Session Policy
{
"sessions": {
"dmScope": "main",
"resetTime": "04:00",
"idleMinutes": 60,
"maxHistory": 100
}
}Session Options
| Option | Default | Description |
|---|---|---|
dmScope | main | DM session scope |
resetTime | 04:00 | Daily reset time |
idleMinutes | null | Idle timeout |
maxHistory | 100 | Max messages in history |
Tool Configuration
Tool Policy
{
"tools": {
"profile": "full",
"allow": ["*"],
"deny": ["browser"]
}
}Provider-Specific Tools
{
"tools": {
"byProvider": {
"whatsapp": {
"deny": ["exec"]
}
}
}
}Environment Variables
Using Env Vars
{
"providers": {
"telegram": {
"token": "${TELEGRAM_BOT_TOKEN}"
}
}
}Common Variables
| Variable | Description |
|---|---|
CLAWDBOT_CONFIG | Config file path |
CLAWDBOT_LOG_LEVEL | Log level override |
CLAWDBOT_PORT | Port override |
CLI Configuration
Override Config
clawdbot gateway start --port 3011 --log-level debugConfig Commands
# View current config
clawdbot config get
# Set config value
clawdbot config set gateway.port 3011
# Reset to defaults
clawdbot config resetAdvanced Settings
Performance
{
"gateway": {
"messageBuffer": 1000,
"processTimeout": 30000,
"streamChunkSize": 50
}
}Limits
{
"limits": {
"maxMessageLength": 10000,
"maxConcurrentRequests": 10,
"rateLimitPerMinute": 60
}
}Next Steps
- Clawdbot Security - Security configuration
- Clawdbot Troubleshooting - Debug issues
- Clawdbot Gateway - Gateway overview