v1.3.0 — macOS only
A lightweight menu bar app for solo mining Bitcoin on your Mac. GPU accelerated with Apple Metal.
SoloMiner is a little hobby project I built to try solo mining Bitcoin from my MacBook. It sits in your menu bar, connects to a mining pool over Stratum v1, and throws SHA-256d hashes at the network.
Will you actually find a block? Almost certainly not. The odds are something like 1 in a quadrillion per block with consumer hardware. But its fun to try, and if you somehow do hit one, the entire block reward is yours.
I mainly built this to learn about how Bitcoin mining works under the hood. Figured I'd share it incase anyone else wants to mess around with it.
Lives in your menu bar. No dock icon, doesn't get in the way. Click to open a popover dashboard with live stats.
SHA-256d compute shader runs on your Apple GPU. Gets around ~69 MH/s on an M2 Pro. Not great, not terrible.
Full curses-based TUI with the same features as the GUI. Run with --tui flag. Works over SSH too.
Auto-reconnects on disconnect, auto-tunes difficulty based on your hashrate, auto-saves stats to disk.
Ships with 5 solo mining pools preconfigured. Or add your own. Has a ping button to check latency.
Headless mining from the command line. Good for running in tmux on a mac mini or whatever.
You need a Mac running macOS 12 or later and Python 3.10+. Apple Silicon recommended but Intel works too (slower).
Then go to Settings, enter your Bitcoin address, pick a pool, and hit Start. That's pretty much it.
If you're curious about what's happening under the hood:
SoloMiner connects to a Bitcoin mining pool using the Stratum v1 protocol. The pool sends block templates (jobs) containing the data you need to hash.
Each job is an 80-byte block header. The Metal compute shader tries millions of different nonce values, computing SHA256(SHA256(header)) for each one. About 4 million per batch.
When a hash meets the pool's difficulty target, it's submitted as a "share". The engine auto-tunes difficulty to target roughly 1 share every 20 seconds.
If a hash also meets the actual Bitcoin network difficulty (astronomically harder), you've found a block. You win the block reward. This basically never happens with consumer GPUs.
If you want a standalone .app you can put in your Applications folder:
There's also a setup.py for py2app if you prefer that. Check the README for more details. Fair warning - PyObjC bundling can be finicky depending on your Python version.
Automated builds run every 4 commits and get posted to the Releases page.
Heads up: macOS will block the app from opening since it's not signed. Go to System Settings > Privacy & Security, scroll down, and click "Open Anyway".
Realistically no. Current Bitcoin network hashrate is around 800 EH/s. Your M2 does maybe 70 MH/s. That's like entering a foot race against a fighter jet. But the lottery ticket is free to play.
No, it's macOS only. It uses Apple Metal for GPU compute and PyObjC/AppKit for the UI. Those are Mac-only frameworks. If you're on Linux you probably want cgminer or something like that.
The code is open source, you can read every line. It only connects to the pool you configure, only sends mining shares, and stores config locally at ~/Library/Application Support/SoloMiner.
Because it's mining lol. That's literally what mining is - doing as many hashes as possible as fast as possible. If you want it to chill a bit, switch to "Eco Mode" in the performance settings.
Regular pool mining with consumer hardware earns you like fractions of a penny per day after electricity. Not worth it. Solo mining earns you nothing 99.9999% of the time but has that tiny chance of everything.
If you want to throw some sats my way, here's my Bitcoin address:
No pressure obviously. The whole thing is free and open source.