Setup Public-Pool On A Xubuntu Bitcoin Node?

Okay, let’s get started with setting up public-pool on your Xubuntu Bitcoin node. public-pool is a relatively lightweight and straightforward mining pool software, often favored for smaller setups and its ease of use compared to more complex options like yiimp or NOMP.

Here’s a step-by-step guide to get you going. Keep in mind that this assumes you have a basic understanding of Linux command-line operations.

Prerequisites:

  • Your Xubuntu Bitcoin Node is Running and Fully Synced: Ensure your bitcoind is running and has downloaded the entire blockchain.
  • Basic Linux Command-Line Knowledge: You’ll be working in the terminal.
  • git Installed: You’ll need git to clone the public-pool repository. If not installed, you can install it with: Bashsudo apt update sudo apt install git -y
  • Node.js and npm (or yarn) Installed: public-pool is built using Node.js. If you don’t have them, install them: Bashsudo apt update sudo apt install nodejs npm -y You might want to install a specific version of Node.js using nvm (Node Version Manager) for better compatibility. Check the public-pool documentation for recommended versions if available.
  • screen or tmux (Optional but Recommended): These tools allow you to run public-pool in the background and keep it running even if you close your terminal session. Install with: Bashsudo apt install screen -y # or sudo apt install tmux -y

Installation and Configuration of public-pool:

  1. Clone the public-pool Repository: Open your terminal in Xubuntu and navigate to a directory where you want to install public-pool (e.g., your home directory or a dedicated mining folder). Then, clone the repository. The repository URL might vary depending on the specific fork or source. A common one is: Bashgit clone https://github.com/TheSerapher/public-pool.git cd public-pool (Note: This is based on a common source for public-pool. If you found it elsewhere, use that repository URL.)
  2. Install Dependencies: Navigate into the public-pool directory and install the necessary Node.js modules using npm: Bashnpm install Alternatively, if you prefer yarn: Bashyarn install
  3. Configure public-pool: You’ll need to create a configuration file. Look for a sample configuration file (e.g., config.sample.json or similar) in the public-pool directory. Copy it and rename it to config.json: Bashcp config.sample.json config.json nano config.json Now, edit the config.json file with your specific settings:
    • rpc (Bitcoin Core RPC Settings): JSON"rpc": { "host": "localhost", "port": 8332, "user": "your_rpc_user", "password": "your_rpc_password" }, Replace "your_rpc_user" and "your_rpc_password" with the rpcuser and rpcpassword you have set in your bitcoin.conf file.
    • poolServer (Pool Listening Address and Port): JSON"poolServer": { "listen": "0.0.0.0", // Listen on all interfaces "port": 3333, // Default mining port "ssl": false, // Set to true for SSL (requires certificates) "sslPort": 443 // SSL port }, Adjust the listen address and port as needed. If you plan to make your pool publicly accessible, 0.0.0.0 is usually the way to go.
    • payout (Payout Settings): JSON"payout": { "interval": 3600, // Payout interval in seconds (e.g., 3600 for hourly) "threshold": 0.001, // Minimum payout amount in BTC "address": "your_bitcoin_address" // Your Bitcoin payout address }, Set the payout interval, minimum payout threshold, and your own Bitcoin address where the solo mining rewards should be sent.
    • Other Settings: Review the rest of the config.json file for other settings you might want to adjust, such as donation addresses, block unlocker settings, etc.
    Save and close the config.json file (in nano, press Ctrl+X, then Y, then Enter).
  4. Start public-pool: Navigate back to the public-pool directory in your terminal and start the pool server: Bashnode stratum_server.js You should see output indicating that the stratum server has started.
  5. Run in the Background (Recommended): To keep public-pool running even after you close your terminal, use screen or tmux:
    • Using screen: Bashscreen -S publicpool node stratum_server.js # Press Ctrl+A then Ctrl+D to detach from the screen session # To re-attach later: screen -r publicpool
    • Using tmux: Bashtmux new -s publicpool node stratum_server.js # Press Ctrl+B then D to detach from the tmux session # To re-attach later: tmux attach -t publicpool
  6. Configure Your Miners: Now, you need to configure your Antminer S19s, LVO7, and Nerdaxe to point to your public-pool server. In your miners’ configuration settings, you will typically need to enter:
    • Pool URL: The IP address of your Xubuntu machine (if it’s on the same network, it might be its local IP address; if you need external access, it will be your public IP address) followed by the port you configured in config.json (e.g., your_ip_address:3333).
    • Worker Name: You can usually set a worker name to identify your miners (e.g., s19.1, lvo7.a, nerdaxe.1).
    • Password: Often, the password can be anything (e.g., x).
  7. Monitor Your Pool: public-pool might have a basic web interface for monitoring. Check the documentation or the console output when you start the server for the web interface URL and port (it’s often on a different port than the mining port).

Important Considerations for Solo Mining with a Public Pool Setup:

  • “Public” in public-pool: While the name suggests public, you are configuring it to be your pool for solo mining. You don’t need to advertise it or allow others to connect. The “public” refers to its capability to operate as a public pool if desired.
  • Firewall: If your Xubuntu machine has a firewall enabled (e.g., ufw), you might need to open the mining port (e.g., 3333) to allow your miners to connect. Bashsudo ufw allow 3333
  • Network Configuration: If your miners are on a different network than your Xubuntu machine, you’ll need to ensure proper network routing and port forwarding on your router to allow the miners to reach your pool server.
  • Resource Usage: Running a mining pool server and a full Bitcoin node on the same machine can be resource-intensive. Monitor your VM’s CPU, RAM, and network usage.
  • Luck: Remember that solo mining success is entirely dependent on your hashing power and luck. There’s no guarantee of finding blocks.

This guide should give you a solid starting point for setting up public-pool for solo mining on your Xubuntu Bitcoin node. Remember to consult the specific documentation for the version of public-pool you are using for any additional configuration options or troubleshooting tips. Good luck!