How to Mine Bitcoin2 (BC2) on Windows Using Bitaxe and a Self-Hosted Node
Introduction
This guide explains how to set up your own Stratum server to solo mine Bitcoin2 (BC2) with your Bitaxe Gamma (or any other Stratum-compatible ASIC miner).
Benefits of solo mining:
No pool fees (100% of rewards for you)
Full control over your mining operation
Support the network by validating transactions
Complete learning experience
Requirements
A Windows/Linux PC with Python 3.7+
A Bitaxe (Gamma, Supra, Ultra, or other Stratum ASIC)
Bitcoin2-qt (BC2 full node wallet)
Stable network connection
Step 1: Installing Bitcoin2-qt
Download
1.Visit the official Bitcoin2 website or GitHub repository
2.Download Bitcoin2-qt (bitcoinII-qt)
4.Install the application
Synchronization
Important: Let the node fully synchronize with the BC2 network. This may take several hours depending on your connection speed.
Step 2: Configuring Bitcoin2-qt
First go on the node app then settings, make sure server rpc is checked else do it.
Locate the configuration file
Windows: %APPDATA%\BitcoinII\bitcoinII.conf
Windows: %APPDATA%\BitcoinII\bitcoinII.conf
Linux: ~/.bitcoinII/bitcoinII.conf
Linux:~/.bitcoinII/bitcoinII.conf
If the file doesn’t exist, create it.
Add these lines
ini
PlainBashC++C#CSSDiffHTML/XMLJavaJavaScriptMarkdownPHPPythonRubySQL
PlainBashC++C#CSSDiffHTML/XMLJavaJavaScriptMarkdownPHPPythonRubySQL
server=1
rpcuser=your_rpc_username
rpcpassword=your_secure_rpc_password
rpcallowip=127.0.0.1
rpcport=8332
Tip: Use a strong, unique password!
Restart Bitcoin2-qt
Completely close the application and restart it to apply the changes.
Step 3: Installing Python
If you don’t have Python
Windows:
1.Download Python from python.org
2.Check “Add Python to PATH” during installation
3.Verify: open CMD and type python --version
Install dependencies
Open a terminal/command prompt and type:
bash
PlainBashC++C#CSSDiffHTML/XMLJavaJavaScriptMarkdownPHPPythonRubySQL
PlainBashC++C#CSSDiffHTML/XMLJavaJavaScriptMarkdownPHPPythonRubySQL
pip install requests
Step 4: The Python Script
Create the file
Create a file named bc2_stratum_server.py and copy the script provided below.
Configure the script
Modify these lines at the beginning of the script according to your setup:
python
PlainBashC++C#CSSDiffHTML/XMLJavaJavaScriptMarkdownPHPPythonRubySQL
PlainBashC++C#CSSDiffHTML/XMLJavaJavaScriptMarkdownPHPPythonRubySQL
RPC_USER = “your_rpc_username”
# Same as bitcoinII.conf
RPC_PASSWORD = “your_rpc_password”
# Same as bitcoinII.conf
RPC_PORT = 8332
# RPC port (usually 8332)
STRATUM_PORT = 3333
# Port for your Bitaxe
Vardiff parameters (optional)
You can adjust the variable difficulty:
python
PlainBashC++C#CSSDiffHTML/XMLJavaJavaScriptMarkdownPHPPythonRubySQL
PlainBashC++C#CSSDiffHTML/XMLJavaJavaScriptMarkdownPHPPythonRubySQL
TARGET_SHARE_TIME = 15
# Shares every 15 seconds (adjust to preference)
VARDIFF_MIN = 100
# Minimum difficulty
VARDIFF_MAX = 100000
# Maximum difficulty
Step 5: Launch the Stratum Server
Windows
1.Open Command Prompt (CMD)
2.Navigate to the script folder: cd C:\path\to\script
3.Run: python bc2_stratum_server.py
You should see
PlainBashC++C#CSSDiffHTML/XMLJavaJavaScriptMarkdownPHPPythonRubySQL
PlainBashC++C#CSSDiffHTML/XMLJavaJavaScriptMarkdownPHPPythonRubySQL
============================================================
Stratum Server Bitcoin2 for Bitaxe
============================================================
Get PunkBLC’s stories in your inbox
Join Medium for free to get updates from this writer.
🔍 Testing connection to Bitcoin2 node…
✅ Connection to node successful!
Blocks: 50303
Version: 290100
Connections: 7
✅ Stratum server started on 0.0.0.0:3333
📡 Configure your Bitaxe Gamma with:
URL: stratum+tcp://192.168.1.12:3333
User: bc2miner
Password: x
⏳ Waiting for connection…
Step 6: Configure Your Bitaxe
Access the web interface
1.Find your Bitaxe’s IP (check your router)
2.Open a browser: http://[BITAXE_IP]
Pool configuration
In the Bitaxe interface, configure:
URL: stratum+tcp://[YOUR_PC_IP]:3333
User: bc2miner (or any name)
Password: x (or anything)
Find your PC’s IP:
Windows: ipconfig in CMD
Linux: ip addr or ifconfig
Save and restart
The Bitaxe should connect within seconds!
Step 7: Firewall Configuration
Windows Defender
If your Bitaxe won’t connect:
1.Open Windows Firewall (Windows key + R → wf.msc)
2.Inbound Rules → New Rule
3.Type: Port
4.TCP, port: 3333
5.Allow the connection
6.All profiles
7.Name: “Bitcoin2 Stratum Server”
Avast / Other antivirus
Add an exception for:
The Python script (bc2_stratum_server.py)
Or TCP port 3333
Verification
In the Python terminal
You should see:
PlainBashC++C#CSSDiffHTML/XMLJavaJavaScriptMarkdownPHPPythonRubySQL
PlainBashC++C#CSSDiffHTML/XMLJavaJavaScriptMarkdownPHPPythonRubySQL
🔌 New connection detected: (192.168.1.25, 51234)
✅ Worker authorized: bc2miner.BigAxe
📤 Job 1 sent to 192.168.1.25:51234
✨ Share #1 from bc2miner.BigAxe (Diff: 1000) — Avg time: 12.3s
🎯 Difficulty adjustment for bc2miner.BigAxe:
1000 → 1500 (avg time: 10.2s, target: 15s)
On the Bitaxe interface
- Hashrate: ~1.2 TH/s (Gamma)
- Shares: Increasing regularly
- Block Header: Shows Height, Difficulty, Scriptsig
- Status: Connected
🎁 If You Find a Block
Rewards will go directly to your Bitcoin2-qt wallet!
With current difficulty (~38 billion) and a Bitaxe Gamma (~1.2 TH/s), finding a block may take years, but it’s possible! 🍀
🔧 Troubleshooting
Script won’t start
- ✅ Verify Bitcoin2-qt is running
- ✅ Check RPC credentials in
bitcoinII.conf - ✅ Verify Python and
requestsare installed
Bitaxe won’t connect
- ✅ Check your PC’s IP address
- ✅ Temporarily disable firewall to test
- ✅ Verify port 3333 isn’t in use:
netstat -an | findstr :3333
No shares
- ✅ Is the Bitaxe properly configured?
- ✅ Check Python script logs
- ✅ Restart the Bitaxe
“HTTP 401” error
- ✅ RPC credentials don’t match
- ✅ Check
bitcoinII.confand Python script - ✅ Restart Bitcoin2-qt after modifications
📊 Statistics and Monitoring
The script displays in real-time:
- ✨ Accepted shares with average time
- 🎯 Automatic difficulty adjustments
- 🔄 New blocks detected on the network
- 📋 Jobs sent to Bitaxe
💡 Tips
- Run 24/7 to maximize your chances
- Monitor temperature of your Bitaxe
- Backup your wallet regularly
- Join the BC2 community to stay informed
🤝 Contributing
If you improve the script or find bugs, feel free to share!
⚠️ Disclaimer
Solo mining is highly random. Don’t count on regular income. This tutorial is for educational purposes and to support the Bitcoin2 network.
Source: reddit user Witty-Grab-8325
Article source:PunkBLC,A Home for Lottery Miner Enthusiasts






