How to mine RandomSFX with my computer

This is a work in progress article whilst we’re making the necessary tools and changes for you to mine the new RandomSFX mining algorithm.

RandomSFX is a variation of the RandomX algorithm which enables more people than ever before to compete in the mining of Safex Cash.

The algorithm is designed to remove the threat of ASICs and hash rental services that make the network uncompetitive for everyday miners. You could say that the design of RandomX is so inefficient, that it’s not cost effective, or maybe not even possible to design ASIC chips to mine RandomX coins.

Tools of the trade
Because RandomSFX is a modified version of RandomX, it’s not currently supporting in the usual mining softwares (XMRig, XMR-Stak, etc).

Therefore, the team has built a custom fork of XMRig called Safex-Rig which supports CPU, AMD and Nvidia mining.

Compile guides can be found here: - Note, make sure you’re cloning git clone and not the one in the wiki (we’ve still to make the necessary editorial changes, but everything else remains the same).

If you’re already familiar with XMRig, the commands are exactly the same. The only thing you will need to consider is the specific algorithm for Safex which is rx/sfx.

Building Safex-Rig Miner - Ubuntu
At the time of writing this, there are no pre-compiled binaries of the Safex-Rig mining software. You will need to compile your own copy of our special fork of XMRig, called Safex-Rig.

Building Safex-Rig is the same process as cloning and building the XMRig repository.

sudo apt-get install git build-essential cmake libuv1-dev libssl-dev libhwloc-dev
git clone
cd xmrig && mkdir build && cd build
cmake ..

Building Safex-Rig Miner - Windows
Building in Windows is a little more complicated than Ubuntu. Full instructions can be found here:

Note: Make sure you swap any reference to the XMRig github with our repo instead

Safex Cash Testnet Pool
A temporary testnet mining pool has been set up for you to test your Safex-Rig miner configuration. A few things to note:

  • This is a testnet pool, and the SFX you mine on here has no value
  • You need to mine to a testnet address. An example Testnet address is SFXtzS2TXfSZu4XJh8sRNsF7iqe66dWX8NByr3CGDwM45Bo8tbsNuwffaTbjSr6Eqd9ihBB3WmTB3ftS4aNqDz9EMapGkh6FJKG
  • You need to set your algorithm to rx/sfx to mine RandomSFX
  • You will NEED to be using the Safex-Rig build to mine RandomSFX as it is not yet implemented in the main XMRig software.

Pool mining with Safex-Rig - Ubuntu
As menitoned, Safex-Rig runs in the same fashion as XMRStak. To mine from a Safex Cash pool with the new miner, the only major configuration option you need to ensure is set is the mining algorithm choice - rx/sfx.

Example configuration to mine the RandomSFX testnet pool:

./xmrig -o -u SFXtzS2TXfSZu4XJh8sRNsF7iqe66dWX8NByr3CGDwM45Bo8tbsNuwffaTbjSr6Eqd9ihBB3WmTB3ftS4aNqDz9EMapGkh6FJKG -a rx/sfx

-o = Pool URL, in this instance it’s the testnet pool IP address, but could be in the future.

-u = Your Safex Cash address, in this instance it’s a testnet address. You would use your normal Safex address once RandomSFX is on the mainnet.

-a = Algorithm, set to rx/sfx. Depending on the pool you use, sometimes you don’t need to explicitly set the algorithm as it will auto-detect. This is just a failsafe to ensure it works correctly.


  • Solo Mining - Node
  • Solo Mining - Node + Safex-Rig
  • 1 Click Miner App
  • Updated Safex Cash mining pool list
  • Computer hardware performance chart

Change log

  • Added preliminary testnet pool details [01/12/2019]
  • Added details about compiling Safex-Rig miner [01/12/2019]
  • Added miner config details for Safex-Rig [01/12/2019]

Need help in setting up my miner in a Windows system. If you are close to coming up with a more detailed step by step instructions, or if it’s not suppose to work yet at this time, you can ignore this reply. I can wait for the instructions or when it’s ready. Otherwise, I’d appreciate some help. (Disclaimer: I don’t have any coding background but I was able to setup mining Ethereum two years ago and had been mining safex via XMRig for sometime now.)

I’m following the instructions from the link you included in the article for Windows system ( but I’m stuck on the following:

CMake build:

mkdir build
cd build
cmake .. -G "Unix Makefiles" -DXMRIG_DEPS=c:/xmrig-deps/gcc/x64

MSYS2 is returning the error “bash: cmake: command not found” - see picture below

Also, I’m mining with NVIDIA GPUs and I downloaded the CUDA plugin but have no idea on what to do with those files. Do I copy the files to the “safex-rig” folder (I cloned the binaries)?

I don’t even see an executable file (*.exe) inside the safex-rig folder. How do I even run the miner? (is that what the MSYS2 steps are for? to run the miner?). Hoping for enlightenment!

Looks like you are missing CMake on the path. It’s a program you can download for free. Sorry, I don’t have time to elaborate any further, I also still have to run everything.


OK I tried to follow the directions for MSYS on windows building of XMR-rig (safex port of it)

All ok till the cmake & build
I even downloaded the dependencies and put them into the referenced directory (c:/xmrig-deps)


cd build 
cmake .. -G "Unix Makefiles" -DXMRIG_DEPS=c:/xmrig-deps/gcc/x64

cmake has no output and “make” simply says No targets specified and no makefile found

Which is what I’d expect from those directions but is no good for building this

you need to do

pacman -S cmake

I did “pacman -S cmake” but “make” still says No targets specified and no makefile found

It must be missing another step.
The safex-rig is located at C:\Users\d3LLMiner\Documents\GitHub\safex-rig
I also downloaded the CMake program that Greetzkenny suggested and is at C:\Program Files\CMake (but I don’t think I need this)
Thanks for the help.


As I was unaware of what MINGW actually is, you are right, you don’t need to download CMake yourself.
As we speak, I am running the “make” command, so if something fails after that, I have no solution for that (yet).

What I did:

  1. I downloaded the zip file from
  2. I unpacked the zipfile somewhere (as far as I know, you can unzip wherever you want).
  3. I downloaded MINGW and started “C:\msys64\msys2_shell.cmd -mingw64” (note that I’m running the command with a parameter, which is what happens when I run a shortcut that was created while installing MINGW.
  4. I run these commands as given:
pacman -Sy
pacman -S mingw-w64-x86_64-gcc
pacman -S make
pacman -S mingw-w64-x86_64-cmake
pacman -S mingw-w64-x86_64-pkg-config
  1. I put my MINGW64 shell to point at the directory where I unzipped the Safex-rig-master. Thus: I was currently in the directory that contains folders like “src”, “.gitignore”, “scripts”, “package.json”, “README.MD”, etc.
  2. This directory also contains “CMakeLists.txt”. I opened it with Notepad ++.
  3. As per, I changed line 5 from ON to OFF:
    option(WITH_HWLOC "Enable hwloc support" OFF)
  4. I then followed these commands:
mkdir build
cd build
cmake .. -G "Unix Makefiles" -DXMRIG_DEPS=c:/xmrig-deps/gcc/x64
  1. I created a config.json in the exact same folder where my xmrig.exe lives (in the “build” folder). I used this example ( and I inserted my own wallet address.

  2. I also followed the first two answers of this page:

  3. I now have a working xmrig.exe.


Test net starts ./x mr igo Sfxtzs2txfszu4xjh8srnsf7iqe66dwx8nbyr3cgdwm45bo8tbsnuffatbjsr6eqd9ihbb3wmtb3fts4anqdz9emapgkh6fjkg-a rx/sfx but on pool pool. safexnews. net:4444 no

The pool is currently offline for maintenance

Done the rest and these do not do anything except make says nothing to do

Awesome! Followed everything to the letter and got a working xmrig.exe CPU mining.
Now I do have 5 Nvidia GTX 1070s in my mining rig.
I believe I was able to install the CUDA add-on correctly but now I need some guidance with the config.json. I ‘enabled’ CUDA but I’m receiving an error CUDA disabled (no device detected)

Anybody has one I can use as a template? Thanks.