Infrabot is a powerful on-premise automation platform designed those who want instant and secure command execution directly from Telegram.
Build your own modular commandlets, extend functionality with plugins, and manage your infrastructure with just a message.
- Runs as a secure Windows service
- Fully modular architecture β add/remove features with plugins
- Command & control through Telegram
- Encrypted configuration and storage
- Easy-to-create plugins using C#
- Built-in plugin manager, service control, and configuration tooling
- No third-party cloud required
- Comes with examples
Before installing or running Infrabot, ensure your environment meets the following requirements:
- Operating System: Windows Server 2012 and above or 8/10/11 or Linux (Ubuntu, RHEL, CentOS, Fedora, Alpine)
- .NET Runtime: .NET 8.0 Runtime (ASP.NET Core Hosting Bundle + .NET Desktop Runtime)
- Architecture: x64 (recommended)
- CPU: Dual-core (2 GHz or higher), 64-bit
- RAM: Minimum 4 GB (8 GB recommended for plugin-heavy usage)
- Disk: At least 400 MB of free space (more if storing large plugin resources or logs)
- If Windows (not\and AD joined) Service Account Access:
- Must have read/write access to the Infrabot installation directory
- Must have permission to execute PowerShell, Python, Shell
- Can be a non-administrative user or an Active Directory Managed Service Account
- If Linux:
- Must have read/write access to the Infrabot installation directory
- Must have permission to execute PowerShell, Python, Shell
- Can be a non-administrative user
- For Admin-Level Commands:
Scripts or executables must handle elevation internally if the bot is not running with admin rights
- A registered Telegram Bot Token from @BotFather
- Your Telegram ID must be added in the Telegram Users section to receive permissions
- The following paths must be correctly set (environment variables supported):
- PowerShell Path
- Shell Path
- Python Path
- Plugins must be deployed as
.plug
files and placed into the/plugins
directory
- ExecutionPolicy: Recommended to use
AllSigned
for PowerShell - Plugin execution files are hash-verified to prevent tampering
- Permissions can be granted per user or via user groups
Automatic
- Download the latest release and follow the installation process to set up infrabot on your system
- Open https://localhost:8443 and login into the system. Default credentials:
Login : admin
Password : password
- Review Getting Started page which can be accessed via left side menu
Manual
- Install the latest ASP.NET Core Runtime 8
- Install the latest .NET Desktop Runtime 8
- Download the latest ZIP release from the Releases Page
- Unpack files into the folder
- Open CMD and configure services using NSSM which comes with the ZIP archive
cd "C:\your\folder\infrabot\nssm-2.24\win64"
nssm.exe install InfrabotWebUI "C:\your\folder\infrabot\WebUI\Infrabot.WebUI.exe"
nssm.exe set InfrabotWebUI AppDirectory "C:\your\folder\infrabot\WebUI"
nssm.exe install InfrabotTelegramService "C:\your\folder\infrabot\TelegramService\Infrabot.TelegramService.exe"
nssm.exe set InfrabotTelegramService AppDirectory "C:\your\folder\infrabot\TelegramService"
nssm.exe install InfrabotWorkerService "C:\your\folder\infrabot\WorkerService\Infrabot.WorkerService.exe"
nssm.exe set InfrabotWorkerService AppDirectory "C:\your\folder\infrabot\WorkerService"
- Launch the InfrabotWebUI and InfrabotWorkerService services, and open https://localhost:8443 to login into the system using default credentials:
Login : admin
Password : password
- Configure Telegram Bot Token on the Configuration page. If you do not know how to get Telegram Bot Token, review Getting Started page on the left side menu.
- Launch InfrabotTelegramService service
Scheme of infrabot components is specified below.
stateDiagram-v2
state "Web Admin Service <br>
- Web UI
- User/Group Mgmt
- Plugin Access Mgmt" as s1
state "Telegram Service <br>
- Telegram Client
- Plugin Manager
- Command Manager" as s2
state "Worker Service <br>
- Health Checker
- Health Data Cleaner
- Message Cleaner" as s3
state "SQLite Database <br>
- Users
- Groups
- Plugins
- Permissions
- Health
- Logs
- Audit events" as s4
s1 --> s4
s2 --> s4
s3 --> s4
Infrabot is built to be extended.
π§ Want to automate server reboots? Query databases? Deploy services? Just write a plugin.
π
.plug
files are compiled, serialized via Protocol Buffers, and live independently of the core app.
Each plugin defines the commandlets Infrabot can execute β and you can include multiple commands in one plugin.
π Check out the Example Plugins to get started.
π¦ Plugin Basics
- Format: Only
.plug
files are recognized - Unique GUID & Plugin ID assigned at creation
- Commands with the same name across plugins are supported β just use the plugin ID to specify which one to run
- Created/modified using the Plugin Editor
- Contains metadata + scripts/apps needed for execution
- Each plugin can define multiple commandlets
π Installing Plugins
- Copy the
.plug
file to/plugins
in the Infrabot Telegram Service directory - Infrabot auto-detects and extracts contents into
/plugins/{plugin-GUID}
- If a newer version exists, it will replace the old one
- Plugin appears automatically on the Plugins web page
- Optionally use
/reloadplugins
to force immediate plugin reload
ποΈ Plugin Removal
- Deleting the
.plug
file removes plugin - Extracted plugin folder remains unless deleted manually
- If redeployed, the folder is replaced and re-extracted automatically
π Integrity & Execution
- Executables can reside in subdirectories within the plugin folder
- Use correct relative paths in the plugin configuration
- File hashes are checked before each execution
- If a mismatch is found, execution is blocked to prevent tampering
π Command Updates & Conflicts
- Telegram command menu updates within 3β5 minutes
- Use plugin IDs to disambiguate overlapping command names
- Duplicate entries?
β Delete the.plug
file β wait for cleanup β redeploy cleanly
Want to customize or contribute?
- Install Visual Studio 2022
- Open the solution file
- Build the project (Debug or Release mode)
That's it β you're ready to roll.
We love community contributions! Here's how you can help:
- Report bugs and open issues
- Add new functionality
- Develop new plugins
- Improve the documentation
Every PR is appreciated. Let's build something epic together.