加入我们的 Telegram 社群 (clawdbotCN) 学习分享和了解更多 →
en
Configuration
Configuration

Configuration Management

Clawdbot reads configuration from ~/.clawdbot/clawdbot.json in JSON5 format.

Configuration Validation

The system performs strict schema validation. If config is invalid, gateway refuses to start:

clawdbot doctor

Core Configuration

{
  // Workspace directory
  workspace: "~/clawd",
 
  // Gateway settings
  gateway: {
    bind: "127.0.0.1:18789",
    token: "your-secure-token"
  },
 
  // Channel configuration
  channels: {
    whatsapp: { enabled: true },
    telegram: { enabled: true }
  },
 
  // Agent configuration
  agents: {
    default: {
      workspace: "~/clawd",
      sandbox: "host"
    }
  }
}

File Includes

Use $include directive to split configuration:

{
  $include: ["./channels.json", "./agents.json"]
}

Environment Variables

Sensitive information can be set via environment variables:

export CLAWDBOT_GATEWAY_TOKEN="..."
export TELEGRAM_BOT_TOKEN="..."

Next Steps