# How to solo mine Safex Cash with my computer

**URL:** <https://forum.safex.org/t/how-to-solo-mine-safex-cash-with-my-computer/6786>\
**Category:** Mining\
**Created:** [December 11, 2019, 11:10pm UTC](https://forum.safex.org/t/how-to-solo-mine-safex-cash-with-my-computer/6786 "2019-12-11T23:10:08Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![aussiesloth](https://forum.safex.org/user_avatar/forum.safex.org/aussiesloth/32/2080_2.png) [@aussiesloth](https://forum.safex.org/u/aussiesloth)\
**Post date:** [December 11, 2019, 11:10pm UTC](https://forum.safex.org/t/how-to-solo-mine-safex-cash-with-my-computer/6786/1 "2019-12-11T23:10:08Z")

</div>

The key difference between pool mining and solo mining is that for pool mining, you earn a pro rata share of each block found by the pool, based on your hashrate contribution, whereas for solo mining, you are working on your own to find blocks, but when you do find one, you receive the entire block reward.

Longterm, both pool mining and solo mining should mathematically give you very similar returns.

However, with solo mining, you also help to support the decentralisation of the Safex blockchain network by running a node.

**Running a node comes with additional responsibilities** : you need to stay up-to-date with project development and ensure your node is the latest code version, performing updates as soon as practicable after code updates are released by the development team.

**THIS IS IMPORTANT!!**

**Failure to keep your node updated can be detrimental to the Safex blockchain network, and can also invalidate your mining hashes. Please consider your ability to stay current with project development when considering solo mining, or simply running a node.**

Currently, there is only the option to CPU mine. If you have a high-end CPU (eg. Ryzen 9 3900X), you will get a much higher hashrate using safex-rig, rather than mining directly within the node.

Code for GPU mining is not currently available.

Depending on your computer-skill level, you have several options for solo mining. It is recommended that you take your computing skills into consideration when looking at the various solo mining options available.

**WARNING: Do NOT mine to an exchange address, as they may not credit to your exchange account.**

**Ubuntu**

- **Node**

If in Desktop mode, start a Terminal window.

_For people looking to maximise their hashrate, you could try the hugepages and swapfile changes provided by @Cyberian in his [Improve your Hashrate on Virtual Machines](https://forum.safex.org/t/improve-your-hashrate-on-virtual-machines/6772)_

_Whilst the instructions were written for a Virtual Machine, these adjustments should also boost hashrate on a home mining rig, assuming you have sufficient RAM and HDD space available to accommodate the configuration changes._

```auto
screen -S daemon
sudo apt-get update && sudo apt-get upgrade -y
wget https://github.com/safex/safexcore/releases/download/6.0.0/safexd-linux-6.0.0
mv safexd-linux-6.0.0 safexd
chmod +x safexd
./safexd

```

_Allow blockchain to sync._

```auto
start_mining YOUR_WALLET_ADDRESS T

```

where T = # of threads you want mining.

To detach the screen and allow it continue running without the Terminal window open, type

```auto
 CTRL+SHIFT+A
 CTRL+SHIFT+D

```

To return to the screen, start a Terminal window and type

```auto
screen -r daemon

```

- **Node + Miner**

If in Desktop mode, start a Terminal window.

_For people looking to maximise their hashrate, you could try the hugepages and swapfile changes provided by @Cyberian in his [Improve your Hashrate on Virtual Machines](https://forum.safex.org/t/improve-your-hashrate-on-virtual-machines/6772)_

_Whilst the instructions were written for a Virtual Machine, these adjustments should also boost hashrate on a home mining rig, assuming you have sufficient RAM and HDD space available to accommodate the configuration changes._

```auto
screen -S daemon
sudo apt-get update && sudo apt-get upgrade -y
wget https://github.com/safex/safexcore/releases/download/6.0.0/safexd-linux-6.0.0
mv safexd-linux-6.0.0 safexd
chmod +x safexd
./safexd

```

_Allow blockchain to sync._

While the blockchain syncs, create a new screen window

CTRL+SHIFT+A  
CTRL+SHIFT+C

To move between the two screens, use

CTRL+SHIFT+A  
CTRL+SHIFT+"

In the second screen,

Edit 30/1/2020: follow [https://github.com/xmrig/xmrig/wiki/Build](https://github.com/xmrig/xmrig/wiki/Build)

~~sudo apt-get install git build-essential cmake libuv1-dev libssl-dev libhwloc-dev  
git clone [https://github.com/safex/safex-rig.git](https://github.com/safex/safex-rig.git)  
cd safex-rig && mkdir build && cd build  
cmake …  
make~~

~~_Let it build the xmrig executable_~~

The preferred way to configure the miner is the JSON config file as it is more flexible and human friendly. The command line interface does not cover all features, such as mining profiles for different algorithms. Important options can be changed during runtime without miner restart by editing the config file or executing API calls.

Create your config.json file in the same location.

```auto
 sudo nano config.json

```

Copy and paste the following, changing YOUR\_WALLET\_ADDRESS to your address

```auto
{
    "api": {
        "id": null,
        "worker-id": null
    },
    "http": {
        "enabled": false,
        "host": "127.0.0.1",
        "port": 0,
        "access-token": null,
        "restricted": true
    },
    "autosave": true,
    "version": 1,
    "background": false,
    "colors": true,
    "randomx": {
        "init": -1,
        "numa": true
    },
    "cpu": {
        "enabled": true,
        "huge-pages": true,
        "hw-aes": null,
        "priority": null,
        "memory-pool": false,
        "max-threads-hint": 100,
        "asm": true,
        "argon2-impl": null,
        "cn/0": false,
        "cn-lite/0": false
    },
    "opencl": {
        "enabled": false,
        "cache": true,
        "loader": null,
        "platform": "AMD",
        "cn/0": false,
        "cn-lite/0": false
    },
    "cuda": {
        "enabled": false,
        "loader": null,
        "nvml": true,
        "cn/0": false,
        "cn-lite/0": false
    },
    "donate-level": 0,
    "donate-over-proxy": 1,
    "log-file": null,
    "pools": [
        {
            "algo": "rx/sfx",
            "coin": null,
            "url": "127.0.0.1:17402",
            "user": "YOUR_WALLET_ADDRESS",
            "pass": "x",
            "rig-id": null,
            "nicehash": false,
            "keepalive": false,
            "enabled": true,
            "tls": false,
            "tls-fingerprint": null,
            "daemon": true,
            "daemon-poll-interval":1000,
            "self-select": null
        }
    ],
    "print-time": 60,
    "health-print-time": 60,
    "retries": 5,
    "retry-pause": 5,
    "syslog": false,
    "user-agent": null,
    "watch": true
}

```

Once your node has syncronized, then you can start your miner with

```auto
 ./xmrig

```

**Win 7/10**

- **Node**

In your preferred location, create a new folder: **safexcore**

In your Antivirus software, add the **safexcore** folder to your Exclusion List

Download the latest binary release of safexcore from the safex GitHub repository and save it to your **safexcore** folder.

Current: [https://github.com/safex/safexcore/releases/download/6.0.0/safexd-windows-6.0.0.exe](https://github.com/safex/safexcore/releases/download/6.0.0/safexd-windows-6.0.0.exe)

When the dowload completes, windows will automatically prompt you to **Discard**. Click the dropdown to the right and select **Keep**.

Navigate to your **safexcore** folder. Your new file should be the only file in the folder.

On the file, right click - Properties and **Unblock** in the General tab.

Click on the Compatibility tab and tick the **Checkbox** beside “Run this program as an Administrator”.

**Apply** & **OK**

You can now launch the program and the blockchain will begin to syncronize.

This will take some time, depending upon your computer speed and internet connection. Once synchronised, you can begin mining.

```auto
start_mining YOUR_WALLET_ADDRESS T

```

where T = # of threads you want mining.

- **Node + Miner**

In your preferred location, create a new folder: **safexcore**

In your Antivirus software, add the **safexcore** folder to your Exclusion List

Download the latest binary release of safexcore from the safex GitHub repository and save it to your **safexcore** folder.

Current: [https://github.com/safex/safexcore/releases/download/6.0.0/safexd-windows-6.0.0.exe](https://github.com/safex/safexcore/releases/download/6.0.0/safexd-windows-6.0.0.exe)

When the dowload completes, windows will automatically prompt you to **Discard**. Click the dropdown to the right and select **Keep**.

Navigate to your **safexcore** folder. Your new file should be the only file in the folder.

On the file, right click - Properties and **Unblock** in the General tab.

Click on the Compatibility tab and tick the **Checkbox** beside “Run this program as an Administrator”.

**Apply** & **OK**

You can now launch the program and the blockchain will begin to syncronize.

This will take some time, depending upon your computer speed and internet connection.

**Edit (23/12/2019): As of xmrig v5.4.0, the RandomSFX algorithm has been included in the official xmrig code.**

**Release info can be found at: [https://github.com/xmrig/xmrig/releases](https://github.com/xmrig/xmrig/releases)**

~~Trusted community member and long-time Safex Discord Moderator, @Astralite, has built a Windows 7/10 executable of the custom safex-rig version of xmrig. Please bear in mind, this is NOT an official Safex release, but many members of the Safex community are already using this build without issue.~~

~~Once the file finishes downloading, Windows may prompt you to Discard the file. The dropdown to the right of Discard allows you to select Keep.~~

~~Extract the files from the .zip (remember, password is **safex** )~~

~~Then rename the solo.json to config.json~~

~~Open (edit) the newly named config.json and add your wallet address in the “user” section.~~

Save the file.

Next, right click on the safex-rig file and select **Properties**.

You may find that Windows has **Blocked** the file from running. Select **Unblock**.

Next, go to the **Compatibility** tab and tick the checkbox beside **Run this program as an administrator**.

Click **Apply** , then **OK**.

Now simply run the safex-rig file by double clicking it.

**Mac**

- **Node**

Download the current release: [https://github.com/safex/safexcore/releases/download/6.0.0/safexd-osx-6.0.0](https://github.com/safex/safexcore/releases/download/6.0.0/safexd-osx-6.0.0)

Start the program and allow the blockchain to synchronize.

This will take some time, depending upon your computer speed and internet connection. Once synchronised, you can begin mining.

```auto
start_mining YOUR_WALLET_ADDRESS T

```

where T = # of threads you want mining.

- **Node + Miner**

As above, but dont `start_mining`

**Edit (23/12/2019): As of xmrig v5.4.0, the RandomSFX algorithm has been included in the official xmrig code.**

> **[xmrig/xmrig](https://github.com/xmrig/xmrig/wiki/macOS-Build)**
>
> RandomX, CryptoNight, AstroBWT and Argon2 CPU/GPU miner - xmrig/xmrig

---

<div class="post-metadata">

**Author:** ![aussiesloth](https://forum.safex.org/user_avatar/forum.safex.org/aussiesloth/32/2080_2.png) [@aussiesloth](https://forum.safex.org/u/aussiesloth)\
**Post date:** [December 17, 2019, 10:34pm UTC](https://forum.safex.org/t/how-to-solo-mine-safex-cash-with-my-computer/6786/2 "2019-12-17T22:34:21Z")

</div>



---

<div class="post-metadata">

**Author:** ![VR4](https://forum.safex.org/letter_avatar_proxy/v4/letter/v/b4bc9f/32.png) [@VR4](https://forum.safex.org/u/VR4)\
**Post date:** [December 27, 2019, 2:21pm UTC](https://forum.safex.org/t/how-to-solo-mine-safex-cash-with-my-computer/6786/3 "2019-12-27T14:21:01Z")

</div>

Hi,  
I used to mine sfx with xmr-rig, and I am pretty familiar with how it works.  
I see the new xmrig has been updated to contain RandomSFX.  
I went to github to get the windows compiled version 5.4.0, and I see 3 different zip files. I downloaded all 3 because I wasn’t sure which one I needed.  
They are…  
xmrig-5.4.0-msvc-win64  
xmrig-5.4.0-gcc-win64  
xmrig-5.4.0-msvc-cuda10\_1-win64  
All 3 of them look similar, and look like they could be run once unzipped. The cuda10 is a much bigger file than the other 2.  
Can someone tell me the difference? I plan to experiment with all of them anyway, but was wondering the real difference between them and also which one I should actually be using.  
Thanks to anyone who can answer and help!!  
-VR4

UPDATE:  
I figured it out. They are just built with different compilers.  
GCC is usually best for 32 bit  
MSVC (Microsoft visual c++) is usually best for 64 bit  
The larger cuda10 version adds GPU support for AMD and NVIDIA GPUs.

---

<div class="post-metadata">

**Author:** ![YourHalo](https://forum.safex.org/user_avatar/forum.safex.org/yourhalo/32/2916_2.png) [@YourHalo](https://forum.safex.org/u/YourHalo)\
**Post date:** [January 21, 2020, 3:41am UTC](https://forum.safex.org/t/how-to-solo-mine-safex-cash-with-my-computer/6786/4 "2020-01-21T03:41:10Z")

</div>

It’s the 20th of January- just checking if the CPU miner is working for Windows 10.  
I’m getting a “connection refused” error.

Also does this work w/ GPUs now? I’ve been reading and catching up all day, however there is very little info out rn.

Thanks- long time lurker here- finally signed up. Been watching Daniel since 2016? When he launched this. Looks like I came back at a good time- although it seems very quiet around here.

-YourHalo

---

<div class="post-metadata">

**Author:** ![dandabek](https://forum.safex.org/user_avatar/forum.safex.org/dandabek/32/268_2.png) [@dandabek](https://forum.safex.org/u/dandabek)\
**Post date:** [January 21, 2020, 3:44am UTC](https://forum.safex.org/t/how-to-solo-mine-safex-cash-with-my-computer/6786/5 "2020-01-21T03:44:45Z")

</div>

@yourhalo you can check out this: [https://github.com/xmrig/xmrig](https://github.com/xmrig/xmrig)

They have added support for SFX (Safex Cash)

The CPU GUI miner is in progress and should be there for your fingertips imminently.

CPUs dominate GPUs in this algorithm though, so it is more recommended to mine with CPU though nothing wrong with contributing GPU power at all.

Most of the community is active on the discord chat room, but I do encourage using the forums so the informations sticks.

anyway here is a discord sign up link: [https://discord.gg/y4dqJm6](https://discord.gg/y4dqJm6)

---

<div class="post-metadata">

**Author:** ![aussiesloth](https://forum.safex.org/user_avatar/forum.safex.org/aussiesloth/32/2080_2.png) [@aussiesloth](https://forum.safex.org/u/aussiesloth)\
**Post date:** [January 21, 2020, 4:37am UTC](https://forum.safex.org/t/how-to-solo-mine-safex-cash-with-my-computer/6786/6 "2020-01-21T04:37:38Z")

</div>

Try pool [How to pool mine Safex Cash with my computer](https://forum.safex.org/t/how-to-pool-mine-safex-cash-with-my-computer/6780)

---

<div class="post-metadata">

**Author:** ![aussiesloth](https://forum.safex.org/user_avatar/forum.safex.org/aussiesloth/32/2080_2.png) [@aussiesloth](https://forum.safex.org/u/aussiesloth)\
**Post date:** [January 22, 2020, 12:19am UTC](https://forum.safex.org/t/how-to-solo-mine-safex-cash-with-my-computer/6786/7 "2020-01-22T00:19:14Z")

</div>

Edited OP - updated to v6 safexd GitHub links

---

<div class="post-metadata">

**Author:** ![maestrodan](https://forum.safex.org/letter_avatar_proxy/v4/letter/m/71e660/32.png) [@maestrodan](https://forum.safex.org/u/maestrodan)\
**Post date:** [October 12, 2023, 12:15pm UTC](https://forum.safex.org/t/how-to-solo-mine-safex-cash-with-my-computer/6786/8 "2023-10-12T12:15:36Z")

</div>

And how to do this? Trying to connect xmrig to safexd like here, but

```auto
error: "Internal error: failed to create block template", code: -5

```

---

<div class="post-metadata">

**Author:** ![Lomax](https://forum.safex.org/user_avatar/forum.safex.org/lomax/32/3205_2.png) [@Lomax](https://forum.safex.org/u/Lomax)\
**Post date:** [October 15, 2023, 10:58am UTC](https://forum.safex.org/t/how-to-solo-mine-safex-cash-with-my-computer/6786/9 "2023-10-15T10:58:26Z")

</div>

Sounds to me like a wrong algo / cnvariant in the config. What config have you set?

---

<div class="post-metadata">

**Author:** ![maestrodan](https://forum.safex.org/letter_avatar_proxy/v4/letter/m/71e660/32.png) [@maestrodan](https://forum.safex.org/u/maestrodan)\
**Post date:** [October 15, 2023, 11:29am UTC](https://forum.safex.org/t/how-to-solo-mine-safex-cash-with-my-computer/6786/10 "2023-10-15T11:29:08Z")

</div>

Like here described

```auto
{
    "api": {
        "id": null,
        "worker-id": null
    },
    "http": {
        "enabled": false,
        "host": "127.0.0.1",
        "port": 0,
        "access-token": null,
        "restricted": true
    },
    "autosave": true,
    "version": 1,
    "background": false,
    "colors": true,
    "randomx": {
        "init": -1,
        "numa": true
    },
    "cpu": {
        "enabled": true,
        "huge-pages": true,
        "hw-aes": null,
        "priority": null,
        "memory-pool": false,
        "max-threads-hint": 100,
        "asm": true,
        "argon2-impl": null,
        "cn/0": false,
        "cn-lite/0": false
    },
    "opencl": {
        "enabled": false,
        "cache": true,
        "loader": null,
        "platform": "AMD",
        "cn/0": false,
        "cn-lite/0": false
    },
    "cuda": {
        "enabled": false,
        "loader": null,
        "nvml": true,
        "cn/0": false,
        "cn-lite/0": false
    },
    "donate-level": 0,
    "donate-over-proxy": 1,
    "log-file": null,
    "pools": [
        {
            "algo": "rx/sfx",
            "coin": null,
            "url": "127.0.0.1:17402",
            "user": "YOUR_WALLET_ADDRESS",
            "pass": "x",
            "rig-id": null,
            "nicehash": false,
            "keepalive": false,
            "enabled": true,
            "tls": false,
            "tls-fingerprint": null,
            "daemon": true,
            "daemon-poll-interval":1000,
            "self-select": null
        }
    ],
    "print-time": 60,
    "health-print-time": 60,
    "retries": 5,
    "retry-pause": 5,
    "syslog": false,
    "user-agent": null,
    "watch": true
}

```

---

<div class="post-metadata">

**Author:** ![Lomax](https://forum.safex.org/user_avatar/forum.safex.org/lomax/32/3205_2.png) [@Lomax](https://forum.safex.org/u/Lomax)\
**Post date:** [November 15, 2023, 12:59pm UTC](https://forum.safex.org/t/how-to-solo-mine-safex-cash-with-my-computer/6786/11 "2023-11-15T12:59:31Z")

</div>

Sorry for late reply. Yes i have the same. Think that directly mining to daemon is not supported for sfx, ive read somewhere only monero, that would be because the blocktemplate is different. So eiter that or the block template / algo was changed after it was added to xmrig and it was never updated

---

<div class="post-metadata">

**Author:** ![maestrodan](https://forum.safex.org/letter_avatar_proxy/v4/letter/m/71e660/32.png) [@maestrodan](https://forum.safex.org/u/maestrodan)\
**Post date:** [November 24, 2023, 11:22pm UTC](https://forum.safex.org/t/how-to-solo-mine-safex-cash-with-my-computer/6786/12 "2023-11-24T23:22:17Z")

</div>

oh, some time ago I used this method to mine wownero and xolentum, but i’m using xmrig in cli mode, not by .json file. And it’s works.  
But, Zephyr, for example, can’t use this method too.
