Mining on Lium Compute Subnet
Introduction​
Welcome to the Lium Compute Subnet mining guide. This subnet enables GPU owners to contribute computational resources to a decentralized network and earn TAO rewards. As a miner, you'll operate a distributed infrastructure consisting of a central miner server (CPU-based) that manages multiple GPU nodes.
Prerequisites​
Before you begin mining on the Lium subnet, ensure you understand:
- Bittensor fundamentals: Familiarize yourself with hotkeys, coldkeys, and wallet management
- Subnet economics: Understand how rewards are distributed based on validator stake
- Technical requirements: Basic Linux administration and Docker knowledge
Never place your coldkey on a mining server. Coldkeys should only exist on secure, offline machines. Mining operations only require hotkeys.
Architecture Overview​
The Lium mining system consists of two components:
- Central Miner Server: A lightweight CPU server that coordinates your mining operations
- GPU Nodes: One or more GPU-equipped machines that perform actual computations
System Requirements​
Central Miner Server​
The central miner requires minimal resources:
Component | Minimum | Recommended |
---|---|---|
CPU | 4 cores | 8 cores |
RAM | 8 GB | 16 GB |
Storage | 50 GB | 100 GB SSD |
Network | 100 Mbps | 1 Gbps |
OS | Ubuntu 20.04+ | Ubuntu 22.04 |
GPU Nodes​
Each node must have compatible GPUs. View the current GPU rewards and compatibility matrix in the official constants file.
Higher-tier GPUs (A100, H100) typically earn more rewards but require proportionally higher investment. Choose GPUs based on your budget and expected ROI.
Installation Guide​
Step 1: Prepare Your Environment​
First, clone the Lium Compute Subnet repository:
git clone https://github.com/Datura-ai/compute-subnet.git
cd compute-subnet
Step 2: Install Dependencies​
Run the installation script to set up required tools:
chmod +x scripts/install_miner_on_ubuntu.sh
./scripts/install_miner_on_ubuntu.sh
Verify the installation:
# Check Bittensor CLI
btcli --version
# Check Docker
docker --version
If either tool is missing:
- Bittensor: Follow the official installation guide
- Docker: Install using Docker's documentation
Step 3: Configure Your Miner​
Create your configuration file from the template:
cp neurons/miners/.env.template neurons/miners/.env
Edit the .env
file with your specific settings:
# Your Bittensor wallet name (check with: btcli wallet list)
BITTENSOR_WALLET_NAME=your_wallet_name
# Your hotkey name (must be registered on subnet 51)
BITTENSOR_WALLET_HOTKEY_NAME=your_hotkey_name
# External IP address of this server (must be publicly accessible)
EXTERNAL_IP_ADDRESS=your.server.ip.address
# Path to your Bittensor wallet directory
HOST_WALLET_DIR=/home/your_user/.bittensor/wallets
# Network ports (ensure EXTERNAL_PORT is open in firewall)
INTERNAL_PORT=8000
EXTERNAL_PORT=8000
Ensure your EXTERNAL_PORT
is:
- Open in your firewall/security groups
- Not blocked by your ISP
- Properly forwarded if behind NAT
Step 4: Register Your Hotkey​
If you haven't already registered your hotkey on subnet 51:
btcli subnet register --netuid 51 --wallet.name <your_wallet> --wallet.hotkey <your_hotkey>
Registration requires a dynamic TAO fee that fluctuates based on network demand. Check current costs before registering.
Step 5: Start the Central Miner​
Launch your miner using Docker Compose:
cd neurons/miners
docker compose up -d
Verify the miner is running:
docker compose ps
docker compose logs -f
Managing GPU Nodes​
Adding an Node​
To add a GPU node to your mining operation:
-
Set up the node machine following the node setup guide
-
Choose a validator hotkey based on stake distribution at TaoMarketCap
-
Register the node with your central miner:
docker exec <miner_container> python /root/app/src/cli.py add-executor \
--address <node_ip> \
--port <node_port> \
--validator <validator_hotkey>
Parameters:
<miner_container>
: Your miner container name/ID (find withdocker ps
)<node_ip>
: Public IP address of the node machine<node_port>
: Node's listening port (default: 8001)<validator_hotkey>
: The validator's SS58 hotkey address
Removing an Node​
To remove an node from your pool:
docker exec <miner_container> python /root/app/src/cli.py remove-executor \
--address <node_ip> \
--port <node_port>
Switching Validators​
To reassign an node to a different validator:
docker exec -it <docker_instance> pdm run /root/app/src/cli.py switch-validator \
--address <node_ip> \
--port <node_port> \
--validator <validator_hotkey>
Monitoring and Maintenance​
Track Your Performance​
Monitor your mining rewards and performance:
- Real-time metrics: TaoMarketCap Subnet 51 Miners
- Check your UID status:
btcli wallet overview --netuid 51
View Miner Logs​
# View recent logs
docker compose logs --tail=100
# Follow logs in real-time
docker compose logs -f
# Check specific node connections
docker exec <miner_container> python /root/app/src/cli.py list-executors
Common Issues and Solutions​
Issue | Solution |
---|---|
Node not connecting | Verify firewall rules and network connectivity |
Low/no rewards | Check validator assignments match stake distribution |
Miner container crashes | Review logs and ensure wallet files are accessible |
Registration failed | Ensure sufficient TAO balance for registration fee |
Security Best Practices​
-
Key Management
- Store coldkeys offline in secure locations
- Only deploy hotkeys to mining servers
- Regularly rotate compromised keys
-
Network Security
- Use firewalls to restrict access to mining ports
- Implement SSH key authentication
- Keep systems updated with security patches
-
Operational Security
- Monitor for unusual activity
- Set up alerts for node disconnections
- Maintain backups of configuration files
Economic Considerations​
Understanding Rewards​
Your mining rewards depend on:
- Number and quality of GPU nodes
- Proper validator assignment strategy
- Network competition and total hashrate
- Subnet emission schedule
Risks and Deregistration​
Miners with consistently low performance may be deregistered from the subnet. This occurs when:
- Your emissions rank in the bottom of active miners
- A new miner registers and you have the lowest score
- You fail to maintain minimum performance standards
ROI Calculation​
Before investing in mining infrastructure, consider:
- Hardware costs (GPUs, servers, networking)
- Operational expenses (electricity, bandwidth, maintenance)
- Current TAO price and emission rates
- Competition from other miners
Getting Help​
Resources​
- GitHub Repository: Compute Subnet
- Discord Community: Lium Support Channel
- Email Support: support@lium.io
Troubleshooting Checklist​
Before requesting support, verify:
- Hotkey is registered on subnet 51
- Docker containers are running
- Network ports are open and accessible
- Nodes are properly assigned to validators
- Wallet files have correct permissions
Next Steps​
After successfully setting up your miner:
- Add GPU Nodes: Follow the node setup guide
- Monitor Performance: Track your rewards and adjust as needed
- Scale Operations: Add more nodes as you validate profitability
- Join Community: Engage with other miners in Discord for tips and updates
This documentation is maintained by the Lium team and community. For corrections or improvements, please submit a pull request.