Skip to main content

Configuration Reference

OpenClaw is configured via ~/.openclaw/config.yml. This page documents every available setting.

Full Example

~/.openclaw/config.yml
# LLM Configuration
brain:
provider: "anthropic" # anthropic, openai, xai, local
model: "claude-opus-4-6"
api_key: "${ANTHROPIC_API_KEY}"
temperature: 0.7
max_tokens: 4096
fallback:
provider: "openai"
model: "gpt-4o"
heartbeat_override:
provider: "anthropic"
model: "claude-haiku-4-5-20251001"

# Gateway Configuration
gateway:
host: "127.0.0.1"
port: 18789
max_connections: 10
log_level: "info"
pid_file: "~/.openclaw/gateway.pid"

# Execution Environment
hands:
shell:
enabled: true
timeout: 30000
blocked_commands: []
browser:
enabled: true
headless: true
timeout: 60000
allowed_domains: []
filesystem:
writable_paths: []
blocked_paths:
- "~/.ssh"
- "~/.gnupg"
sandbox:
enabled: false
type: "docker"

# Heartbeat
heartbeat:
enabled: true
interval: 1800
quiet_hours:
start: "23:00"
end: "07:00"
timezone: "America/Los_Angeles"

# Memory
memory:
enabled: true
path: "~/.openclaw/memory"
max_context_tokens: 2000
auto_save: true

# Skills
skills:
path: "~/.openclaw/skills"
allow_install: true
allow_clawhub: true
auto_install_deps: false

# Channels (configured individually)
channels: {}

# Logging
logging:
level: "info"
path: "~/.openclaw/logs"
max_size: "10m"
max_files: 5
audit:
enabled: false

Section Reference

brain

KeyTypeDefaultDescription
providerstring"anthropic"LLM provider
modelstring"claude-opus-4-6"Model identifier
api_keystringAPI key (supports ${ENV_VAR} syntax)
temperaturefloat0.7Response randomness (0.0–1.0)
max_tokensint4096Max response tokens
fallbackobjectFallback provider config
heartbeat_overrideobjectOverride model for heartbeat only

gateway

KeyTypeDefaultDescription
hoststring"127.0.0.1"Bind address
portint18789WebSocket port
max_connectionsint10Max concurrent connections
log_levelstring"info"Log verbosity

hands

See sub-sections: shell, browser, filesystem, sandbox.

heartbeat

KeyTypeDefaultDescription
enabledbooltrueEnable heartbeat
intervalint1800Seconds between heartbeats
quiet_hours.startstringQuiet hours start (HH:MM)
quiet_hours.endstringQuiet hours end (HH:MM)
quiet_hours.timezonestring"UTC"Timezone for quiet hours

memory

KeyTypeDefaultDescription
enabledbooltrueEnable persistent memory
pathstring"~/.openclaw/memory"Memory directory
max_context_tokensint2000Max tokens loaded per conversation
auto_savebooltrueSave after each conversation

Environment Variable Substitution

Any config value can reference environment variables:

brain:
api_key: "${ANTHROPIC_API_KEY}"

See Also