How to Set Up a Miner on NI Compute (SN27)?

Feb 10, 2025

💻 Getting Started

NI Compute (SN27) is a decentralized compute network where contributors can offer their GPU power and earn rewards. Here’s a comprehensive guide to getting started as a miner on NI Compute (SN27).

📌 What You’ll Need to Begin

  • Hardware: GPUs like NVIDIA H200, H100 & A100 (see GPU scoring below).

  • Software: Ubuntu 22.04 (recommended) or higher, Python 3.10 or higher

  • Network Access: Ensure an open SSH port and proper firewall setup. Important to Note: Each UID is limited to one external IP. Port 4444 is to be opened so your miner can be allocated properly unless specified in PM2 below.

  • $TAO: To register your hotkey.

  • Wandb API Key: For tracking miner performance.

🌐 Step-by-Step Miner Setup

Install Docker

A Docker environment is required for miner resource allocation:

  1. Install Docker on Ubuntu: Official Docs


  1. Verify Docker:

docker run hello-world

This should display a confirmation message with no errors.

Install Bittensor

  1. Run the one-line installer:

/bin/bash -c "$(curl -fsSL <https://raw.githubusercontent.com/opentensor/bittensor/master/scripts/install.sh>
  1. Verify Installation:

If you get a command-not-found error, add Bittensor to your PATH:


Which will give you an output similar to below:

usage: btcli <command> <command args>

See Bittensor’s documentation for alternative installation instructions. Bittensor Documentation

Create or Regenerate Keys

  1. Create new coldkey (stores funds):

  1. Create new hotkey (used for daily operations e.g. mining/validating/registration):

  1. Regenerate existing keys if needed (to import them on this machine):


Tip: For security, you can generate your coldkey on a secure offline machine and only load the public portion onto your miner or validator servers.

Clone and Install Compute Subnet

  1. Clone the repository:

git clone <https://github.com/neuralinternet/compute-subnet.git>

  1. Install dependencies: required Python packages.


  1. In case you have missing requirements: Install additional system libraries.

CUDA Toolkit and GPU Drivers

Tip: If Nvidia toolkit and drivers are already installed on your machine, scroll down to step 5 to verify then move on to the docker CUDA support.

  1. Download the latest CUDA from NVIDIA's official page.

  2. Install (example for Ubuntu 22.04 (Dec. 2024)):

wget <https://developer.download.nvidia.com/compute/cuda/12.3.1/local_installers/cuda-repo-ubuntu2204-12-3-local_12.3.1-545.23.08-1_amd64.deb>

  1. Set environment variables:


  1. Reboot to finalize changes:

  1. Verify driver and CUDA:


The output of which should look something like:



NVIDIA Docker Support

Enable GPU functionality within Docker containers:

distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L <https://nvidia.github.io/nvidia-docker/gpgkey> | sudo apt-key add -
curl -s -L <https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list> \\

WandB Setup

  1. Create a free WandB account: wandb.ai

  2. Obtain an API Key and place it into your .env file:


  1. Monitor stats at WandB: neuralinternet/opencompute

PM2 Setup

PM2 Process Manager monitors the operation and helps keep your miner or validator running persistently.


Confirm pm2 is installed and running correctly:

Networking and Firewall

Open necessary ports:

  1. Install and configure ufw:


Tip: You can open any ports: sudo ufw allow xxxx/tcp and use them as your axon.port default e.g. sudo ufw allow 8091/tcp and this port would be specified in your pm2 miner process arguments as --axon.port 8091. If you are using a cloud server it is a good idea to check with your provider if ports are open by default. If you can create your own network rules make sure these inbound rules are applied to the server. Ask your provider for assistance with this networking step.

  1. Add user to docker group (if not already):


Registering Your Hotkey

You need $TAO tokens in your coldkey to register the hotkey on the chosen netuid.

  • Main Network (netuid = 27, known as finney):

  • Test Network (netuid = 15, known as test):

If you get the error too many registrations this interval, wait for the next interval and retry.

Registration cost can be checked Here. Or check using the CLI w/ btcli s list (Cost is 'RECYCLE').

Running a Miner

The miner contributes GPU resources to the network. Make sure your ports are open and your environment is set up as described above.

General Miner Command:

pm2 start ./neurons/miner.py --name <MINER_NAME> --interpreter python3 -- \\
  --netuid 27 \\
  --subtensor.network finney \\
  --wallet.name <COLDKEY_NAME> \\
  --wallet.hotkey <HOTKEY_NAME> \\
  --axon.port 8091 \\

  • -netuid: Subnet ID (27 for main, 15 for test).

  • -subtensor.network: Your Bittensor chain endpoint.

    • Main: finney

    • Test: test

    • Or use a custom endpoint, e.g. subvortex.info:9944 (recommended)

  • -wallet.name & -wallet.hotkey: The coldkey/hotkey names you created above and used in registration (btcli's defaults are default and default but both can be freely customized)

  • -axon.port: default 8091 can be replaced with any port number allowed by ufw as instructed above to serve your axon. Important for proper functionality and miner<->validator communication.

  • -ssh.port: A port opened with UFW as instructed above under the Networking and Firewall section (e.g., 4444) used for allocating your miner via ssh.

Miner Options

  • -miner.whitelist.not.enough.stake: Whitelist validators lacking sufficient stake (default: False).

  • -miner.whitelist.not.updated: Whitelist validators not on the latest code version (default: False).

  • -miner.whitelist.updated.threshold: Quorum threshold (%) before starting the whitelist (default: 60).

Checking Miner Logs

To inspect your miner’s logs:


  • pm2 logs shows rolling log output.

  • pm2 monit provides a live interface with CPU usage, memory, etc.

Run pm2 logs to debug any issues and view information on your miner. Specifically, find your wandb run to view more live information. In the wandb project, you can view the scores you receive from validators.

pm2 miner logs:

You can view your scores through the Wandb run of a Validator:

Expand the stats section:

Find your miner UID:

🔧 Troubleshooting

No requests received (no ‘Challenge’ or ‘Specs’ events):

  • Check your open ports (default allocation port: 4444). Check your Axon port is open with your machine or cloud provider. Use pm2 describe <PROCCESS_NAME> and pm2 show <PROCCESS_NAME> to view the arguments you used to run your miner e.g. -axon.port and -ssh.port and check with sudo ufw status that the right ports are open with UFW as well.

  • Check your pm2 logs for any errors or tracebacks to help troubleshoot.

  • Ensure the miner is running properly and not blacklisted.

Deregistered unexpectedly:

  • Competition on the network is high; more powerful devices may outcompete you.

  • Connection or environment issues.

  • Make sure scripts and Docker containers are running stably.

🔧 GPU Recommendations

Performance-based rewards depend on the GPU’s compute power. Here's a list of all the GPUs that are supported on NI Compute (SN27).

💡 Tips for Success

  • Use in-house hardware for better control and rewards.

  • Recommended cloud providers: Oracle, Coreweave, Latitude.sh (use referral code: BITTENSOR27).

Setting up a miner on Subnet 27 is your gateway to decentralized compute. By contributing your GPU power, you play a vital role in enabling scalable, permissionless computing for machine intelligence. Ready to start? Dive in now! 🌐✨

Note: This article is a condensed version of the full documentation on our website. For complete details, click here.