๐Ÿš€ How to Solo Mine Bitcoin with Bitaxe Touch, Bitcoin Knots, and own Stratum pool

ghost

npub1andyx2xqhwffeg595snk9a8ll43j6dvw5jzpljm5yjm3qync7peqzl8jd4

hex

5e3f1bec9e18fee21d0d4251cdb973e1161b8262ac7494013a41c38edcb6d99a

nevent

nevent1qqs9u0cmaj0p3lhzr5x5y5wdh9e7z9smsf32cay5qyayrsuwmjmdnxsprpmhxue69uhhyetvv9ujuem4d36kwatvw5hx6mm9qgswekjr9rqthy5u52z6gfmz7nll6cedxk82fpqled6zfdcszfu0qusryn7g9

naddr

naddr1qp2ysmmh946x7t2ndakx7t2dd9hx2t2zd96xxmmfdckhw6t5dqk5y6t5v9ux2t25da6kx6pdgf5hgcm0d9hz6jmwda68xttpdejz6mmhdck4xarjv9682mfdwphk7mpd0ymxw7nfxvq3samnwvaz7tmjv4kxz7fwva6kcat8w4k82tnddajsyg8vmfpj3s9mj2w29pdyya30fllavvkntr4yss0ukapykugpy78swgpsgqqqw4rshc5n0t

Kind-30023 (Article)

2025-07-07T09:37:55Z

Interested in running your own solo mining setup with full node sovereignty? Here's a complete, battle-tested guide to setting up a Bitaxe Touch single-chip miner (BM1370) with Bitcoin Knots and the public-pool GBT-to-Stratum bridge.

๐Ÿ› ๏ธ Hardware Overview

  • Miner: Bitaxe Touch (BM1370) โ€” 1.6 TH/s at ~17 W/TH, lightweight (0.78kg), with a touchscreen! List of Bitaxe sellers
  • Mini PC: ASUS NUC 15 Pro RNUC15CRKU700002 Slim
  • RAM: 32GB Kingston FURY DDR5 5600MHz CL40 SO-DIMM (2x 16GB sticks for Dual Channel performance)
  • Storage: 4TB Samsung 990 PRO (PCIe 4.0 NVMe M.2)
  • OS: Ubuntu 24.04.2 LTS โ€“ Download here
  • Other: USB flash drive (โ‰ฅ8GiB) for booting the Ubuntu installer

๐Ÿงฐ Setup & Installation

1. Prepare Your NUC

  • Connect monitor, keyboard, and mouse.
  • Boot from your Ubuntu flash drive.
  • Install Ubuntu 24.04.2 LTS.

2. Install Required Software

Youโ€™ll be installing:

  • Docker โ€“ for containerizing services
  • Bitcoin Knots v28.1.knots20250305 โ€“ full Bitcoin node
  • public-pool โ€“ a Stratum server bridge for Bitaxe to solo mine
  • public-pool-ui โ€“ optional Web UI for mining stats


๐Ÿ“โ€ฏExplanation:

Your Bitaxe Touch miner connects to your own public-pool, which acts as a GBT-to-Stratum bridge. While Bitaxe speaks Stratum, itโ€™s ultimately mining on block templates generated by your own Bitcoin Knots node via the getblocktemplate (GBT) RPC.

In other words, public-pool translates GBT-based templates from your node into Stratum-compatible work for the minerโ€”enabling full block template control without modifying Bitaxe itself.

This setup preserves mining self-sovereignty: block construction is handled entirely by your own Bitcoin node, not a third-party pool. You're validating transactions independently and maintaining full control over what gets mined.


๐Ÿ–ง Networking considerations:

  • My internal network is 192.168.8.0/24 (what my home router gives for any connected devices to it), so you will see this network throughout the documentation. Make sure to adjust it to your network if yours is different as well as the IP addresses.

  • 192.168.8.227 mini PC ASUS NUC 15 Pro (running Bitcoin Knots and "public-pool")

  • 192.168.8.203 Bitaxe Touch Bitcoin Miner


โš™๏ธ Configuring Bitcoin Knots

Option A: Download Binary

wget "https://github.com/bitcoinknots/bitcoin/releases/download/v28.1.knots20250305/bitcoin-28.1.knots20250305-x86_64-linux-gnu.tar.gz"

Option B: Build from Source

sudo apt install -y build-essential autoconf pkg-config libtool libboost-all-dev
source ~/.bashrc
git clone -b v28.1.knots20250305 https://github.com/bitcoinknots/bitcoin.git
cd bitcoin
./autogen.sh
./configure --without-gui
make -j$(nproc)
mkdir ~/bin
source ~/.profile
for i in bitcoind bitcoin-cli bitcoin-tx bitcoin-util; do strip -o ~/bin/$i src/$i; done


Create a file ~/.bitcoin/bitcoin.conf with the followings contents:

# bitcoin.conf โ€“ spam-filtering and mempool policy for Bitcoin Knots
# See more options and their defaults with: bitcoind -help-debug
# Last updated: July 6th, 2025

txindex=1  # Maintain a full transaction index for getrawtransaction RPC

# DEFAULTS for Bitcoin Knots v28.1.knots20250305
## Transaction relay and spam filtering
permitbarepubkey=0         # Disallow bare pay-to-pubkey outputs (P2PK)
permitbaremultisig=0       # Disallow bare multisig outputs (non-P2SH)
maxscriptsize=1650         # Reject scripts larger than this many bytes
datacarriersize=42         # Reject OP_RETURN data larger than this many bytes
datacarriercost=1          # Virtual size multiplier for OP_RETURN data
rejectparasites=1          # Reject parasitic overlay protocols
minrelaytxfee=0.00001      # Minimum fee rate (BTC/kvB) to relay transactions
bytespersigopstrict=20     # Enforce minimum bytes per sigop (strict)
bytespersigop=20           # Target bytes per sigop (soft limit)
dustrelayfee=0.00003       # Treat outputs below this fee rate as uneconomical dust
## Mempool ancestor/descendant limits
limitancestorcount=25      # Reject txs with โ‰ฅ this many unconfirmed ancestors
limitancestorsize=101      # Reject if ancestor chain exceeds this size (KB)
limitdescendantcount=25    # Reject txs creating โ‰ฅ this many descendants
limitdescendantsize=101    # Reject if descendant chain would exceed this size (KB)
## Other
#listen=1                   # Default, but ensures the node accepts inbound connections
#discover=1                 # Automatically detects your IP
#dnsseed=1                  # Use DNS to find peers

# Custom
## Transaction relay and spam filtering
rejecttokens=1             # Reject transactions using non-Bitcoin tokens
onlynet=ipv4               # Optional: restrict to IPv4 if you donโ€™t want IPv6 traffic (Valid options: ipv4, ipv6, onion, i2p, cjdns)

## Based on https://github.com/OCEAN-xyz/datum_gateway/blob/master/README.md (July 6th 2025)
blockmaxsize=3985000
blockmaxweight=3985000
#blocknotify=killall -USR1 datum_gateway
maxmempool=1000
blockreconstructionextratxn=1000000

# Solo Mining
server=1                   # Enables RPC server
rpcuser=user               # Make sure to update BITCOIN_RPC_USER in public-pool/.env (you'll see it later following the instructions)
rpcpassword=s0mePassword   # Make sure to update BITCOIN_RPC_PASSWORD in public-pool/.env (you'll see it later following the instructions)
rpcallowip=192.168.8.0/24  # Allow your Miner or local network to access the node
rpcallowip=172.16.0.0/12   # For Docker: https://github.com/benjamin-wilson/public-pool.git
rpcbind=0.0.0.0            # Listen on all interfaces (or limit to LAN)

Run Bitcoin Knots:

bitcoind

Wait for full sync. It can take a day or two before it syncs with the tip of the chain (it downloads about 780GiB of data), can be referred to as IBD (Initial Block Download).

Once started and fully synced, you should expect initialblockdownload set to false, e.g.:

$ bitcoin-cli getblockchaininfo | grep initialblockdownload
  "initialblockdownload": false,


Hint: you can get the time of the current block using this command

bitcoin-cli getblockchaininfo | jq -r .bestblockhash | xargs -I'{}' bitcoin-cli getblock {} | jq -r .time | xargs -I'{}' date -d @{}

๐Ÿณ Install Docker + Docker Compose

Follow the official Docker docs: ๐Ÿ‘‰ <https://docs.docker.com/engine/install/ubuntu/>

Use the "Install using the apt repository" method, where you will set up Docker's apt repository, install the Docker packages and test docker installed correctly by running the hello-world image.

You can add your user to the docker group, so you can use docker / docker compose commands without "sudo". To do so, run:

> NOTE: change "user" with your username in Ubuntu

sudo usermod -aG docker user

And re-login into your user session for it to pick up its new group. (Or just run newgrp docker for session-based switch)


๐Ÿ”Œ Set Up public-pool (Stratum Server)

git clone https://github.com/benjamin-wilson/public-pool.git
cd public-pool

docker-compose.yml

services:
  public-pool:
    container_name: public-pool
    build:
      context: .
      dockerfile: Dockerfile
    restart: unless-stopped
    extra_hosts:
      - "host.docker.internal:host-gateway"
    ports:
      - "${STRATUM_PORT}:${STRATUM_PORT}/tcp"
      - "${API_PORT}:${API_PORT}/tcp"
    volumes:
      - "./${NETWORK}-DB:/public-pool/DB"
      - "./.env:/public-pool/.env:ro"
    environment:
      - NODE_ENV=production

Create the .env file with the following contents:

> NOTE: it is based on the .env.example file.

#bitcoin node running in your private network 192.168.8.0/24
#BITCOIN_RPC_URL=http://192.168.8.227

# bitcoin node running undockered on the same PC
# needs to add rpcallowip=172.16.0.0/12 to your bitcoin.conf
BITCOIN_RPC_URL=http://host.docker.internal

BITCOIN_RPC_USER=user
BITCOIN_RPC_PASSWORD=s0mePassword
BITCOIN_RPC_PORT=8332
BITCOIN_RPC_TIMEOUT=10000

# You can use this instead of BITCOIN_RPC_USER and BITCOIN_RPC_PASSWORD
#BITCOIN_RPC_COOKIEFILE=

# Enable in bitcoin.conf with
# zmqpubrawblock=tcp://*:3000
# BITCOIN_ZMQ_HOST="tcp://192.168.8.227:3000"

API_PORT=3334
STRATUM_PORT=3333

#optional telegram bot
#TELEGRAM_BOT_TOKEN=

#optional discord bot
#DISCORD_BOT_CLIENTID=
#DISCORD_BOT_GUILD_ID=
#DISCORD_BOT_CHANNEL_ID=

#optional
DEV_FEE_ADDRESS=
# mainnet | testnet
NETWORK=mainnet

API_SECURE=false
# Default is "Public-Pool", you can change it to any string it will be removed if it will make the block or coinbase script too big
POOL_IDENTIFIER="Public-Pool"

Then build and run:

docker compose build
docker compose up -d

๐Ÿ“Š Web UI for public-pool (optional)

git clone https://github.com/benjamin-wilson/public-pool-ui.git
cd public-pool-ui

Edit src/environments/environment.prod.ts:

> NOTE: make sure to set your NUC's IP instead of 192.168.8.227; and set http instead of https.

export const environment = {
    production: true,
    API_URL: 'http://192.168.8.227:3334',
    STRATUM_URL: '192.168.8.227:3333'
};

Build and run:

docker build -t public-pool-ui .
docker run --name public-pool-ui -e STRATUM_URL=192.168.8.227:3333 -d --restart=unless-stopped -p 8080:80 public-pool-ui

Browse to: ๐Ÿ‘‰ http://192.168.8.227:8080


๐Ÿ”ง Configure Bitaxe Touch

Access your Bitaxe miner at http://192.168.8.203/pools

Main Pool:

  • Stratum URL: Other -> 192.168.8.227
  • Port: 3333
  • Worker: bc1... (your Bitcoin address)
  • Password: x (or leave empty)

Fallback Pool (e.g. solo.ckpool.org):

Configure as a backup in case your local node is down.

Click Save & Restart Device.


โœ… Verifying It's Working

  • Bitaxe UI: http://192.168.8.203/analytics

    • Look for 1.6+ TH/s hashrate (could vary)
    • Accepted shares should increase
    • 0 rejected shares
  • public-pool UI: http://192.168.8.227:8080

    • Shows your worker and share stats
    • You can login using your bc1... BTC Payout Address for more stats
  • Bitcoin Knots logs:

tail -f ~/.bitcoin/debug.log

Example output:

CreateNewBlock(): total size: 488198 block weight: 1561676 txs: 568 fees: 815375 sigops 2312
  • public-pool logs:
docker compose logs -f public-pool

Look for:

New client ID: ::ffff:192.168.8.203
getblocktemplate tx count: 692
block height change

๐Ÿง  Final Thoughts

With this setup:

  • You're mining solo, fully self-sovereign.
  • You control your own node and block templates.
  • You're using open-source tools and open mining hardware.
  • No pool trust assumptions.

This is as sovereign as Bitcoin mining gets.

๐Ÿ› ๏ธ Bonus Tips:

  • Want bitcoind to start automatically on boot?
    You can create a systemd service to manage and auto-start your Bitcoin node reliably across reboots.

Create /etc/systemd/system/bitcoind.service file with the following contents:

[Unit]
Description=Bitcoin daemon
After=network.target

[Service]
ExecStart=/home/user/bin/bitcoind
ExecStop=/home/user/bin/bitcoin-cli stop
User=user
Group=user
Restart=always
PrivateTmp=true
TimeoutStopSec=60s
TimeoutStartSec=10s
StartLimitInterval=120s
StartLimitBurst=5

[Install]
WantedBy=multi-user.target
pkill bitcoind
sleep 10s
pkill tor
systemctl daemon-reload
systemctl enable bitcoind.service
systemctl start bitcoind.service
  • Want your own mempool explorer?
    You can self-host mempool.space by deploying Electrs and Mempool directly on the same NUC.
    Heads up: it requires substantial disk space (up to 3.0TiB) and initial indexing time (several hours). For details, check out this under-the-hood guide.

Raw JSON

{
  "kind": 30023,
  "id": "5e3f1bec9e18fee21d0d4251cdb973e1161b8262ac7494013a41c38edcb6d99a",
  "pubkey": "ecda4328c0bb929ca285a42762f4fffd632d358ea4841fcb7424b7101278f072",
  "created_at": 1770646005,
  "tags": [
    [
      "title",
      "๐Ÿš€ How to Solo Mine Bitcoin with Bitaxe Touch, Bitcoin Knots, and own Stratum pool"
    ],
    [
      "summary",
      "A full guide to building a sovereign solo mining setup with Bitaxe, Bitcoin Knots, and own Stratum pool โ€” using open-source tools, your own node, and full control of block templates."
    ],
    [
      "image",
      "https://blossom.primal.net/b3c6a02194f4c9b69984db01ad881ceea4a2b8df86459efa0a4519d2aaf03c12.jpg"
    ],
    [
      "d",
      "How-to-Solo-Mine-Bitcoin-with-Bitaxe-Touch-Bitcoin-Knots-and-own-Stratum-pool-y6gzi3"
    ],
    [
      "t",
      "bitcoin"
    ],
    [
      "t",
      "mining"
    ],
    [
      "t",
      "bitaxe"
    ],
    [
      "t",
      "nuc"
    ],
    [
      "t",
      "listen=1"
    ],
    [
      "t",
      "discover=1"
    ],
    [
      "t",
      "dnsseed=1"
    ],
    [
      "t",
      "blocknotify=killall"
    ],
    [
      "t",
      "bitcoin"
    ],
    [
      "t",
      "BITCOIN_RPC_URL=http"
    ],
    [
      "t",
      "BITCOIN_RPC_COOKIEFILE="
    ],
    [
      "t",
      "optional"
    ],
    [
      "t",
      "TELEGRAM_BOT_TOKEN="
    ],
    [
      "t",
      "optional"
    ],
    [
      "t",
      "DISCORD_BOT_CLIENTID="
    ],
    [
      "t",
      "DISCORD_BOT_GUILD_ID="
    ],
    [
      "t",
      "DISCORD_BOT_CHANNEL_ID="
    ],
    [
      "t",
      "optional"
    ],
    [
      "t",
      "listen=1"
    ],
    [
      "t",
      "discover=1"
    ],
    [
      "t",
      "dnsseed=1"
    ],
    [
      "t",
      "blocknotify=killall"
    ],
    [
      "t",
      "bitcoin"
    ],
    [
      "t",
      "BITCOIN_RPC_URL=http"
    ],
    [
      "t",
      "BITCOIN_RPC_COOKIEFILE="
    ],
    [
      "t",
      "optional"
    ],
    [
      "t",
      "TELEGRAM_BOT_TOKEN="
    ],
    [
      "t",
      "optional"
    ],
    [
      "t",
      "DISCORD_BOT_CLIENTID="
    ],
    [
      "t",
      "DISCORD_BOT_GUILD_ID="
    ],
    [
      "t",
      "DISCORD_BOT_CHANNEL_ID="
    ],
    [
      "t",
      "optional"
    ],
    [
      "r",
      "wss://purplepag.es/"
    ],
    [
      "r",
      "wss://nos.lol/"
    ],
    [
      "r",
      "wss://pyramid.fiatjaf.com/"
    ],
    [
      "r",
      "wss://premium.primal.net/"
    ],
    [
      "r",
      "wss://relay.nsec.app/"
    ],
    [
      "r",
      "wss://relay.primal.net/"
    ],
    [
      "client",
      "Primal"
    ],
    [
      "published_at",
      "1751881075"
    ]
  ],
  "content": "Interested in running your **own solo mining setup** with full node sovereignty? Here's a complete, battle-tested guide to setting up a **Bitaxe Touch single-chip miner (BM1370)** with **Bitcoin Knots** and the **public-pool GBT-to-Stratum bridge**.\n\n## ๐Ÿ› ๏ธ Hardware Overview\n\n- **Miner**: [Bitaxe Touch (BM1370)](https://www.solosatoshi.com/product/bitaxe-touch/) โ€” 1.6 TH/s at \\~17 W/TH, lightweight (0.78kg), with a touchscreen! [List of Bitaxe sellers](https://bitaxe.org/buy)\n- **Mini PC**: ASUS NUC 15 Pro RNUC15CRKU700002 Slim\n- **RAM**: 32GB Kingston FURY DDR5 5600MHz CL40 SO-DIMM (2x 16GB sticks for Dual Channel performance)\n- **Storage**: 4TB Samsung 990 PRO (PCIe 4.0 NVMe M.2)\n- **OS**: Ubuntu 24.04.2 LTS โ€“ [Download here](https://ubuntu.com/download/desktop)\n- **Other**: USB flash drive (โ‰ฅ8GiB) for booting the Ubuntu installer\n\n## ๐Ÿงฐ Setup \u0026 Installation\n\n### 1. Prepare Your NUC\n\n- Connect monitor, keyboard, and mouse.\n- Boot from your Ubuntu flash drive.\n- Install Ubuntu 24.04.2 LTS.\n\n### 2. Install Required Software\n\nYouโ€™ll be installing:\n\n- [Docker](https://docs.docker.com/engine/install/ubuntu/) โ€“ for containerizing services\n- [Bitcoin Knots](https://bitcoinknots.org/) `v28.1.knots20250305` โ€“ full Bitcoin node\n- **public-pool** โ€“ a Stratum server bridge for Bitaxe to solo mine\n- **public-pool-ui** โ€“ optional Web UI for mining stats\n\n\\\n๐Ÿ“โ€ฏ**Explanation:**\n\nYour Bitaxe Touch miner connects to your own **public-pool**, which acts as a **GBT-to-Stratum bridge**. While Bitaxe speaks Stratum, itโ€™s ultimately mining on block templates generated by your own **Bitcoin Knots** node via the `getblocktemplate` (GBT) RPC.\n\nIn other words, **public-pool** translates GBT-based templates from your node into Stratum-compatible work for the minerโ€”enabling full block template control without modifying Bitaxe itself.\n\nThis setup preserves **mining self-sovereignty**: block construction is handled entirely by your own Bitcoin node, not a third-party pool. You're validating transactions independently and maintaining full control over what gets mined.\n\n\\\n๐Ÿ–ง **Networking considerations:**\n\n- My internal network is 192.168.8.0/24 (what my home router gives for any connected devices to it), so you will see this network throughout the documentation. Make sure to adjust it to your network if yours is different as well as the IP addresses.\n\n- 192.168.8.227 mini PC ASUS NUC 15 Pro (running Bitcoin Knots and \"public-pool\")\n\n- 192.168.8.203 Bitaxe Touch Bitcoin Miner\n\n---\n\n## โš™๏ธ Configuring Bitcoin Knots\n\n### Option A: Download Binary\n\n```bash\nwget \"https://github.com/bitcoinknots/bitcoin/releases/download/v28.1.knots20250305/bitcoin-28.1.knots20250305-x86_64-linux-gnu.tar.gz\"\n```\n\n### Option B: Build from Source\n\n```bash\nsudo apt install -y build-essential autoconf pkg-config libtool libboost-all-dev\nsource ~/.bashrc\ngit clone -b v28.1.knots20250305 https://github.com/bitcoinknots/bitcoin.git\ncd bitcoin\n./autogen.sh\n./configure --without-gui\nmake -j$(nproc)\nmkdir ~/bin\nsource ~/.profile\nfor i in bitcoind bitcoin-cli bitcoin-tx bitcoin-util; do strip -o ~/bin/$i src/$i; done\n```\n\n\\\nCreate a file `~/.bitcoin/bitcoin.conf` with the followings contents:\n\n```ini\n# bitcoin.conf โ€“ spam-filtering and mempool policy for Bitcoin Knots\n# See more options and their defaults with: bitcoind -help-debug\n# Last updated: July 6th, 2025\n\ntxindex=1  # Maintain a full transaction index for getrawtransaction RPC\n\n# DEFAULTS for Bitcoin Knots v28.1.knots20250305\n## Transaction relay and spam filtering\npermitbarepubkey=0         # Disallow bare pay-to-pubkey outputs (P2PK)\npermitbaremultisig=0       # Disallow bare multisig outputs (non-P2SH)\nmaxscriptsize=1650         # Reject scripts larger than this many bytes\ndatacarriersize=42         # Reject OP_RETURN data larger than this many bytes\ndatacarriercost=1          # Virtual size multiplier for OP_RETURN data\nrejectparasites=1          # Reject parasitic overlay protocols\nminrelaytxfee=0.00001      # Minimum fee rate (BTC/kvB) to relay transactions\nbytespersigopstrict=20     # Enforce minimum bytes per sigop (strict)\nbytespersigop=20           # Target bytes per sigop (soft limit)\ndustrelayfee=0.00003       # Treat outputs below this fee rate as uneconomical dust\n## Mempool ancestor/descendant limits\nlimitancestorcount=25      # Reject txs with โ‰ฅ this many unconfirmed ancestors\nlimitancestorsize=101      # Reject if ancestor chain exceeds this size (KB)\nlimitdescendantcount=25    # Reject txs creating โ‰ฅ this many descendants\nlimitdescendantsize=101    # Reject if descendant chain would exceed this size (KB)\n## Other\n#listen=1                   # Default, but ensures the node accepts inbound connections\n#discover=1                 # Automatically detects your IP\n#dnsseed=1                  # Use DNS to find peers\n\n# Custom\n## Transaction relay and spam filtering\nrejecttokens=1             # Reject transactions using non-Bitcoin tokens\nonlynet=ipv4               # Optional: restrict to IPv4 if you donโ€™t want IPv6 traffic (Valid options: ipv4, ipv6, onion, i2p, cjdns)\n\n## Based on https://github.com/OCEAN-xyz/datum_gateway/blob/master/README.md (July 6th 2025)\nblockmaxsize=3985000\nblockmaxweight=3985000\n#blocknotify=killall -USR1 datum_gateway\nmaxmempool=1000\nblockreconstructionextratxn=1000000\n\n# Solo Mining\nserver=1                   # Enables RPC server\nrpcuser=user               # Make sure to update BITCOIN_RPC_USER in public-pool/.env (you'll see it later following the instructions)\nrpcpassword=s0mePassword   # Make sure to update BITCOIN_RPC_PASSWORD in public-pool/.env (you'll see it later following the instructions)\nrpcallowip=192.168.8.0/24  # Allow your Miner or local network to access the node\nrpcallowip=172.16.0.0/12   # For Docker: https://github.com/benjamin-wilson/public-pool.git\nrpcbind=0.0.0.0            # Listen on all interfaces (or limit to LAN)\n```\n\n### Run Bitcoin Knots:\n\n```bash\nbitcoind\n```\n\nWait for full sync. It can take a day or two before it syncs with the tip of the chain (it downloads about 780GiB of data), can be referred to as IBD (Initial Block Download).\n\nOnce started and fully synced, you should expect `initialblockdownload` set to `false`, e.g.:\n\n```\n$ bitcoin-cli getblockchaininfo | grep initialblockdownload\n  \"initialblockdownload\": false,\n```\n\n\\\nHint: you can get the time of the current block using this command\n\n```\nbitcoin-cli getblockchaininfo | jq -r .bestblockhash | xargs -I'{}' bitcoin-cli getblock {} | jq -r .time | xargs -I'{}' date -d @{}\n```\n\n---\n\n## ๐Ÿณ Install Docker + Docker Compose\n\nFollow the official Docker docs: ๐Ÿ‘‰ \u0026lt;https://docs.docker.com/engine/install/ubuntu/\u0026gt;\n\nUse the \"Install using the apt repository\" method, where you will set up Docker's apt repository, install the Docker packages and test docker installed correctly by running the hello-world image.\n\nYou can add your user to the `docker` group, so you can use docker / docker compose commands without \"sudo\". To do so, run:\n\n\u0026gt; NOTE: change \"user\" with your username in Ubuntu\n\n```\nsudo usermod -aG docker user\n```\n\nAnd re-login into your user session for it to pick up its new group. (Or just run `newgrp docker` for session-based switch)\n\n---\n\n## ๐Ÿ”Œ Set Up public-pool (Stratum Server)\n\n```bash\ngit clone https://github.com/benjamin-wilson/public-pool.git\ncd public-pool\n```\n\n### `docker-compose.yml`\n\n```yaml\nservices:\n  public-pool:\n    container_name: public-pool\n    build:\n      context: .\n      dockerfile: Dockerfile\n    restart: unless-stopped\n    extra_hosts:\n      - \"host.docker.internal:host-gateway\"\n    ports:\n      - \"${STRATUM_PORT}:${STRATUM_PORT}/tcp\"\n      - \"${API_PORT}:${API_PORT}/tcp\"\n    volumes:\n      - \"./${NETWORK}-DB:/public-pool/DB\"\n      - \"./.env:/public-pool/.env:ro\"\n    environment:\n      - NODE_ENV=production\n```\n\nCreate the `.env` file with the following contents:\n\n\u0026gt; NOTE: it is based on the `.env.example` file.\n\n```ini\n#bitcoin node running in your private network 192.168.8.0/24\n#BITCOIN_RPC_URL=http://192.168.8.227\n\n# bitcoin node running undockered on the same PC\n# needs to add rpcallowip=172.16.0.0/12 to your bitcoin.conf\nBITCOIN_RPC_URL=http://host.docker.internal\n\nBITCOIN_RPC_USER=user\nBITCOIN_RPC_PASSWORD=s0mePassword\nBITCOIN_RPC_PORT=8332\nBITCOIN_RPC_TIMEOUT=10000\n\n# You can use this instead of BITCOIN_RPC_USER and BITCOIN_RPC_PASSWORD\n#BITCOIN_RPC_COOKIEFILE=\n\n# Enable in bitcoin.conf with\n# zmqpubrawblock=tcp://*:3000\n# BITCOIN_ZMQ_HOST=\"tcp://192.168.8.227:3000\"\n\nAPI_PORT=3334\nSTRATUM_PORT=3333\n\n#optional telegram bot\n#TELEGRAM_BOT_TOKEN=\n\n#optional discord bot\n#DISCORD_BOT_CLIENTID=\n#DISCORD_BOT_GUILD_ID=\n#DISCORD_BOT_CHANNEL_ID=\n\n#optional\nDEV_FEE_ADDRESS=\n# mainnet | testnet\nNETWORK=mainnet\n\nAPI_SECURE=false\n# Default is \"Public-Pool\", you can change it to any string it will be removed if it will make the block or coinbase script too big\nPOOL_IDENTIFIER=\"Public-Pool\"\n```\n\nThen build and run:\n\n```bash\ndocker compose build\ndocker compose up -d\n```\n\n---\n\n## ๐Ÿ“Š Web UI for public-pool (optional)\n\n```bash\ngit clone https://github.com/benjamin-wilson/public-pool-ui.git\ncd public-pool-ui\n```\n\n### Edit `src/environments/environment.prod.ts`:\n\n\u0026gt; NOTE: make sure to set your NUC's IP instead of `192.168.8.227`; and set `http` instead of `https`.\n\n```ts\nexport const environment = {\n    production: true,\n    API_URL: 'http://192.168.8.227:3334',\n    STRATUM_URL: '192.168.8.227:3333'\n};\n```\n\nBuild and run:\n\n```bash\ndocker build -t public-pool-ui .\ndocker run --name public-pool-ui -e STRATUM_URL=192.168.8.227:3333 -d --restart=unless-stopped -p 8080:80 public-pool-ui\n```\n\nBrowse to: ๐Ÿ‘‰ http://192.168.8.227:8080\n\n---\n\n## ๐Ÿ”ง Configure Bitaxe Touch\n\nAccess your Bitaxe miner at `http://192.168.8.203/pools`\n\n### Main Pool:\n\n- **Stratum URL**: `Other` -\u0026gt; `192.168.8.227`\n- **Port**: `3333`\n- **Worker**: `bc1...` (your Bitcoin address)\n- **Password**: `x` (or leave empty)\n\n### Fallback Pool (e.g. solo.ckpool.org):\n\nConfigure as a backup in case your local node is down.\n\nClick **Save \u0026 Restart Device**.\n\n---\n\n## โœ… Verifying It's Working\n\n- Bitaxe UI: http://192.168.8.203/analytics\n\n  - Look for 1.6+ TH/s hashrate (could vary)\n  - Accepted shares should increase\n  - 0 rejected shares\n\n- public-pool UI: http://192.168.8.227:8080\n\n  - Shows your worker and share stats\n  - You can login using your bc1... BTC Payout Address for more stats\n\n- Bitcoin Knots logs:\n\n```bash\ntail -f ~/.bitcoin/debug.log\n```\n\nExample output:\n\n```\nCreateNewBlock(): total size: 488198 block weight: 1561676 txs: 568 fees: 815375 sigops 2312\n```\n\n- public-pool logs:\n\n```bash\ndocker compose logs -f public-pool\n```\n\nLook for:\n\n```\nNew client ID: ::ffff:192.168.8.203\ngetblocktemplate tx count: 692\nblock height change\n```\n\n---\n\n## ๐Ÿง  Final Thoughts\n\nWith this setup:\n\n- You're mining solo, **fully self-sovereign**.\n- You **control your own node and block templates**.\n- You're using **open-source tools** and **open mining hardware**.\n- No pool trust assumptions.\n\nThis is as sovereign as Bitcoin mining gets.\n\n### ๐Ÿ› ๏ธ Bonus Tips:\n\n- Want `bitcoind` to start automatically on boot?\\\n  You can create a **systemd service** to manage and auto-start your Bitcoin node reliably across reboots.\n\nCreate `/etc/systemd/system/bitcoind.service` file with the following contents:\n```\n[Unit]\nDescription=Bitcoin daemon\nAfter=network.target\n\n[Service]\nExecStart=/home/user/bin/bitcoind\nExecStop=/home/user/bin/bitcoin-cli stop\nUser=user\nGroup=user\nRestart=always\nPrivateTmp=true\nTimeoutStopSec=60s\nTimeoutStartSec=10s\nStartLimitInterval=120s\nStartLimitBurst=5\n\n[Install]\nWantedBy=multi-user.target\n```\n\n```\npkill bitcoind\nsleep 10s\npkill tor\nsystemctl daemon-reload\nsystemctl enable bitcoind.service\nsystemctl start bitcoind.service\n```\n\n\n- Want your own mempool explorer?\\\n  You can self-host [mempool.space](https://mempool.space) by deploying [Electrs](https://github.com/mempool/electrs) and [Mempool](https://github.com/mempool/mempool) directly on the same NUC.\\\n  **Heads up:** it requires substantial disk space (up to 3.0TiB) and initial indexing time (several hours). For details, check out this [under-the-hood guide](https://github.com/akash-network/awesome-akash/tree/master/bitcoin-knots-mempool-ui#-under-the-hood-what-happens-after-deployment).",
  "sig": "d76dbff51d604efd59c37b0a066cb398bf2090e7a6b752ead7ed9865705df48dfac7bcf2797612165c9f1c6246048be1429fd4aa9424d719d0cbd65a548a5989"
}