OpenClaw Configuration Reference

OpenClaw Configuration Reference

This guide covers OpenClaw gateway configuration settings for production deployments. The examples shown use placeholder values — substitute your own credentials and endpoints.


Gateway Configuration

Core gateway settings control port binding, authentication mode, and allowed origins:

{
  "port": 18789,
  "mode": "local",
  "bind": "lan",
  "controlUi": {
    "allowedOrigins": [
      "http://localhost:18789",
      "http://127.0.0.1:18789"
    ]
  },
  "auth": {
    "mode": "token",
    "token": "[YOUR_GATEWAY_TOKEN]"
  }
}

Agent Defaults

Configure default model providers and behavior settings for your agents:

{
  "defaults": {
    "model": {
      "primary": "[PRIMARY_MODEL]",
      "fallbacks": ["[FALLBACK_MODEL_1]", "[FALLBACK_MODEL_2]"]
    }
  }
}

Channel Configuration

Each messaging channel requires its own API token and endpoint configuration. Refer to the official OpenClaw documentation for your specific platform setup.


Configuration examples generalized. Do not share your actual gateway tokens or API keys publicly.

Want to run OpenClaw on your own VPS? Vultr offers $100 in credit for new users — deploy an Ubuntu or Debian server in 60 seconds. Get started with Vultr →

Affiliate Disclosure: This site contains affiliate links. If you purchase through our links, we may earn a commission at no extra cost to you.

Prerequisites

Before starting, ensure you have: Ubuntu 22.04 LTS installed, SSH access with sudo privileges, and a static IP configured on your network.

Step-by-Step Configuration

1. Initial System Update: Run apt update && apt upgrade -y to patch the base system.

2. Firewall Setup: Configure UFW with ufw allow 22/tcp && ufw allow 80/tcp && ufw allow 443/tcp

3. Static IP Configuration: Edit /etc/netplan/01-netcfg.yaml and set your desired IP address, gateway, and DNS servers.

4. OpenClaw Installation: Follow the official installation guide for your Ubuntu version. Restart the service and verify with systemctl status openclaw.

Troubleshooting

If you encounter connection issues, check the OpenClaw logs at /var/log/openclaw/error.log. Common fixes include ensuring port 8181 is open and verifying the config file syntax with openclaw --validate.

Related: OpenClaw Gateway: Configuration Reference

Related: How to Backup and Restore Your OpenClaw Configuration

Related: OpenClaw Gateway: Configuration Reference

Related: How to Backup and Restore Your OpenClaw Configuration

Related: OpenClaw Gateway: Configuration Reference

Related: How to Backup and Restore Your OpenClaw Configuration

Related: OpenClaw Gateway: Configuration Reference

Related: How to Backup and Restore Your OpenClaw Configuration

Related: OpenClaw Gateway: Configuration Reference

Related: How to Backup and Restore Your OpenClaw Configuration