Maintainer: Goutham Josh
Original Developer / Contributor: MysteryDemon
Have you encountered the problem where you have to host resource-efficient Telegram Bots for free and you can only host a bot per account, but you wanted to host multiple bots in one instance? Say no more...
BotClusters lets you run multiple bots in the same instance. Built with process isolation, supervisord auto-recovery, dynamic virtual environments, and a live web dashboard.
- ๐ค Web GUI Bot Manager: Add, configure, edit, clone, and delete bot clusters directly from the dashboard without editing config files
- ๐ Real-Time Resource Metrics: Live gauges for CPU load %, host RAM usage (MB / %), and Disk space
- โก Per-Process Telemetry: Track memory consumption (RSS MB), CPU %, uptime, and PID for each bot individually
- ๐๏ธ Batch Cluster Operations: One-click "Start All", "Stop All", and "Restart All" cluster management
- ๐ป Integrated Bot Console / Terminal: Execute diagnostic shell commands (
pip list,git status,python -c ...) inside any bot directory - โฌ๏ธ One-Click Git Pull & Reload: Pull latest commits from bot repositories on demand without full server rebuilds
- ๐ข Telegram Crash Alerts: Instant Telegram notifications if a bot repeatedly crashes or enters auto-pause
- ๐พ Cluster Backup & Restore: Export all bot definitions and environment settings to JSON and restore anytime
- ๐ Advanced Log Streaming: Real-time SSE log stream with process filtering, STDOUT/STDERR isolation, live search, and file export
- ๐ Auto Updates: Optional automatic updates through GitHub on restart
- ๐ก๏ธ Reliable Process Management: Powered by supervisord with automated process supervision and smart auto-pause recovery
- ๐ Environment Control: Configure key-value environment variables per bot directly in the visual editor
- ๐ฎ Custom Execution: Configure custom entry scripts (
bot.py,main.py,app.py,start.sh) - ๐ Private Repo Support: Clone and run bots from private repositories using GitHub tokens
- ๐๏ธ Cloud & Cross-Platform Integration: Ready for Render, Koyeb, Heroku, Docker, Codespaces, and standalone local environments
- ๐ Multi-Python Support: Supports specific Python versions (
3.8to3.13)
- Fork and Star this repository
- Configure your bots in
cluster.env - Deploy to your preferred platform using the buttons below
| Config | Description | Required |
|---|---|---|
botname |
Unique name for your bot | โ |
git_url |
Git repository URL | โ |
branch |
Repository branch name | โ |
run_command |
Bot execution command (bot.py, main.py, start.sh) |
โ |
env |
Environment variables dictionary | โ |
python_version |
Custom Python Version (e.g. 3.9, 3.10, 3.11) |
โ |
cron |
Restart cron schedule | โ |
python3.8 โข python3.9 โข python3.10 โข python3.11 โข python3.12 โข python3.13
- Format:
["botname", "git_url", "branch", "run_command", {ENV_DICT}, "python_version"]- For Public Repositories:
["bot01", "https://github.com/exampleuser/bot.git", "main", "bot.py", {"PORT": "8787"}]- For Private Repositories:
["bot02", "https://<your_username>:<your_github_token>@github.com/<your_username>/privatebot.git", "main", "main.py", {"PORT": "6060"}]- For Custom Python Version:
["bot03", "https://github.com/exampleuser/legacybot.git", "main", "main.py", {"PORT": "6060"}, "3.9"]- Launch a Codespace on this repository (Code > Codespaces > Create codespace on main).
- Configure your bot in
cluster.env:cp cluster.env.sample cluster.env nano cluster.env
- Build and test using Docker:
docker build -t botclusters . docker run -p 5000:5000 --env-file cluster.env botclusters - Open Dashboard: Codespaces will automatically detect port
5000and prompt you to Open in Browser. Log in withadmin/password123.
- Ensure all your bots are compatible with Python (or bash).
- It is not compulsory to set a Python version; only set it if your bot specifically requires an older/newer interpreter.
- Keep your tokens and sensitive information secure in
cluster.env. - If your bot needs additional system or pip packages, define them in
install.sh. - GUI login details (configurable via
ADMIN_USERNAMEandADMIN_PASSWORD):Username:adminPassword:password123
- Maintainer: Goutham Josh
- Original Developer: MysteryDemon
- Upstream Inspiration: MultiBots
Contributions are welcome! Please feel free to submit a Pull Request.