How to Connect OpenClaw to Telegram: Full Setup Guide
Telegram is the most popular interface for OpenClaw agents. Once connected, you can chat with your AI agent directly from the Telegram app — on any device, any time — and it responds with full autonomy: browsing the web, drafting emails, managing files, and more.
This guide covers the complete connection process from scratch.
What You'll Need
- An OpenClaw instance already running (see our OpenClaw setup guide if you haven't done this yet)
- A Telegram account
- 5 minutes
Step 1: Create a Telegram Bot via @BotFather
Every Telegram bot starts with @BotFather — Telegram's official bot creation tool.
- Open Telegram and search for @BotFather
- Send the command
/newbot - Choose a display name (e.g. "My Assistant")
- Choose a username — must end in
bot(e.g.myassistant_bot) - BotFather will reply with your bot token:
7123456789:AAFxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Save this token. You'll need it in the next step.
Step 2: Configure OpenClaw's Telegram Channel
Connect your token to OpenClaw via these three commands, in this exact order:
openclaw config set channels.telegram.botToken "YOUR_TOKEN_HERE"
openclaw config set channels.telegram.allowFrom '["*"]'
openclaw config set channels.telegram.dmPolicy open
Order matters. Setting dmPolicy open before allowFrom causes a validation error — OpenClaw checks that allowFrom is configured before it accepts an open DM policy.
Step 3: Restart the Gateway
For the new channel config to take effect, restart the OpenClaw gateway:
openclaw gateway restart
Wait about 5 seconds, then verify it's running:
OPENCLAW_GATEWAY_TOKEN=your_token openclaw channels status
You should see telegram: running.
Step 4: Send Your First Message
Open Telegram, find your bot by username, and send /start.
Your OpenClaw agent should respond within a few seconds. Try a simple task first:
"What's the weather in London today?"
If you get a response, your Telegram integration is working.
Common Errors and Fixes
"Unknown channel: telegram"
You're running a beta version of OpenClaw (v2026.2.22+) that broke the channels add command. The fix:
npm install -g openclaw@2026.2.17
The config set approach in Step 2 works on all versions including the broken beta.
Bot doesn't respond
Check the gateway is actually running (not just showing as active):
OPENCLAW_GATEWAY_TOKEN=your_token openclaw channels status
If this shows "Gateway not reachable" but systemctl --user is-active openclaw-gateway shows "active", your gateway is in a zombie state. Fix:
openclaw gateway restart
"pairing required" error
Your OpenClaw instance has device pairing enabled by default. To allow anyone to chat:
openclaw config set channels.telegram.allowFrom '["*"]'
openclaw config set channels.telegram.dmPolicy open
Make sure allowFrom is set first (as shown above).
Agent sends empty replies
This is session bloat — your agent's conversation history has grown so large it generates empty responses. Fix it by clearing the session:
echo '[]' > ~/.openclaw/agents/main/sessions/$(ls ~/.openclaw/agents/main/sessions/ | grep .jsonl | head -1)
openclaw gateway restart
Keeping Your Agent Running 24/7
By default, if your server restarts, your OpenClaw gateway doesn't auto-start. To fix this:
loginctl enable-linger root
systemctl --user enable openclaw-gateway
You should also install a watchdog cron job — OpenClaw's gateway can crash silently while appearing "active" to systemd. Without a watchdog, your agent goes dark until you manually notice and restart it.
The Alternative: No Setup Required
If you want the Telegram integration without any of the above, SimplifyClaw connects your OpenClaw agent to Telegram automatically during the 60-second setup process.
You paste your bot token once — into a simple web form — and SimplifyClaw handles the config, the restart, the watchdog, and the gateway. Your agent is live on Telegram before you've finished your coffee.
Skip the setup entirely
SimplifyClaw deploys your OpenClaw agent in 60 seconds. No server, no terminal, no config files.
Deploy your agent →$39/month · 7-day money-back guarantee