Open source · Apache 2.0

BotMux

Command center for your Telegram bots

Multi-bot dashboard with built-in reverse proxy, inter-bot routing, protocol bridges, and AI-powered smart routing. Single binary. Pure Go.

terminal
$ docker run -d -p 8080:8080 \
-v botmux-data:/data \
-e TELEGRAM_BOT_TOKEN="YOUR_TOKEN" \
ghcr.io/skrashevich/botmux:latest
Single Binary
No runtime dependencies
Pure Go
Zero CGO, cross-platform
~25 MB
Alpine Docker image
SQLite
WAL mode, no external DB

Everything you need

One binary manages all your bots. Proxy, route, bridge, and monitor — from a single dashboard.

Multi-Bot Dashboard

Manage all bots from one instance. Add via CLI or web UI. Per-bot status, health checks, and config. No restarts needed.

Reverse Proxy

Poll Telegram, forward updates to webhook backends. Secret token auth, webhook-style responses, automatic health checks every 60s.

Long Polling

Telegram-compatible getUpdates via BotMux. Change the API base URL in your backend — zero other code changes.

Inter-Bot Routing

Route messages between bots by text pattern, user ID, chat ID, or LLM decision. Forward, copy, or drop. Source-NAT return path keeps bidirectional conversations working — replies automatically flow back through the original bot.

Protocol Bridges

Bridge Slack, webhooks, and external protocols to Telegram. Bidirectional — outgoing messages flow back automatically. Native Slack with HMAC-SHA256.

LLM Smart Routing

Describe routing rules in natural language. Works with any OpenAI-compatible API — OpenAI, Ollama, LM Studio. Runs after rule-based routes as a fallback.

Authentication & RBAC

Session cookies and Bearer API keys (bmx_ prefix). Two roles: admin and user. Per-bot access control. Passwords bcrypt-hashed, API keys SHA-256. Default admin auto-created on first run.

Analytics & Monitoring

Message counts, hourly activity charts, weekly active users, top contributors. Full audit log of every admin action. User profile cards with aggregated data.

API Proxy

Transparent Telegram API proxy at /tgapi/. Captures outgoing messages that getUpdates never sees. WebP→PNG sticker conversion built-in.

Media & i18n

Inline rendering of photos, videos, stickers, voice, audio. Image lightbox, video players. Interface in English and Russian with instant toggle.

See it in action

Dark and light themes, responsive design, built for daily use.

localhost:8080
BotMux Dashboard

How it works

BotMux sits between Telegram and your backends. It owns the polling loop and distributes updates however you need.

data flow
Telegram ──getUpdates──▶ BotMux (polling loop per bot)
                            │
                            ├── Dashboard:  trackChat() / saveMessage() ──▶ SQLite
                            │
                            ├── Push Proxy: POST update ──▶ Backend URL
                            │                    │
                            │                    └── webhook reply ──▶ Telegram API
                            │
                            ├── Long Poll:  enqueue ──▶ UpdateQueue (ring buffer)
                            │                              │
                            │            Backend ──getUpdates──▶ /tgapi/ ──▶ dequeue
                            │
                            ├── Routing:   match rules ──▶ send via Target Bot
                            │                └── save mapping ──▶ route_mappings
                            │
                            └── Bridges:   Slack / Webhook ◀──▶ Telegram

Backend ──sendMessage──▶ /tgapi/ (API proxy) ──▶ Telegram API
                            │
                            └── capture response ──▶ saveMessage() ──▶ SQLite
Go 1.26+ SQLite + WAL Embedded SPA Multi-arch Docker No CGO OpenAI-compatible LLM

Get started in seconds

Docker, binary, or go install. Pick your favorite.

Docker

recommended
$ docker run -d -p 8080:8080 \
-v botmux-data:/data \
-e TELEGRAM_BOT_TOKEN="TOKEN" \
ghcr.io/skrashevich/botmux:latest
# Open http://localhost:8080
# Login: admin / admin

Binary

# Install
$ go install github.com/skrashevich/botmux@latest
# Or build from source
$ git clone https://github.com/skrashevich/botmux.git
$ cd botmux && go build -o botmux .
# Run
$ ./botmux -token "YOUR_TOKEN"

Command-line flags

Flag Default Description
-token""Bot token (or TELEGRAM_BOT_TOKEN)
-addr:8080Listen address
-dbbotdata.dbSQLite database path
-webhook""Webhook URL for receiving updates
-tg-api""Custom Telegram API URL
-demofalseDemo mode (DEMO_MODE=true)
-versionfalsePrint version and exit