diff --git a/README.md b/README.md new file mode 100644 index 0000000..a6a1986 --- /dev/null +++ b/README.md @@ -0,0 +1,93 @@ +# Bitcoin Node for Solo Miners +*A Linux Appliance by Robbie Ferguson* + +## Overview +**Bitcoin Node for Solo Miners** is a self-contained Debian-based appliance that lets you host your own Bitcoin node for your solo miners with no third-party pool (or fees) required. + +This system installs and configures: +- **Bitcoin Core** (with pruning) +- **ckpool** (running in solo mining mode) +- A custom, secure **HTTPS web dashboard** for monitoring and configuration + +This appliance is designed for hobbyists, home miners, and small operations who want to mine independently while maintaining full control of their rewards and privacy. Running your own independent mining node helps strengthen the decentralization of both the Bitcoin blockchain and the global mining network. + +--- + +## Features +- 🧱 **Full or Pruned Node Support** — Select from 550 MB to full blockchain retention. +- ⚡ **Solo Mining with ckpool** — Connect ASICs directly via Stratum (`stratum+tcp://your-node:3333`). +- 🔒 **Secure HTTPS Interface** — Self-signed TLS certificate generated on first boot. +- 🧭 **Web Dashboard** — View node sync progress, service health, and pool status. +- 💰 **Optional Donation (Pool Fee)** — At your own discretion, donate from 0 – 5% of a block reward to Robbie Ferguson. +- 🧩 **Automatic Service Management** — Fully integrated systemd services for `bitcoind` and `ckpool`. + +--- + +## Installation +Download and run the installer script as root on a clean **Debian 13 (Trixie)** system: + +```bash +chmod +x installer +sudo ./installer +``` + +When installation completes: +1. Open your browser to `https:///activate/` +2. Create your admin credentials (used for web access and RPC) +3. Optionally regenerate your HTTPS certificate +4. You’ll be redirected to the dashboard once activation is complete + +--- + +## Configuration +Access the settings panel anytime using the link on the dashboard. + +From here you can: +- Adjust pruning size (550 MB – Full) +- Change donation (pool fee) percentage +- Regenerate your certificate +- Restart core services as needed + +--- + +## Connecting Miners +Point your ASIC miners to: +``` +stratum+tcp://:3333 +``` + +**Username:** your Bitcoin wallet address to receive payout (this can be different for each miner if desired) +**Password:** anything + +Your miners can begin hashing once the Bitcoin node finishes syncing. + +--- + +## Security Notes +- The web interface is HTTPS-only and disabled until activation is complete. +- RPC/admin credentials are generated at first activation +- Self-signed certificates are created automatically on first boot and can be regenerated later. + +--- + +## System Requirements +| Component | Minimum | Recommended | +|------------|----------|-------------| +| OS | Debian 13 (Trixie) | Debian 13 (Trixie) | +| CPU | 2 cores | 4+ cores | +| RAM | 2 GB | 4 GB+ | +| Storage | 16 GB (pruned) | 500 GB+ (full node) | +| Network | Broadband | High-speed fiber | + +--- + +## License +This project is released under the **Apache 2.0 License**. +Copyright © 2025 Robbie Ferguson + +--- + +## Credits +- [Bitcoin Core](https://bitcoincore.org) +- [ckpool](https://bitbucket.org/ckolivas/ckpool) +- Linux appliance integration by Robbie Ferguson diff --git a/installer b/installer index e682ffa..8ebdd32 100755 --- a/installer +++ b/installer @@ -1,7 +1,7 @@ #!/bin/bash # -# Bitcoin Solo Miner Appliance Installer -# An Open Source Appliance from Robbie Ferguson +# Bitcoin Node for Solo Miners Appliance Installer +# An Open Source Linux Appliance from Robbie Ferguson # (c) 2025 Robbie Ferguson set -e @@ -13,6 +13,9 @@ CERT_DIR="/etc/ssl/localcerts" CKPOOL_USER="ckpool" CKPOOL_PORT="3333" BITCOIN_DATA="/var/lib/bitcoind" +BTC_RPC_USER="user" +BTC_RPC_PASS="pass" +PRUNE_SIZE="550" # --------------------------------------------------------------------------- # PURGE @@ -99,17 +102,22 @@ EOF mkdir -p /etc/bitcoin mkdir -p "${BITCOIN_DATA}" -# temporary admin creds; user will change on first boot +# Bitcoin Core Configuration cat > "$BITCOIN_CONF" </dev/null 2>&1 || useradd -r -s /bin/false "$CKPOOL_USER" +usermod -aG $CKPOOL_USER www-data +# try to restart the running PHP-FPM service so www-data picks up new group +php_fpm_service="" +# 1) ask systemd what php-fpm services exist +php_fpm_service=$(systemctl list-units --type=service --all \ + | awk '/php.*fpm\.service/ {print $1; exit}') + +if [ -n "$php_fpm_service" ]; then + systemctl restart "$php_fpm_service" +fi mkdir -p "$APP_ROOT/conf" "$APP_ROOT/logs" cat > "$APP_ROOT/conf/ckpool.conf" < /etc/systemd/system/ckpool.service < "$WWW_ROOT/index.php" <<'EOF' + + + + + Bitcoin Node for Solo Miners + + + +
+
+

Bitcoin Node for Solo Miners

+

A Linux Appliance by Robbie Ferguson

+
+
+ Settings +
+
+ +
+

Status

+

Loading status…

+
+ +
+

Workers

+

No workers detected yet. This is normal while Bitcoin Core is syncing or if no ASICs are pointed at this server.

+
+ + + + + +EOF + +# Settings page +cat > "$WWW_ROOT/settings.php" <<'EOF' + '550 MB (default, small)', @@ -370,7 +566,7 @@ $stratum = 'stratum+tcp://' . $host . ':3333'; - Local Bitcoin Solo Mining + Bitcoin Node for Solo Miners [Settings]