Mining NXS with NexusMiner

From Nexus Wiki
Revision as of 10:51, 2 September 2025 by Nhelman64 (talk | contribs) (Added version #)
Jump to navigation Jump to search

Mining NXS with NexusMiner: Step-by-Step Guide

version 9

Welcome to the NexusMiner documentation! This guide will help you get started mining Nexus (NXS) using NexusMiner on supported hardware (FPGA, GPU, CPU). Note: The Prime pool is no longer maintained. You can still mine solo on the PRIME channel, or use the pool for HASH channel mining (mainnet only).


1. Downloading NexusMiner

Windows Users:

  • Visit the NexusMiner Releases page.
  • Download the latest NexusMiner.exe and the default miner.conf.
  • No build is required; you can run the executable directly.

Linux/Other Users:

  • Clone the repository:

<syntaxhighlight lang="bash"> git clone https://github.com/Nexusoft/NexusMiner.git cd NexusMiner </syntaxhighlight>

  • Build using CMake (see section 6).

2. Setting Up miner.conf

Edit miner.conf (provided in releases or repo root) for your setup. Below are minimal examples:

Pool Mining on the Hash Channel (Mainnet Only)

<syntaxhighlight lang="json"> {

   "version" : 1,
   "wallet_ip" : "hashpool.nexus.io",
   "port" : 50000,
   "mining_mode" : "HASH",
   "pool" : {
       "username" : "YOUR_NXS_ADDRESS",
       "display_name" : "YOUR_DISPLAY_NAME",
       "use_deprecated" : false
   },
   "workers" : [
       {
           "worker" : {
               "id" : "myWorker0",
               "mode" : { "hardware" : "gpu", "device": 0 }
           }
       }
   ]

} </syntaxhighlight>

Solo Mining on the Prime or Hash Channel (Mainnet)

<syntaxhighlight lang="json"> {

   "version" : 1,
   "wallet_ip" : "127.0.0.1",
   "port" : 9325,
   "mining_mode" : "PRIME", // or "HASH"
   "workers" : [
       {
           "worker" : {
               "id" : "myWorker0",
               "mode" : { "hardware" : "gpu", "device": 0 }
           }
       }
   ]

} </syntaxhighlight>

Solo Mining on the Prime or Hash Channel (Testnet)

<syntaxhighlight lang="json"> {

   "version" : 1,
   "wallet_ip" : "127.0.0.1",
   "port" : 8325,
   "mining_mode" : "PRIME", // or "HASH"
   "workers" : [
       {
           "worker" : {
               "id" : "myWorker0",
               "mode" : { "hardware" : "gpu", "device": 0 }
           }
       }
   ]

} </syntaxhighlight> Template:Note

  • wallet_ip: For solo mining, use 127.0.0.1 (or your core’s IP); for pool mining (mainnet), set to the pool address.
  • port:
    • Use 9325 for solo mining on mainnet.
    • Use 8325 for solo mining on testnet.
    • Use 50000 for hashpool (mainnet only).
  • username: Enter your Nexus wallet address to receive mining rewards (pool/mainnet only).
  • workers: Configure for your hardware.

Example: Enabling Logging To enable detailed logging and statistics, add the following to your miner.conf:

<syntaxhighlight lang="json"> "logfile" : "miner.log", "log_level" : 2, "stats_printers" : [

   {
       "stats_printer" : {
           "mode" : "console"
       }
   },
   {
       "stats_printer" : {
           "mode" : "file",
           "filename" : "stats.log"
       }
   }

], </syntaxhighlight>


3. Setting Up Your Nexus Wallet or Headless Core

For Solo Mining (Prime or Hash Channel):

  • Use Nexus Core version 5.1.5 or later.
  • Unlock your wallet for mining.
  • Edit nexus.conf to enable mining:

<syntaxhighlight lang="ini"> mining=1 </syntaxhighlight>

  • If mining locally (same machine): nothing else is required.
  • If mining over LAN: add to nexus.conf:

<syntaxhighlight lang="ini"> llpallowip=<miner_ip>:<port> </syntaxhighlight>

    • On mainnet, the default port is 9325.
    • On testnet, the default port is 8325.

Example: llpallowip=192.168.0.100:9325

  • Ensure the port in miner.conf matches the port your wallet/core is listening on.

For Pool Mining (Hash Channel, Mainnet Only):

  • No special changes are required to your wallet or nexus.conf.
  • Just ensure the username field in miner.conf is set to your Nexus wallet address.

4. Running NexusMiner

Windows:

  • Double-click NexusMiner.exe or run from the command line:

<syntaxhighlight lang="bash"> NexusMiner.exe </syntaxhighlight>

Linux:

  • After building, run:

<syntaxhighlight lang="bash"> ./NexusMiner </syntaxhighlight>

Command-line Options:

  • Specify a config: ./NexusMiner my_miner.conf
  • Check config only: ./NexusMiner my_miner.conf -c
  • Show version: ./NexusMiner -v

5. Monitoring and Logging

  • Logs are written to miner.log (path and level set in miner.conf via "logfile" and "log_level").
  • Additional statistics can be printed to console or files as configured under stats_printers.
  • Important:
 Every time you run NexusMiner, it will overwrite the contents of both miner.log and any file specified for statistics logging (such as stats.log).  
 If you want to preserve logs from previous runs, be sure to copy or rename them before starting the miner again.

Example configuration for logging: <syntaxhighlight lang="json"> "logfile" : "miner.log", "log_level" : 2, "stats_printers" : [

   {
       "stats_printer" : {
           "mode" : "console"
       }
   },
   {
       "stats_printer" : {
           "mode" : "file",
           "filename" : "stats.log"
       }
   }

] </syntaxhighlight>


6. Building NexusMiner (Linux/Advanced Users)

Build options are available if you want to compile from source:

  • Requires CMake, C++ compiler, and optionally CUDA Toolkit (for Nvidia GPUs).
  • From the repo directory:

<syntaxhighlight lang="bash"> mkdir build cd build cmake .. -DWITH_GPU_CUDA=ON # Enable Nvidia GPU mining make </syntaxhighlight>

  • See repository README for more advanced build options and FPGA instructions.

7. Additional Resources


Troubleshooting

  • Ensure your wallet address is correct in miner.conf.
  • For solo mining, make sure your wallet/core is running, unlocked, and accessible with the correct port and IP.
  • Refer to logs (miner.log) for error messages.

Happy Mining!