How to set up XMRig?

XMRig mining client is RandomX mining client for AMD and Nvidia GPUs on Linux mining OS and as CPU mining client for Linux and Windows systems. GPU mining client is available under name XMRig-RandomX and CPU mining client is available under name XMRig. The default donation level for mining with XMRig is 5%, but percentage can be adjusted with --donate-level=N parameter.

If you want to use XMRig outside minerstat, you can download it through official sources:

How to set up XMRig with minerstat?

In this guide we will show you how to set up XMRig-RandomX for mining XMR Monero on minerstat. To learn how to set up CPU mining, please read the CPU mining article.

1. Address editor

First, open the address editor and save the pool and wallet for mining XMR . We will save %XMR pool under (POOL:XMR) tag and XMR wallet under (WALLET:XMR) tag.

2. Default mining client

Open worker's config and select XMRIG-RANDOMX as a default mining client.

3. XMRIG-RandomX config

Simple config example

  • Coin: XMR
  • Pool: (POOL:XMR)
  • Wallet: (WALLET:XMR)
  • Password: x

Update the mining client's configuration so that it will be defined as:

{ "http": { "enabled": true, "host": "127.0.0.1", "port": 7888, "access-token": null, "restricted": null }, "autosave": true, "background": false, "colors": true, "donate-level": 1, "donate-over-proxy": 0, "log-file": null, "pools": [{ "algo": "rx", "url": "(POOL:XMR)", "user": "(WALLET:XMR).(WORKER)⁣⁣⁣", "pass": "x", "rig-id": null, "nicehash": false, "keepalive": false, "enabled": true, "tls": false, "tls-fingerprint": null, "daemon": false }], "print-time": 60, "retries": 5, "retry-pause": 5, "syslog": false, "watch": false }

(WORKER) tag will be automatically replaced with your worker's name, so you don't have to change it. System will also replace pool and wallet tags with the values you have defined in address editor.

4. Troubleshooting

To start saving logs for XMRig, change the parameter "log-file": null to "log-file": "xmrig.txt" in your mining configuration.

5. Threads

To adjust the number of threads you're mining XMR with, click the pencil icon under Pool and Wallet selection, replace "watch": false with "watch": false, "cpu": {"max-threads-hint": 100}, where 100 is the percentage of threads you want to use. I.e. for 1 core CPU this option has no effect, for 2 core CPU only 2 values possible 50% and 100%, for 4 cores: 25%, 50%, 75%, 100%. etc.

{ "http": { "enabled": true, "host": "127.0.0.1", "port": 7888, "access-token": null, "restricted": null }, "autosave": true, "background": false, "colors": true, "donate-level": 1, "donate-over-proxy": 0, "log-file": null, "pools": [{ "algo": "rx", "url": "(POOL:XMR)", "user": "(WALLET:XMR).(WORKER)⁣⁣⁣", "pass": "x", "rig-id": null, "nicehash": false, "keepalive": false, "enabled": true, "tls": false, "tls-fingerprint": null, "daemon": false }], "print-time": 60, "retries": 5, "retry-pause": 5, "syslog": false, "watch": false, "cpu": {"max-threads-hint": 100} }

6. Huge pages and swap space

To run RandomX algorithm, you will need to enable huge pages and set up swap space. There are two commands to do this under msOS:

  • hugepages to set up hugepages or toggle between smaller (128) and bigger (1169) settings.
  • mswap create 16384 which will create 16GB swap space. Change the number to fit your needs.

7. Save changes

Save changes and wait for mining client to restart. You are now mining XMR with XMRig-RandomX.

 

Revolutionize your mining operation with minerstat

It's easy and free to get started. Monitor, manage, and optimize your mining rigs with our powerful platform.

Sign up for free now

Mining software

Play-to-Earn TON Game
Play