Gateway Configuration

Complete guide to configuring and managing your OpenClaw gateway

⚡ Quick Reference

Start Gateway

openclaw gateway start

Status

openclaw gateway status

Config

openclaw config get

Logs

openclaw gateway logs

Configuration File

OpenClaw uses a YAML configuration file located at ~/.openclaw/config.yaml

Basic Configuration

# Server Settings
server:
  host: '0.0.0.0'
  port: 3000

# Default Model
defaultModel: 'gpt-4'

# Logging
logging:
  level: 'info'
  format: 'json'

Performance Tuning

Worker Processes

Use multiple workers to handle concurrent requests:

workers: 4

Request Timeout

Set appropriate timeout values for AI providers:

timeout: 30000 # 30 seconds

Cache Configuration

Enable caching for frequently accessed data:

cache:
  enabled: true
  ttl: 3600  # 1 hour

Production Deployment

Process Manager

Use PM2 or systemd for auto-restart:

pm2 start openclaw-gateway

Reverse Proxy

Use Nginx or Caddy for SSL and load balancing:

server {
  listen 443 ssl;
  server_name your-domain.com;
  location / {
    proxy_pass http://localhost:3000;
  }
}

Monitoring

Set up health checks and monitoring:

curl https://your-domain.com/health