Minager is a high-performance software suite for the remote monitoring, management, and automation of ASIC hardware via the Telegram Bot API.
Rather than acting as a simple frontend, the system operates as a middleware gateway. It translates undocumented hardware interfaces into a structured format, providing a reliable and secure channel for hardware control and critical automated alerts.
- System Capabilities
- Architecture & Performance
- Reverse Engineering & Hardware Integration
- User Interface
- Security & Privacy
- Getting Started
- Legal Disclaimer & Compliance
- Licensing & Collaboration
- Bilingual Interface (I18n): The system fully supports English and Russian languages. Localization settings are resolved dynamically per user session.
- Native UI Integration: Utilizes Telegram Inline Keyboards to construct multi-level configuration menus. Operators can switch mining pools, adjust power modes, and control fan algorithms directly within the native chat interface.
- Asynchronous Alerting: Background workers actively monitor chip conditions, hash rates, and temperatures. The software can automatically transition faulty hardware into sleep mode and immediately notify the operator.
- WebSocket Multiplexing: Includes a custom WebSocket implementation utilizing binary serialization (
gob+json) to establish secure communication channels between local hardware agents and the central server.
The software architecture is engineered for high-load environments, prioritizing a minimal memory footprint and high execution speed.
- Memory Optimization: String formatting, log generation, and text payload rendering are handled via custom wrappers
around
strings.Builderwith pre-allocated buffer capacities. This drastically minimizes memory allocation overhead and garbage collector pressure. - Concurrency: Hardware polling is strictly managed using Go concurrency primitives (
sync.WaitGroup,sync.RWMutex, and channels). This eliminates race conditions during simultaneous asynchronous queries across multiple network devices. - Network Efficiency: Network operations are handled via the
fasthttplibrary for high-throughput request and response processing. - Database Integration: A PostgreSQL connection pool is utilized to store and rapidly retrieve cached alert thresholds and user profiles.
Integrating with specific ASIC hardware architectures (such as the Antminer series) required the following engineering efforts:
- Documentation Analysis: Translation and technical analysis of original manufacturer specifications.
- Firmware Reverse Engineering: Analysis of the hardware boot pipeline, internal network packet structures, and
proprietary
.bmufirmware files. - API Schema Reconstruction: Extensive mapping of undocumented, historically unstable CGI interfaces. A strongly
typed API client (
pkg/antminer/cgi) was developed to convert raw, disparate device output into predictable JSON structures for programmatic evaluation.
Hardware Disclaimer: The author of this project and affiliated individuals have never owned, operated, or possessed physical ASIC mining equipment. Development, reverse engineering, and testing were conducted entirely using public data, firmware dumps, open-source network logs, and software simulators.
The UI is structured to present dense analytical data clearly and compactly within the native Telegram environment.
Background workers trigger immediate alerts for isolated hash rate drops, overheating events, or combined system faults.
View Detailed Diagnostics Dashboard (Click to expand)
Extended statistics output showing granular chip-level diagnostics, hardware errors, and performance metrics for individual hash boards.
Minager handles sensitive infrastructure data, including private IP addresses, network topologies, and mining pool credentials. Security controls include:
- Data Protection: The Telegram bot strictly applies the
ProtectContentflag to its messages. This disables message forwarding, text copying, and OS-level screenshots on the client side for chats containing hardware configurations. - Authentication: Access to the internal web server and WebSocket endpoints is restricted. Passwords are stored in
the database exclusively as secure
bcrypthashes. - Encrypted Transport: TLS/SSL support is provided natively for secure Webhook tunneling and agent-to-server communication.
The backend infrastructure consists of the PostgreSQL database, the Telegram bot process, and the WebSocket subsystem.
- Go 1.25.0+
- PostgreSQL 12+
- OpenSSL (for local certificate generation)
- An ngrok account (optional, for Webhook tunneling during local development)
-
Clone the repository:
git clone https://github.com/ndenissov/minager.git cd minager -
Generate a self-signed SSL certificate (required for the internal server and/or Telegram Webhooks):
openssl req -newkey rsa:2048 -nodes -keyout cert.key -x509 -days 365 -out cert.crt
-
Create a
.envconfiguration file in the project root directory:TOKEN=your_telegram_bot_token NGROK_AUTHTOKEN=your_ngrok_token DB_HOST=localhost DB_PORT=5432 DB_USER=postgres DB_PASSWORD=secret DB_NAME=minager DB_SSLMODE=disable
-
Configure the database by creating the target database and applying the necessary schema migrations for the
user,cgi, andalerttables.
The project can run via long polling (not recommended for production environments), standard Webhooks, or via ngrok.
Example using ngrok (suitable for development environments lacking a static IP):
go build -o minager_bot ./cmd/minager_bot/...
./minager_bot -wh-ngrok -wh-address ":8080"This software is distributed "AS IS", without any warranties, express or implied. The developer assumes no liability for hardware damage, operational downtime, or financial losses resulting from the use of this software.
End users hold sole responsibility for ensuring their operation of this software complies with all applicable local and international laws. This includes, but is not limited to, legislation governing cryptocurrency mining, digital asset circulation, taxation, customs, and export control within their jurisdiction.
This repository represents the transition of a massive, commercially usable code base. into the public sphere. Given the legally complex, heavily regulated, and sensitive nature of the hardware operations it facilitates, strict adherence to the applied license is an absolute legal requirement.
Any unauthorized commercial exploitation, misappropriation of intellectual property, removal of copyright notices, or violation of the applied license terms will not be tolerated. The author actively monitors for unauthorized usage and will pursue all available legal remedies to the fullest extent of the law. This includes, but is not limited to, immediate cease-and-desist orders, seeking injunctive relief, and aggressive claims for financial damages against infringing individuals or corporate entities. If you are a simple developer or other user and use this project in good faith, I can assure you that you have absolutely nothing to fear.
Software usage and distribution are governed by the specific license terms applied to the repository. The license
terms are subject to change. The version published in the LICENSE file at the root of this repository at the time of
your use dictates the applied legal terms.
For B2B integration, obtaining an exclusive commercial license, or confirming whether your intended use case complies with the current constraints, contact the author via:
- Email: n.denissov@proton.me
- Alternatively, and in any other cases, you can create an Issue corresponding to your request in this repository.
Feel free to make suggestions, pull requests, bug fixes and bug reports. Any contribution to the project will be duly mentioned in the project documentation, in the appropriate section.





