OpenClaw Gateway Setup: Configure the Maton Gateway Router (2026)

Quick Answer: The Maton Gateway is OpenClaw's routing layer that connects your AI agent to external messaging channels like Telegram, WhatsApp, and email. If you see the "gateway not configured" error, it means the gateway service is not running or your channel credentials are missing.

This guide walks you through installing the gateway, configuring channel credentials, fixing the most common errors, and connecting each messaging platform.

What Does the Maton Gateway Do?

Routes Messages Between Channels

The gateway receives incoming messages from Telegram, WhatsApp, Discord, and email, then routes them to your OpenClaw agent. Responses are sent back through the same channel automatically.

Manages Authentication Tokens

Each messaging platform requires its own API credentials. The gateway stores and manages these tokens securely, handling token refresh and re-authentication when needed.

Handles Rate Limiting and Queuing

Messaging platforms enforce rate limits on API calls. The gateway automatically queues outgoing messages and respects each platform's rate limits to prevent your agent from being throttled or banned.

How to Install the Maton Gateway

Three steps to get the gateway running. You can install it as an OpenClaw skill or run it as a Docker container.

Step 1: Install the Gateway

Run: openclaw skills add @openclaw/skill-gateway. This installs the gateway as a skill within your OpenClaw instance. Alternatively, you can pull the Docker image for containerized deployments.

Step 2: Configure Channel Credentials

Edit the gateway.json configuration file and add your API keys for each channel. For Telegram, add your BotFather token. For email, add SMTP and IMAP credentials. For WhatsApp, add your Business API key. For Discord, add your bot token.

Step 3: Start the Gateway

Run: openclaw gateway start. The gateway will start listening on port 3100 (default) and begin accepting connections from your configured channels. You should see a confirmation message for each successfully connected channel.

Fixing the "Gateway Not Configured" Error

Troubleshooting Checklist

Gateway service not running

Run openclaw gateway start to launch the gateway. Verify it is running with openclaw gateway status. If it crashed, check the logs with openclaw gateway logs for error details.

Missing API credentials

Open gateway.json and verify that all required credentials are present for your configured channels. Each channel needs its own authentication token or API key. Empty or placeholder values will cause this error.

Port conflict (default 3100)

Another service may be using port 3100. Check with lsof -i :3100 on macOS/Linux or netstat -ano on Windows. Change the gateway port in gateway.json if needed, or stop the conflicting service.

Firewall blocking connections

Your system firewall or network firewall may be blocking the gateway port. Allow incoming connections on port 3100 (or your custom port) in your firewall settings. On Linux, use ufw allow 3100. On macOS, check System Settings > Network > Firewall.

Channel Configuration Guide

Telegram

Create a bot through BotFather on Telegram and copy the bot token. Add the token to gateway.json under the telegram channel configuration. Set your bot's username and configure which conversations the agent should respond to.

Email

Add your SMTP server credentials for sending emails and IMAP credentials for receiving them. The gateway supports Gmail, Outlook, and custom SMTP servers. For Gmail, you will need to generate an app-specific password in your Google account settings.

WhatsApp

Connect through the WhatsApp Business API. You will need a WhatsApp Business account and an approved API key. Configure the phone number ID and access token in gateway.json. The gateway handles webhook registration automatically.

Discord

Create a Discord application and bot in the Discord Developer Portal. Copy the bot token and add it to gateway.json. Configure which servers and channels the bot should monitor. The gateway uses the Discord Gateway API for real-time message handling.

Advanced: Running the Gateway in Docker

Docker is recommended for production deployments. It handles process management, automatic restarts, and keeps the gateway isolated from other services on your system.

Docker Compose Setup

Create a docker-compose.yml file that defines the gateway service. Map port 3100, mount your gateway.json as a volume, and set the restart policy to "always" so the gateway recovers from crashes automatically.

Network Configuration

If OpenClaw is running outside the Docker container, make sure the gateway port is exposed to the host network. Use the ports directive in docker-compose.yml to map container port 3100 to host port 3100. For OpenClaw running in a separate container, use a shared Docker network.

Environment Variables

Instead of mounting gateway.json, you can pass channel credentials as environment variables. This is more secure for production deployments and works well with secrets management tools like Docker Secrets or HashiCorp Vault.

Frequently Asked Questions

Stop Wasting 40-60% of Your AI Budget

Download the free '6 Token Drains' guide — identify the hidden patterns burning through your tokens and get copy-paste fixes for each one.

Read the Free Guide
See what we've built for real businesses →

Get Your Gateway Running in Minutes

Every week we send one automation that saves 10+ hours of manual work — the same playbooks our clients use to run their businesses on autopilot. Miss a week, miss the edge.

Save 10+ hours/week Cut AI costs by 97% Deploy in under 20 min

Get the Automation Playbook (Free)

One deploy-ready automation every week. Same strategies our clients pay thousands for. 400+ business owners already inside.

Need it done for you?

Book a Free Strategy Call See what we've built for real businesses →