Mining XDAG on HiveOS

FSOL
3 min readMar 17, 2023

--

You can already mine XDAG with HiveOS. For this you use SRBMiner or XMRIGCC. So nothing new.

However it is now possible to mine with the official XMRIG fork that the XDAG devteam has specially designed. It is globally more stable than the other two, with an almost identical h/s.

The method proposed here will allow to inject a version of this “special XDAG” miner in HiveOS instead of the “classic” XMRIG.

Here is how to install it.

1°/ Create a flysheet

Create a flysheet with the following information:

  • Specify your wallet, pool, and worker name as password.
  • Activate “CPU on”.
  • For the miner, choose “XMRig-new” and as fork “XMRig” (not XMRig-CC)

2°/ Inside HiveOS

  • Open a terminal window and type the following commands to retrieve the miner’s file :
cd tmp
wget https://github.com/XDagger/xmrig2xdag/releases/download/v1.1.4/hiveos_rig_no_fee_v6.18.0.zip
unzip hiveos_rig_no_fee_v6.18.0.zip
  • Stop miners :
miner stop
  • Copy the miner to the right place in HiveOS :
cp xmrig /hive/miners/xmrig-new/xmrig/6.19.0/
  • Edit the 2 following files to set the fees to zero, which will avoid regular disconnections to the pool and thus stabilize the mining :
nano /run/hive/miners/xmrig-new/config.json
nano /hive/miners/xmrig-new/xmrig/6.19.0/config_global.json

Note: it is important to make also the file “config-global.json” because its parameters are systematically taken again during the starting of the miner.

  • Restart miners :
miner start

That’s it, it’s over, and thanks to the “motd watch” command you can make sure that it’s the special XDAG miner that is running.

[Bonus] Compile the miner under HiveOS

If you are a furious g33k, you might want to compile the miner by yourself instead of installing the version I suggest.

In this case, here is the procedure :

1°/ Create a flysheet

Refer to the same point above.

2°/ Inside HiveOS

  • We retrieve the sources :
sudo apt-get install git build-essential cmake automake libtool autoconf
cd tmp
git clone --branch xdag https://github.com/swordlet/xmrig.git
  • Set the fees to zero in the source by editing the following file :
nano xmrig/src/donate.h
  • Let’s start to compiling :
mkdir xmrig/build && cd xmrig/scripts
./build_deps.sh && cd ../build
cmake .. -DXMRIG_DEPS=scripts/deps
make -j$(nproc)
  • Stop miners :
miner stop
  • Copy the miner to the right place in HiveOS :
cp xmrig /hive/miners/xmrig-new/xmrig/6.19.0/
  • Edit the following 2 files to set the fees to zero:
nano /run/hive/miners/xmrig-new/config.json
nano /hive/miners/xmrig-new/xmrig/6.19.0/config_global.json
  • And let’s restart miners :
miner start

I hope you will find this tutorial useful. See you soon!

Thanks to the testers who allowed me to test it: AnonymousRed049, Hell, Lfabrice3, nj1337 and ToF.

--

--