A single-page PHP dashboard for monitoring and controlling Bitcoin miners running Braiins OS (BOS) firmware.
- Real-time status — hashrate, power consumption, efficiency (W/TH), and fan speed per miner
- Wattage control — dropdown presets or custom input with SSH-based
bosminer.tomlediting - Pool management — enable/disable mining pools via the CGMiner API
- Pause/Resume — toggle mining on individual miners
- Fleet totals — aggregate wattage, hashrate, and efficiency across all miners
- PHP 7.4+ with sockets enabled (standard in most distributions)
- Apache with
mod_phpor similar (nginx + php-fpm also works) - Miners running Braiins OS with the CGMiner API enabled on port 4028
-
Copy the project files to your web server's document root:
index.php functions.php api.php config.example.json -
Create your configuration:
cp config.example.json config.json
-
Edit
config.jsonwith your miner details:ssh_key_path— absolute path to the SSH private key used for miner accessapi_port— CGMiner API port (default: 4028)api_timeout— socket timeout in secondswattage_presets— array of wattage values for the dropdownminers— array of miner entries withname,ip,max_wattage,connection, andlocation
-
Set up SSH key-based authentication for miner access:
# Create a directory for the web server's SSH keys sudo mkdir -p /var/www/.ssh sudo chown www-data:www-data /var/www/.ssh sudo chmod 700 /var/www/.ssh # Generate an RSA key pair (Dropbear on many miners does not support Ed25519) sudo -u www-data ssh-keygen -t rsa -b 4096 -f /var/www/.ssh/id_rsa_miners -N "" # Copy the public key to each miner ssh-copy-id -i /var/www/.ssh/id_rsa_miners.pub root@<miner-ip> # Verify passwordless login works sudo -u www-data ssh -i /var/www/.ssh/id_rsa_miners -o StrictHostKeyChecking=no root@<miner-ip> echo ok
Note: The
ssh_key_pathinconfig.jsonmust match the private key path created above. Braiins OS miners run Dropbear SSH, which may only support RSA and ECDSA keys — Ed25519 keys will be silently rejected on older firmware. -
Set up the Apache virtual host:
sudo cp apache-vhost.conf.example /etc/apache2/sites-available/minermanager.conf # Edit ServerName and DocumentRoot to match your setup sudo a2ensite minermanager sudo systemctl reload apache2 -
Open the page in a browser.
The ip and connection fields in each miner entry can differ if the miner's web UI and API are reachable on different addresses (e.g. through a VPN). In most setups they will be the same.
| Field | Description |
|---|---|
name |
Miner hostname (shown in the UI and used for identification) |
ip |
Address used for the web UI link |
connection |
Address used for API and SSH communication |
max_wattage |
Upper limit for the wattage dropdown |
location |
Human-readable location label |
config.jsoncontains your miner IPs and SSH key path — it is gitignored and must never be committed- The SSH private key should be owned by
www-datawith mode600 - This tool is designed for local network use only and has no authentication layer
- All form inputs are validated server-side against the configuration
MIT — see LICENSE.