OpenClaw Telegram Setup: Streaming, Commands, and Troubleshooting
Telegram is the most popular way to use OpenClaw. It’s fast, works on all devices, and supports features like streaming responses.
This guide covers everything from initial setup to troubleshooting common issues.
Why Telegram?
- Works everywhere - Phone, tablet, desktop, web
- Real-time streaming - See responses as they’re generated
- Rich formatting - Code blocks, bold, lists render properly
- Bot API - Clean integration, no workarounds needed
- Privacy - End-to-end encryption available
Initial Setup
Step 1: Create a Telegram Bot
- Open Telegram and search for
@BotFather - Send
/newbot - Choose a name (e.g., “My OpenClaw”)
- Choose a username (must end in
bot, e.g.,my_openclaw_bot) - Save the API token BotFather gives you
Important: Keep this token secret. Anyone with it can control your bot.
Step 2: Configure OpenClaw
During openclaw onboard or in your config:
channels:
telegram:
enabled: true
token: "YOUR_BOT_TOKEN_HERE"
Step 3: Start Chatting
- Find your bot in Telegram (search for the username you chose)
- Press “Start”
- Send a message
- Your OpenClaw should respond
Enabling Streaming
Streaming shows responses word-by-word as they’re generated. Much better UX than waiting for the full response.
Check If Streaming Is Enabled
Send /status to your bot. Look for:
Streaming: enabled
Enable Streaming
In your OpenClaw config:
channels:
telegram:
enabled: true
token: "YOUR_TOKEN"
streaming: true
Then restart the gateway:
openclaw gateway restart
Streaming Not Working?
Common causes:
- Config not reloaded - Restart the gateway after config changes
- Model doesn’t support streaming - Most do, but check your model settings
- Network issues - Streaming requires stable connection
Useful Commands
Built-in commands you can send to your bot:
| Command | What It Does |
|---|---|
/status | Show bot status and settings |
/clear | Clear conversation history |
/model | Show or change current model |
/help | List available commands |
Common Issues and Fixes
Bot Not Responding
Check 1: Is the gateway running?
openclaw gateway status
Check 2: Is the bot token correct?
- Go to @BotFather
- Send
/mybots - Select your bot
- Check the token matches your config
Check 3: Did you start the bot?
- Open the bot in Telegram
- Press the “Start” button
Check 4: Check the logs
journalctl -u openclaw -n 50
Slow Responses
Cause 1: Model is slow
- Opus is slower than Sonnet
- Sonnet is slower than Haiku
- Consider using a faster model for simple queries
Cause 2: Long conversation history
- Each message includes the full history
- Use
/clearto reset
Cause 3: Server performance
- Check CPU/memory usage
- Upgrade VPS if needed
Messages Cut Off
Telegram has a 4096 character limit per message. OpenClaw should split long messages automatically.
If messages are still cut off:
- Check your OpenClaw version (update if old)
- Report as a bug if persists
”Bot Stopped Working” After a While
Cause: Memory leak or crash
Check if gateway is still running:
openclaw gateway status
Set up auto-restart:
# If using systemd
sudo systemctl enable openclaw
Streaming Shows as Multiple Messages
This is normal for very long responses. Telegram edits messages in place, but there are limits.
For better UX with long responses:
- Ask for shorter summaries first
- Use “elaborate on point 2” follow-ups
Advanced Configuration
Private Bot (Restrict Access)
Only allow specific users:
channels:
telegram:
enabled: true
token: "YOUR_TOKEN"
allowedUsers:
- 123456789 # Your Telegram user ID
- 987654321 # Another allowed user
To find your user ID, send a message to @userinfobot.
Multiple Chats
You can use the same bot in:
- Direct messages
- Groups (add bot to group)
- Channels (as admin)
For groups, you may want to configure:
channels:
telegram:
groupBehavior: "mention" # Only respond when @mentioned
Custom Personality
Set a system prompt for your Telegram bot:
persona:
name: "Jarvis"
prompt: |
You are Jarvis, a helpful AI assistant.
Be concise and professional.
Always end responses with a helpful follow-up question.
Keyboard Shortcuts
Add quick-reply buttons:
channels:
telegram:
keyboard:
- ["📧 Check Email", "📅 Today's Schedule"]
- ["📝 New Note", "🔍 Search"]
Security Considerations
Keep Your Token Secret
- Never share your bot token
- Don’t commit it to git
- Use environment variables:
channels:
telegram:
token: ${TELEGRAM_BOT_TOKEN}
Restrict Access
Unless you want a public bot, always set allowedUsers.
Be Careful with Sensitive Data
Messages go through Telegram’s servers. For highly sensitive data:
- Use Secret Chats (if supported)
- Or use a different channel (local CLI)
Troubleshooting Checklist
[ ] Gateway is running (openclaw gateway status)
[ ] Bot token is correct (check @BotFather)
[ ] Bot is started (pressed Start button)
[ ] User ID is in allowedUsers (if restricted)
[ ] Config was reloaded after changes (restart gateway)
[ ] Streaming is enabled in config (if expected)
[ ] Logs show no errors (journalctl -u openclaw)
[ ] Internet connection is stable
Getting Help
Still stuck?
- Check logs:
journalctl -u openclaw -f(watch live) - OpenClaw Discord: discord.gg/clawd
- GitHub Issues: For bugs
- SetupMyClaw: We can help debug your setup
Questions about Telegram setup? Email us.
Need Help Setting Up OpenClaw?
Skip the guides and get expert help. We'll set everything up for you in a 60-minute Zoom call.
Book a Setup Session - From $49