Decentralizing Bitcoin Mining - A Deep Dive into the Bitcoin Knots Simple Pool

The code for this project can be found at this link

In the ever-evolving landscape of cryptocurrency, Bitcoin mining remains a cornerstone activity that secures the network while allowing participants to earn rewards. However, as mining has become increasingly industrialized, concerns about centralization have grown significantly. As of 2025, two mining pools control over 51% of the network’s hashrate, making censorship and attacks theoretically possible if these pools worked together.

Click Here if you want to skip to setting up a local Mining Pool

Why Solo Mining Matters

Solo mining represents a return to Bitcoin’s original vision of decentralized participation. While pool mining has become the norm due to the increasing difficulty of mining Bitcoin, solo mining offers several distinct advantages:

  • Full Rewards: Solo miners keep 100% of the block reward if they successfully mine a block
  • Network Decentralization: By running your own node and mining independently, you contribute to a more distributed network
  • Ideological Alignment: Solo mining allows miners to use their hashrate ideologically, looking past short-term profit to focus on the long-term success of “freedom money”

However, it’s important to acknowledge the challenges:

  • Higher Variance: Solo miners may go long periods without finding a block
  • Significant Investment: Effective solo mining typically requires substantial hardware and electricity resources
  • Technical Knowledge: Setting up and maintaining a solo mining operation requires more technical expertise than joining a pool

The Broader Context: Mining Decentralization

The bitcoinknots-simple-pool project exists within a larger movement to reclaim Bitcoin mining from large industrial operations. This centralization runs counter to Bitcoin’s foundational principles of decentralization and censorship resistance.

Key components of the bitcoinknots-simple-pool

Before I dive in to setting what makes up the mining pool, it’s important to understand the two open-source projects which simplify the process of setting up a solo mining operation:

  • Bitcoin Knots - a specialized version of the Bitcoin Core software with additional features and enhancements
  • Public-Pool - a simple Bitcoin stratum mining server.

What is Bitcoin Knots?

Before diving into the repository itself, it’s important to understand what Bitcoin Knots is and why someone might choose it over the standard Bitcoin Core implementation.

Bitcoin Knots is a fork of Bitcoin Core maintained by Luke Dashjr, a long-time Bitcoin Core developer. It serves as an alternative client software that is fully compatible with the Bitcoin network (drop-in replacement) while offering additional features not found in the standard release.

Some key differences include:

  • Enhanced mempool policies that can filter out unwanted transactions, including the ability to reject what some call “parasitic” transactions like ordinals
  • More granular control over which transactions your node prioritizes
  • Additional security measures and advanced transaction management tools

One could argue that running Bitcoin Knots contributes to network diversity, which strengthens Bitcoin’s resilience against potential issues like hard forks or other disruptions. It serves as a backup option in case Bitcoin Core were to be compromised in any way.

What is Public-Pool?

Public-Pool is a fully open-source, solo Bitcoin mining pool application created by Benjamin Wilson. Its sole purpose is to let anyone run their own mining pool using their own Bitcoin node, rather than relying on large, centralized pools. When you use Public-Pool, your mining hardware connects directly to your own instance, and if you successfully mine a block, you receive the entire block reward — no splitting with other miners, no pool fees, and no middleman.

The key benefits of using Public-Pool include:

  • Complete control over your mining operation
  • No splitting rewards with other miners
  • No fees to pool operators
  • No middlemen
  • Strengthening Bitcoin’s decentralization

Flexible deployment: You can run Public-Pool on your own hardware, in a Docker container (such as in the repo mentioned here bitcoinknots-simple-pool), or even as an app on platforms like UmbrelOS for seamless integration with your Bitcoin node.

Public-Pool is ideal for home miners, small groups, or anyone who wants to strengthen Bitcoin’s decentralization by operating outside of the major mining pools

Understanding the bitcoinknots-simple-pool Repository

The bitcoinknots-simple-pool repository is designed to simplify solo mining by combining the 2 previously mentioned repos via Docker Compose by spinning up a new Bitcoin Knots Public-Pool instance. This is an all-in-one solution that makes it accessible for individuals to participate in Bitcoin mining without joining large mining pools that contribute to centralization concerns.

The bitcoinknots-simple-pool repository offers a compelling solution for those looking to reclaim some of the decentralized ethos that Bitcoin was founded upon.

Use Cases and Benefits

Individual Miners:

  • Eliminate pool fees
  • Maintain complete control over mining operations
  • Learn about Bitcoin infrastructure

Development and Testing:

  • Create isolated mining environments
  • Test mining software against known configurations
  • Experiment with different Bitcoin network configurations

Educational Purposes:

  • Understand how mining pools operate
  • Explore Bitcoin node management
  • Learn Docker containerization practices

Setup Requirements

For those considering setting up bitcoinknots-simple-pool for home mining, several practical factors should be considered:

Software Requirements

In order to run the configured bitcoinknots-simple-pool, you will need Docker installed. I currently don’t use Docker Desktop, but that may provide some useful insight/tools into your mining images/compose-service.

Hardware Requirements

I recommend the following minimum specifications for a full node:

  • 2+ vCPUs/cores
  • 4GB+ RAM
  • ~1TB+ SSD storage

If you want to run a pruned node, you can get away with a lot less storage space. You are able to choose how much of the Blockchain’s history (reducing storage requirements) by updating the field prune=N updating this field can reduce storage requirements by only storing most recent N MiB of blocks from the chain. Running a reduced node still allows you to participate in the Bitcoin netowork by mining/validating blocks, but required much less storage space.

Key Components

The repository contains several important elements:

  1. Dockerfiles: These Dockerfiles are used to build a Bitcoin Knots image that can be deployed in a containerized environment.
  2. Docker-Compose Configuration: This defines a Docker service to host a local Bitcoin node and Public-Pool instance, allowing for easy deployment and management.
  3. Comprehensive Setup and Management Scripts: These scripts abstract away complex Docker operations, making the system more user-friendly.

Security and Trust Considerations

One of the most impressive aspects of this project is its commitment to security and the “don’t trust, verify” principle.

This is accomplished by not publishing any pre-built images for Bitcoin Knots, which forces the enduser to build the Knots image they desire. This is made easy for you with the included build scripts.

The Bitcoin Knots images can be built it two main OS variants:

Debian-based Image:

  • Use pre-built binaries from (bitcoinknots.org)[https://bitcoinknots.org/]
  • Built using Bitcoin Knots reproducible build system
  • Signatures verified using the verify_binaries.py script from the official bitcoinknots repository

Alpine Image:

  • Built entirely from source code
  • More resource-efficient but comes with the caveat that Alpine Linux isn’t officially supported by Bitcoin Knots or Bitcoin Core teams

Flexible Architecture Options

The bitcoinknots-simple-pool Docker service supports multiple deployment scenarios:

Standalone Setup (typical)

For users who want a complete, self-contained mining pool, the repository provides everything needed to run both a Bitcoin node and the Public-Pool software together.

(Existing) Remote Node Integration

If you already operate a Bitcoin node, you can configure the pool to connect to your existing infrastructure. This requires adding the zmqpubrawblock=tcp://<host/IP>:3000 flag to your existing bitcoind instance and updating the BITCOIN_ZMQ_HOST field of the pool.env configuration file accordingly. If you take this route I assume you to be knowledgeable on Bitcoin node management, so I won’t further expand on this approach.

HTTP or HTTPS Two bitcoinknots-simple-pool Docker service configurations are available in the repo compose_http.yml and compose_http.yml. Both of these service definitions start up a Bitcoin Knots node and Public-Pool node, but the key difference between them depends if you want to run the Mining service/Bitcoin node just on your local network, or have them available on the open web.

If you want to run your mining service / node:

  • on your local network -> compose_http.yml
  • on the open web -> compose_http.yml

Typically you wont have to interact with these configurations manually, and can be handled for you by the later mentioned manage_node.sh and setup.sh scripts

Setting Up bitcoinknots-simple-pool

The bitcoinknots-simple-pool repository simplifies this process considerably through containerization. I created the setup scripts to be run from a Linux machine, but could easily be converted to Windows, etc. The actual mining service is inherintly cross-platform due to its running in Docker containers.

Alright, let’s get into the setup process:

Update and install required packages

Install a few tools we will need later:

sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get install -y ufw curl

Install Docker (copied from official Docker installation):

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
  $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

# Update your Apt sources
sudo apt-get update

# install the latest Docker version
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Building the Bitcoin Knots Images

The repository provides a script at scripts/build_knots.sh to manually build the Bitcoin Knots images locally. This script offers options to build either Debian-based or Alpine-based images and allows specification of which Bitcoin Knots version to build.

Usage: ./scripts/build_knots.sh [OPTIONS]
Options:
 -h, --help      Display this help message
 -a, --alpine    Build the image based on Alpine
 -v, --version   Specify the version of Bitcoin Knots to be built

By default, the version of Bitcoin Knots specified in the repo’s file LATEST_KNOTS will be built. This can be changed by specifying an alternate version using the -v flag as shown above. Other versions that have been tested with this Docker build process are in KNOTS_VERSIONS.

Configuring RPC Authentication and Public-Pool Domain

By default, the repository defines basic RPC credentials and leaves the Public-Pool domain UNSET. A script at scripts/setup.sh simplifies the process of updating these settings for security and accessibility.

Usage: ./scripts/setup.sh [OPTIONS]
Options:
 -h, --help     Display this help message
 -r, --rpc      Assign Both RPC Auth credentials
 -d, --domain   Assign Public-Pool Domain/Email
 -a, --all      Assign Both RPC Auth credentials and the Public-Pool Domain/Email

If you want to run your mining service / node:

  • on your local network -> you need to use the -d option but only need to specify your domain (most likely localhost)
  • on the open web -> you need to use the -d option and specify both the domain, and email. These details are use to generate your LetsEncrypt certificate.

Starting the Node and Mining Pool

Several scripts are provided to simplify starting and stopping the local Bitcoin node and Public-Pool service:

Usage: ./scripts/manage_node.sh [OPTIONS]
Options:
 -h, --help     Display this help message
 -n, --node     Specify the Bitcoin Nodes service
 -p, --pool     Specify the Bitcoin Node & Mining pool services
 -d, --daemon   Start the service in DAEMON mode (only applies to start action)
 -s, --https    Run the POOL service over https (only affects the POOL service)
 -a, --action   Action to be performed (required)
       start    Start the specified service
       stop     Stop the specified service
       nlog     Display the logs for the Node service

You must chose one of the 'n'/'p' options for the start/stop action. You can make
the Pool ui/api available over HTTPS by specifying the 's' option.

Starting the mining pool with manage_node.sh:

./scripts/manage_node.sh -pd -a start  # Start node and pool in daemon mode
./scripts/manage_node.sh -pds -a start  # Start with HTTPS support

Starting the Bitcoin Node with manage_node.sh:

./scripts/manage_node.sh -nd -a start  # Start node in daemon mode
./scripts/manage_node.sh -nds -a start  # Start with HTTPS support

Initial hardening via UFW

We will want to make sure that the system is hardened in a simple way by making sure that the firewall is locked down to only allow access to the ports necessary for SSH, bitcoind, and public-pool using UFW.

A great intro to getting started with UFW is available on DigitalOcean.

Run the following commands to add some basic UFW rules and enable the firewall:

# Deny all non-explicitly allowed ports
sudo ufw default deny incoming
sudo ufw default allow outgoing

# Allow SSH access
sudo ufw allow ssh

# (If you'll be running the mining pool on the open web)
# Allow HTTP and HTTPS access for Let's Encrypt certificate issuance and pool UI
sudo ufw allow http
sudo ufw allow https

# Allow bitcoind p2p port
sudo ufw allow 8333/tcp

# Allow pool stratum port
sudo ufw allow 3333/tcp

# Enable UFW
sudo ufw enable

Configuring Knots and Public-Pool

To tailor bitcoinknots-simple-pool to your personal preferences, you can update the following config files:

There are some basic options already present in each of those configuration files. If you want further customization, I recommend referencing:

My setup

For my own use case, I have set up an instance of the bitcoinknots-simple-pool with some modest hardware.

Mining Pool Hardware

I currently run the bitcoinknots-simple-pool Docker compose service on an old ~2014 Mac Mini (A1347).

  • Intel(R) Core(TM) i5-3210M CPU @ 2.50GHz
  • 16Gb RAM
  • 1TB SSD

I have previously upgraded the base hardware from a HD to an SSD, and the RAM to 16GB.

ASIC Miners

As of this blog post, I have 2 ASIC mining machines:

These are great and easy to set up miners. At current network hash rate (860.00 EH/s), using advertised hash rates (7.2 T/h), I have a 1 in 2304 chance (per year) and 1 in ~20 million chance (per day) at mining a Bitcoin Block. While these are not great odds, I:

  • am able to participate in securing the Bitcoin network
  • have a better chance at mining a block than winning the lottery!

In reality, these hash rates fluctuate between 6.5~10 T/h, so these odds vary. All these odds are calculated using SoloChance.

Conclusion

The bitcoinknots-simple-pool repository represents an important contribution to Bitcoin’s ecosystem by lowering the technical barriers to solo mining. By combining Bitcoin Knots’ enhanced features with the simplicity of Docker deployment, it enables more individuals to participate directly in securing the Bitcoin network.

As concerns about mining centralization continue to grow, tools that empower individual participation become increasingly valuable. While solo mining may not always be the most profitable approach in the short term, it aligns with Bitcoin’s foundational values of decentralization, censorship resistance, and individual sovereignty.

Projects like bitcoinknots-simple-pool represent an important trend toward mining decentralization. By making it easier for individuals and small groups to operate their own mining infrastructure, these tools help preserve Bitcoin’s decentralized nature against the concentration of mining power in large pools.

For those interested in supporting these values while potentially earning Bitcoin rewards, the bitcoinknots-simple-pool project offers an accessible entry point into the world of solo mining. Whether you’re a technical enthusiast looking to deepen your understanding of Bitcoin’s infrastructure or someone concerned about the network’s long-term health, this repository provides the tools to make a meaningful contribution to Bitcoin’s decentralized future.

The code for this project can be found at this link