Skip to main content

Prerequisites

  • Go 1.26+
  • A Telegram bot token (create via @BotFather)

Build from Source

git clone https://github.com/skrashevich/botmux.git
cd botmux
go build -o botmux .
No CGO required — all dependencies are pure Go.

Install via go install

go install github.com/skrashevich/botmux@latest

Run

# With token flag
./botmux -token "123456:ABC-DEF..."

# With environment variable
export TELEGRAM_BOT_TOKEN="123456:ABC-DEF..."
./botmux

# Custom address
./botmux -token "TOKEN" -addr :9090
The token is optional — if not provided, BotMux starts without a CLI bot and uses bots from the database only.

Command-Line Flags

FlagDefaultDescription
-token""Telegram bot token (or TELEGRAM_BOT_TOKEN env var)
-addr:8080HTTP server listen address
-dbbotdata.dbPath to SQLite database file
-webhook""Set webhook URL for receiving updates
-tg-api""Custom Telegram API base URL (or TELEGRAM_API_URL env var)
-demofalseEnable demo mode (or DEMO_MODE=true env var)