Skip to content

Happy Mining firmware on the miner ​

Every miner running the Happy Mining firmware (v1.0.2 and later) serves its own dashboard and HTTP API on port 80: open http://<miner-ip>/ from a computer or a phone on the miner's network. Mole Hash uses the same API through the Mole agent — firmware updates from the Firmware panel go through it.

Signing in ​

The miner asks for its web password. The factory password is admin; until it is changed every page shows a yellow banner and Security opens first. Change it in Security → Web password (8 characters or more). The same password is used by scripts and by Mole Hash (HTTP Digest, user root), so set it in the miner's credentials in Mole Hash too (Machines → Edit miner → Web password), or the agent cannot drive the miner any more.

Pages ​

PageWhat you do there
OverviewHashrate (average and 5 s) with a 10-minute chart, hottest chip and PCB temperature, every fan, shares and reject rate, HW errors, uptime; one line per hashboard with chips found, hashrate, chip/PCB °C, frequency and HW errors; the live pools. Refreshes every 5 s.
PoolsThe three saved pools (1 is used first, 2 and 3 take over); Save and restart mining writes them to cgminer.conf and restarts cgminer. The live table shows each pool's state and Mine on it now to switch until the next restart.
MiningStart, Restart or Stop mining (Stop asks for confirmation; the fans and control board stay on). An Expert section sends a parameter to cgminer ascset.
Network & settingsHostname, DHCP or static IP (IP, netmask, gateway in the same subnet, DNS — all checked, and you type STATIC to confirm), timezone, SSH on/off. Expert: cgminer.conf edits the raw file; it is refused if it is not valid JSON or has no pool. Only the fields you change are written, every other line of the files is kept. Download backup saves the configuration.
FirmwareWhat is installed, Upload and install a signed package (progress bar, then the installer log; the miner reboots by itself), Remove Happy Mining to boot the stock Bitmain firmware again (type REMOVE).
LogsEvery log file, followed live, with download and clear.
NotesFree key/value labels kept on the miner (rack, owner, repair history…).
SystemLocate: blink the red/green LEDs for 2 min to 2 h (stops by itself), identity of the miner (serial, model, IP, MAC, firmware, cgminer), Rescan hashboards, Reboot, Factory reset (type RESET).
SecurityWeb password, Lock (refuses every change, also through the API, until unlocked), API keys for scripts (shown once, at creation), SSH public keys for root.
APIThis API, searchable, with copy-ready curl examples — served by the miner itself at /api/docs.

On a phone the menu folds behind the ☰ button.

HTTP API ​

Base URL http://<miner-ip>. Answers are JSON; errors are {"error":"…"} with an HTTP status (400 invalid input, 401 not signed in, 409 already running, 423 locked, 502 cgminer not answering).

Authentication — one of:

  • HTTP Digest, user root, the web password, realm happymining (scripts, Mole agent): curl --digest -u root:PASSWORD http://<ip>/api/overview
  • an API key in the X-Api-Key header (create it in Security → API keys)
  • the browser session cookie set by POST /api/login.

/api/version, /api/health, /api/auth-check, /api/login and /api/docs answer without credentials. While the dashboard is locked, every change answers 423; reads still work.

sh
# hashboards, fans, temperatures in one call
curl --digest -u root:PASSWORD http://10.11.101.30/api/overview
# replace the saved pools (mining restarts)
curl --digest -u root:PASSWORD -X PUT -H 'Content-Type: application/json' \
  -d '{"pools":[{"url":"stratum+tcp://pool.example.com:3333","user":"account.worker","pass":"x"}]}' \
  http://10.11.101.30/api/pools/config
# install a firmware package (the miner reboots when done)
curl --digest -u root:PASSWORD -F file=@happymining-s19kpro-aml-nand-v1.0.2.tar.gz http://10.11.101.30/api/firmware/update
curl --digest -u root:PASSWORD http://10.11.101.30/api/firmware/status

Status ​

MethodPathAccessWhat it doesBody
GET/api/versionpublicFirmware and cgminer version (also used to detect Happy Mining).
GET/api/healthpublicLiveness of the dashboard and of cgminer.
GET/api/overviewsigned inEverything the Overview page shows in one call: hashrate (TH/s), shares, boards (chips, chip/PCB temp, frequency), fans, pools, locate LED.
GET/api/summarysigned incgminer summary (raw).
GET/api/statussigned inAlias of /api/summary.
GET/api/perf-summarysigned inAlias of /api/summary.
GET/api/poolssigned incgminer pools (raw, live state).
GET/api/devssigned incgminer devs (raw, one per board).
GET/api/boardssigned inAlias of /api/devs.
GET/api/statssigned incgminer stats (raw: fans, chips, chip temperatures, frequencies).
GET/api/metricssigned inAlias of /api/stats.
GET/api/coinsigned incgminer coin (raw).
GET/api/configsigned incgminer config (raw).
GET/api/infosigned inIdentity of the miner: serial, firmware, network, uptime, cgminer version.
GET/api/serialsigned inSerial number.
GET/api/modelsigned inMiner model as cgminer reports it.

Pools ​

MethodPathAccessWhat it doesBody
GET/api/pools/configsigned inThe pools saved in cgminer.conf (what the miner uses after a restart).
PUT/api/pools/configsigned in · not when lockedReplace the 1–3 pools in cgminer.conf (other settings kept) and restart cgminer.{"pools":[{"url":"stratum+tcp://host:3333","user":"wallet.worker","pass":"x"}]}
POST/api/mining/switch-poolsigned in · not when lockedMine on this pool now (live, until restart).{"pool":0}
POST/api/pools/enablesigned in · not when lockedEnable a pool (live).{"pool":0}
POST/api/pools/disablesigned in · not when lockedDisable a pool (live).{"pool":0}
POST/api/pools/removesigned in · not when lockedRemove a pool (live; use PUT /api/pools/config to change the saved pools).{"pool":0}
POST/api/pools/addsigned in · not when lockedAdd a pool (live; use PUT /api/pools/config to save it).{"url":"stratum+tcp://host:3333","user":"wallet.worker","pass":"x"}

Mining ​

MethodPathAccessWhat it doesBody
GET/api/mining/statesigned inIs cgminer running.
POST/api/mining/startsigned in · not when lockedStart mining (cgminer).
POST/api/mining/stopsigned in · not when lockedStop mining: hashboards off, fans and control board stay on.
POST/api/mining/restartsigned in · not when lockedRestart cgminer (applies cgminer.conf).
POST/api/mining/throttlesigned in · not when lockedExpert: forward a parameter to cgminer ascset (frequency/voltage; format depends on the model).{"parameter":"0,freq,600"}

Settings ​

MethodPathAccessWhat it doesBody
GET/api/settingssigned inNetwork (hostname, DHCP or static IP), timezone, SSH and the raw cgminer.conf.
POST/api/settingssigned in · not when lockedSave settings. Only the sections sent are changed; the other keys of each file are kept. A static IP needs ip/netmask/gateway/DNS in the same subnet. cgminer.conf must be valid JSON with at least one pool.{"network":{"hostname":"rack1-03","dhcp":false,"ipaddress":"10.11.101.30","netmask":"255.255.255.0","gateway":"10.11.101.1","dnsservers":"1.1.1.1,8.8.8.8"},"system":{"timezone":"Europe/Paris"},"ssh":{"enable":true}}
GET/api/settings/backupsigned inDownload the configuration files (JSON).
POST/api/settings/restoresigned in · not when lockedRestore a backup made with /api/settings/backup (validated like a save).{"cgminer.conf":"…","network.conf":"…"}
POST/api/settings/factory-resetsigned in · not when lockedErase the configuration and reboot.{"confirm":"RESET"}

Firmware ​

MethodPathAccessWhat it doesBody
POST/api/firmware/updatesigned in · not when lockedInstall a signed Happy Mining package. multipart/form-data with the .tar.gz in field "file" (or JSON {"path":"/tmp/x.tar.gz"} for a file already on the miner). Runs in the background; the miner reboots when done.multipart: file=@happymining-…-v1.0.2.tar.gz
GET/api/firmware/statussigned inProgress of the last firmware update / removal.
POST/api/firmware/removesigned in · not when lockedRemove Happy Mining and boot the stock Bitmain firmware again (reboots).{"confirm":"REMOVE"}

Logs and notes ​

MethodPathAccessWhat it doesBody
GET/api/logssigned inList of log files.
GET/api/logs/{name...}signed inLast 256 KB of a log (name as listed; ?download=1 to save it).
POST/api/logs/{name...}signed in · not when lockedClear a log: POST /api/logs/<name>/clear.
GET/api/notessigned inNotes kept on the miner (rack, owner, repairs…).
POST/api/notessigned in · not when lockedAdd a note.{"key":"rack","value":"B1-R8 (0,3)"}
PUT/api/notes/{id}signed in · not when lockedEdit a note.{"key":"rack","value":"B1-R9"}
DELETE/api/notes/{id}signed in · not when lockedDelete a note.

System ​

MethodPathAccessWhat it doesBody
POST/api/system/rebootsigned in · not when lockedReboot the miner.
POST/api/locate-minersigned in · not when lockedBlink the red/green LEDs for N seconds (default 600, max 7200).{"seconds":600}
POST/api/locate-offsigned in · not when lockedStop blinking the LEDs.
GET/api/locatesigned inIs the locate LED blinking, until when.
POST/api/rescan-hardwaresigned in · not when lockedRescan the hashboards (restarts hwscan then cgminer).

Access ​

MethodPathAccessWhat it doesBody
GET/api/auth-checkpublicIs this browser logged in, is the dashboard locked, is the factory password still set.
POST/api/loginpublicLog the browser in (sets an HttpOnly session cookie, 12 h).{"password":"…"}
POST/api/logoutpublicLog the browser out.
POST/api/passwordsigned inChange the web password (also the HTTP Digest password for user root). At least 8 characters.{"current":"…","new":"…"}
POST/api/locksigned inLock: every write is refused until unlocked.
POST/api/unlocksigned inUnlock writes.
GET/api/apikeyssigned inAPI keys (the token itself is only shown once, at creation).
POST/api/apikeyssigned in · not when lockedCreate an API key for scripts (send it as X-Api-Key).{"name":"molehash"}
POST/api/apikeys/deletesigned in · not when lockedDelete an API key.{"id":"…"}
GET/api/ssh/keyssigned inPublic keys allowed to SSH in as root.
POST/api/ssh/keyssigned in · not when lockedAdd a public key.{"key":"ssh-ed25519 AAAA… me@laptop"}
DELETE/api/ssh/keyssigned in · not when lockedRemove a public key by index.{"index":0}
GET/api/docspublicThis list of endpoints.

Good to know ​

  • Network and SSH changes apply at the next reboot; the page offers to reboot right away.
  • A static address that is wrong makes the miner unreachable: it then needs a factory reset on site (reset button), which brings it back on DHCP.
  • cgminer.conf and the pools are the only settings that apply at once (cgminer restarts, about 30 s without hashing).
  • The firmware update checks the package signature on the miner before anything is written; a package for another control board is refused.

Mole Hash — mining fleet management.