Bitcoin Quantum Logo
Documentation

BTQ Mining Guide

Complete guide for setting up your BTQ wallet, running a node, and connecting to the mining pool.

Prerequisites

Required Software

  • BTQ Core daemon (btqd and btq-cli)
  • BTQ-CCMiner (ccminer) - GitHub
  • Access to a BTQ mining pool
i
After downloading the binaries, you must change the file permissions to make them executable using chmod +x.

System Requirements

  • Linux/WSL or UNIX environment (including macOS)
  • NVIDIA GPU with CUDA support (for GPU mining)

Starting BTQ Daemon

1. Create Configuration Directory

Create the BTQ data directory where configuration and blockchain data will be stored:

mkdir -p ~/.btq

2. Create Configuration File

Create the BTQ configuration file at ~/.btq/btq.conf:

Testnet Configuration (Recommended for Testing)
cat > ~/.btq/btq.conf << EOF
# BTQ Configuration File

# Global settings
server=1
daemon=1

# Testnet-specific settings
[test]
rpcuser=btquser
rpcpassword=btqpass123
rpcallowip=127.0.0.1
rpcport=18334
rpcbind=127.0.0.1
port=19333
listen=1
gen=0
maxconnections=50
EOF
Mainnet Configuration
cat > ~/.btq/btq.conf << EOF
# RPC Settings
server=1
rpcuser=btquser
rpcpassword=btqpass123
rpcallowip=127.0.0.1
rpcbind=127.0.0.1

# Network Settings
listen=1

# Other Settings
daemon=1
EOF
!
Security Note: Change rpcuser and rpcpassword to strong, unique values in production!

3. Start BTQ Daemon

Navigate to your BTQ Core directory and start the daemon:

For Testnet
./btqd -daemon -testnet
For Mainnet
./btqd -daemon
For Regtest (Local Testing)
./btqd -daemon -regtest

4. Verify Daemon is Running

# Check blockchain info
./btq-cli -testnet getblockchaininfo

# Check network info
./btq-cli -testnet getnetworkinfo

# View debug log
tail -f ~/.btq/testnet3/debug.log

Creating a Wallet

1. Create a New Wallet

For Testnet
./btq-cli -testnet createwallet "dilithium_wallet"
For Mainnet
./btq-cli createwallet "my_mining_wallet"

Expected output:

{
  "name": "dilithium_wallet"
}

2. Verify Wallet Creation

# List all wallets
./btq-cli -testnet listwallets

# Get wallet info
./btq-cli -testnet -rpcwallet=dilithium_wallet getwalletinfo

3. Backup Your Wallet

# Backup wallet file
cp ~/.btq/testnet3/wallets/dilithium_wallet/wallet.dat ~/wallet_backup_$(date +%Y%m%d).dat

# Or use built-in backup
./btq-cli -testnet -rpcwallet=dilithium_wallet backupwallet ~/wallet_backup.dat
!!
CRITICAL: Store this backup in a secure location. Loss of this file means loss of funds!

Generating Mining Address

BTQ supports quantum-resistant Dilithium addresses. These are recommended for mining.

Dilithium Address (Recommended for Mining)

For Testnet
./btq-cli -testnet -rpcwallet=dilithium_wallet getnewdilithiumaddress
For Mainnet
./btq-cli -rpcwallet=my_mining_wallet getnewaddress "" "dilithium-legacy"

Example output:

n5KchJ9AJaiHRkLpKF7Bx8dbjsgt1CZdC4

Other Address Types

Dilithium Bech32 (Quantum-Resistant, Modern)
./btq-cli -rpcwallet=my_mining_wallet getnewaddress "" "dilithium-bech32"
Legacy (Standard Bitcoin-style)
./btq-cli -rpcwallet=my_mining_wallet getnewaddress "" "legacy"
Bech32 (Native SegWit)
./btq-cli -rpcwallet=my_mining_wallet getnewaddress "" "bech32"

Save Your Address

# Export to a file for safekeeping
./btq-cli -testnet -rpcwallet=dilithium_wallet getnewdilithiumaddress > ~/my_btq_mining_address.txt

# View your address
cat ~/my_btq_mining_address.txt
i
This is where your mining rewards will be sent. Keep it safe!

Connecting to Mining Pool

Mining Pool Details

Pool Address:16.16.123.185
Port:3333

1. Prepare CCMiner

# Change permissions to executable
chmod +x ~/.btq/ccminer

# Install prerequisites (if needed)
sudo apt-get update
sudo apt-get install -y libjansson4

2. Connect to Mining Pool

Basic Command
./ccminer -a sha256d \
  -o stratum+tcp://POOL_IP:PORT \
  -u YOUR_BTQ_ADDRESS \
  -p x
Example with Actual Values
./ccminer -a sha256d \
  -o stratum+tcp://16.16.123.185:3333 \
  -u n5KchJ9AJaiHRkLpKF7Bx8dbjsgt1CZdC4 \
  -p x

3. Expected Output

When successfully connected, you should see:

*** ccminer 2.3.1 for nVidia GPUs by tpruvot@github ***
    Built with the nVidia CUDA Toolkit 11.5 64-bits

[2025-11-24 12:06:48] Starting on stratum+tcp://16.16.123.185:3333
[2025-11-24 12:06:48] NVML GPU monitoring enabled.
[2025-11-24 12:06:48] 1 miner thread started, using 'sha256d' algorithm.
[2025-11-24 12:06:49] Stratum difficulty set to 0.01
[2025-11-24 12:06:49] GPU #0: Intensity set to 25, 33554432 cuda threads
[2025-11-24 12:06:50] GPU #0: NVIDIA GeForce RTX 3090 Ti, 4196.47 MH/s
[2025-11-24 12:06:52] accepted: 1/1 (diff 2.369), 4207.80 MH/s yay!!!

4. Advanced CCMiner Options

Use Specific GPU
./ccminer -a sha256d \
  -o stratum+tcp://16.16.123.185:3333 \
  -u YOUR_ADDRESS \
  -p x \
  -d 0  # Use GPU 0
Adjust Intensity (0-31)
./ccminer -a sha256d \
  -o stratum+tcp://16.16.123.185:3333 \
  -u YOUR_ADDRESS \
  -p x \
  -i 25  # Intensity 25
Run in Background
nohup ./ccminer -a sha256d \
  -o stratum+tcp://16.16.123.185:3333 \
  -u YOUR_ADDRESS \
  -p x > miner.log 2>&1 &

Monitoring Your Mining

Check Wallet Balance

# Check total balance
./btq-cli -testnet -rpcwallet=dilithium_wallet getbalance

# Check unconfirmed balance
./btq-cli -testnet -rpcwallet=dilithium_wallet getunconfirmedbalance

# List recent transactions
./btq-cli -testnet -rpcwallet=dilithium_wallet listtransactions

Understanding Mining Output

MH/sMega-hashes per second (your mining speed)
acceptedNumber of valid shares submitted
diffCurrent difficulty level
yay!!!Successfully found a share/block

Check Network Status

# Current block height
./btq-cli -testnet getblockcount

# Connection count
./btq-cli -testnet getconnectioncount

# Peer info
./btq-cli -testnet getpeerinfo

Troubleshooting

Daemon Won't Start

# Check if already running
ps aux | grep btqd

# Kill existing process
killall btqd

# Check debug log for errors
tail -100 ~/.btq/debug.log

# Start with verbose logging
./btqd -daemon -debug

Can't Connect to Mining Pool

# Test connectivity
ping 16.16.123.185
telnet 16.16.123.185 3333

# Check firewall (if running pool)
sudo ufw status
sudo ufw allow 3333/tcp

Wrong Network Mode

# Check current chain
./btq-cli getblockchaininfo | grep chain

# Stop daemon
./btq-cli stop

# Start in correct mode
./btqd -daemon              # Mainnet
./btqd -daemon -testnet     # Testnet
./btqd -daemon -regtest     # Regtest

RPC Authentication Errors

# Stop daemon
./btq-cli stop

# Edit config and fix credentials
nano ~/.btq/btq.conf

# Restart with explicit credentials
./btqd -daemon -rpcuser=btquser -rpcpassword=btqpass123

Low Mining Performance

# Check GPU usage
nvidia-smi

# Check thermal throttling
nvidia-smi -q -d TEMPERATURE

# Increase intensity (try 25-28)
./ccminer -a sha256d -o ... -i 28

Quick Reference

Network Ports

NetworkRPC PortP2P PortAddress Prefix
Mainnet83349333b, D, dbtc
Testnet1833419333n, tdbt
Regtest1844319444n, rdbt

Common Commands

Wallet Operations
# Create wallet
./btq-cli -testnet createwallet "wallet_name"

# Generate dilithium address
./btq-cli -testnet -rpcwallet=wallet_name getnewdilithiumaddress

# Check balance
./btq-cli -testnet -rpcwallet=wallet_name getbalance

# List transactions
./btq-cli -testnet -rpcwallet=wallet_name listtransactions

# Backup wallet
./btq-cli -testnet -rpcwallet=wallet_name backupwallet ~/backup.dat
Mining Operations
# Start mining
./ccminer -a sha256d -o stratum+tcp://POOL:3333 -u ADDRESS -p x

# Mine in background
nohup ./ccminer -a sha256d -o stratum+tcp://POOL:3333 -u ADDRESS -p x > miner.log 2>&1 &

# Check mining log
tail -f miner.log

# Stop background miner
pkill ccminer
Node Operations
# Start daemon
./btqd -daemon -testnet

# Stop daemon
./btq-cli -testnet stop

# Get blockchain info
./btq-cli -testnet getblockchaininfo

# Get network info
./btq-cli -testnet getnetworkinfo

# View log
tail -f ~/.btq/testnet3/debug.log

Security Best Practices

  • 1.Backup Your Wallet: Always keep encrypted backups in multiple locations
  • 2.Secure RPC: Use strong passwords and restrict RPC access to localhost
  • 3.Firewall: Only open necessary ports (pool ports, P2P if running full node)
  • 4.Keep Private Keys Secure: Never share wallet.dat or private keys
  • 5.Update Regularly: Keep BTQ Core and mining software up to date
  • 6.Monitor Access: Regularly check logs for unauthorized access attempts

Need Help?

Join our Telegram community to get support, report bugs, and connect with other miners.

Join Telegram