- Requirements
- Installation
- Configuration
- Running the Pool
- Connecting Miners
- Monitoring
- Troubleshooting
- Linux/Windows server (2GB RAM minimum)
- Python 3.8 or higher
- Bitcoin Core (fully synced)
- Root/administrator access (for Bitcoin Core configuration)
The following packages will be automatically installed:
| Package | Purpose |
|---|---|
flask |
Web server for pool interface |
python-bitcoinrpc |
Bitcoin Core RPC communication |
requests |
HTTP client for API calls |
hashlib |
Cryptographic hashing (built-in) |
git clone https://github.com/HugoXOX3/PBpool.git
cd PBpoolpip install -r requirements.txt-
Edit your
bitcoin.conf(usually found in~/.bitcoin/bitcoin.conf):server=1 rpcuser=your_username rpcpassword=your_password rpcallowip=127.0.0.1 txindex=1
-
Restart Bitcoin Core:
bitcoind -daemon
Edit config.json with your preferred settings:
{
"rpc_user": "your_username",
"rpc_password": "your_password",
"rpc_host": "127.0.0.1",
"rpc_port": 8332,
"pool_fee": 0.01,
"min_payout": 0.001,
"pool_port": 3333,
"join_password": "Support_HCMLXOX",
"difficulty": 1024,
"confirmations_required": 100,
"payout_interval": 3600,
"backup_interval": 300
}Start the mining pool server:
python main.pyThe pool will start on port 3333 by default. For production use, consider running it as a service:
nohup python main.py > pool.log 2>&1 &Configure your miner with these settings:
Pool URL: your-server-ip:3333
Username: your bitcoin address
Worker: ANY_STRING
Password: x
-
Clone PythonBitcoinMiner:
git clone https://github.com/HugoXOX3/PythonBitcoinMiner.git cd PythonBitcoinMiner -
Run and type in with your pool configuration:
python SoloMiner.py
-
Work Fetching
PythonBitcoinMiner will call/getwork/<address>to receive:- Block template (version, previous hash, merkle root, etc.)
- Target difficulty
-
Share Submission
The miner will submit solutions to/submit/<address>with:{ "nonce": "discovered_nonce", "hash": "block_header_hash", "height": "current_block_height" } -
Automatic Payouts
The pool's existing payout processor will handle rewards as before, sending BTC to the miner's address when thresholds are met.
- Compatibility: PythonBitcoinMiner uses the same HTTP API as your original client.
- Performance: The miner includes optimizations like multi-threading .
- Persistence: Your pool's
miners.jsontracking remains unchanged. - Security: Password protection (
Support_HCMLXOX) is still enforced.
Check individual miner stats via the pool's existing endpoint:
curl http://localhost:3333/stats/yourminingaddress?password=Support_HCMLXOX- If the miner won't connect, verify:
- The pool URL includes the miner's Bitcoin address.
- The password in
miner_config.jsonmatches the pool'sjoin_password.
- For slow performance, adjust
threadsin the miner config.
curl http://localhost:3333/stats/YOUR_BITCOIN_ADDRESS?password=Support_HCMLXOXtail -f pool.log-
Bitcoin Core not responding
- Verify Bitcoin Core is running:
bitcoin-cli getblockchaininfo - Check RPC credentials in
bitcoin.conf
- Verify Bitcoin Core is running:
-
Connection refused errors
- Ensure firewall allows the pool port (default: 3333)
- Check if the pool is running:
netstat -tulnp | grep 3333
-
Miner not submitting shares
- Verify password is correct
- Check miner logs for error messages
The pool automatically maintains backups of miner data in miners.json.bak. To restore:
cp miners.json.bak miners.json- For high hashrate setups, consider increasing the difficulty in
config.json - Run Bitcoin Core on a separate machine for better performance
- Use a reverse proxy (Nginx) if exposing the pool to the internet
- Change the default password in
config.json - Use HTTPS if exposing the pool publicly
- Regularly backup the
miners.jsonfile - Monitor server resources (CPU/RAM usage)
Happy Mining! ⛏️💰
If you find this project useful, consider supporting it with a Bitcoin donation:
Bitcoin Address: bc1qt7a6vl28czf00vmuse9j7xwpyr7jjt83m2hljh
This project is licensed under the MIT License. See the LICENSE file for details.