Skip to content
atori.tech

3.2.2 XMRig or Gupax

Difficulty: Easy

Your MoneroBox runs P2Pool, but it doesn't mine itself: monerod, P2Pool and the other services need its CPU and memory, and an old PC or laptop isn't built to run at full load day and night. The mining happens on your other computers (desktops, laptops, spare PCs), which all point at your node's P2Pool. Every share they find counts for the wallet set in P2Pool's p2pool.env.

You have two options on each mining computer:

  • XMRig: the miner itself, a small program you start from a terminal. Works on Linux, Windows and macOS.
  • Gupax: a graphical app that includes XMRig, with buttons instead of a terminal. Formerly called Gupaxx.

Requirements

  • 3.2.1 P2Pool running on your MoneroBox, with port 3333 open to your LAN
  • NODE_IP, your MoneroBox's address on your home network (see 1.3)
  • A mining computer on the same network

XMRig

Download

Check the latest release at https://github.com/xmrig/xmrig/releases. From that page, download into one folder on the mining computer:

System File
Linux xmrig-6.26.0-linux-static-x64.tar.gz
Windows xmrig-6.26.0-windows-x64.zip
macOS (Apple silicon) xmrig-6.26.0-macos-arm64.tar.gz
macOS (Intel) xmrig-6.26.0-macos-x64.tar.gz

Also download SHA256SUMS and SHA256SUMS.sig from the same release, and XMRig's signing key from https://raw.githubusercontent.com/xmrig/xmrig/master/doc/gpg_keys/xmrig.asc, saved as xmrig.asc.

Verify

You need GnuPG: it's usually already installed on Linux; on Windows install Gpg4win, on macOS GPG Suite or brew install gnupg. In a terminal (PowerShell on Windows), in the download folder:

gpg --show-keys xmrig.asc

The fingerprint, on the line below pub, must be exactly:

9AC4CEA8E66E35A5C7CDDC1B446A53638BE94409

Then check the signature on the checksum list:

gpg --import xmrig.asc
gpg --verify SHA256SUMS.sig SHA256SUMS

Look for Good signature from "XMRig <support@xmrig.com>". Then check your download against the list:

grep linux-static-x64 SHA256SUMS | sha256sum --check
Expected: xmrig-6.26.0-linux-static-x64.tar.gz: OK

Get-FileHash .\xmrig-6.26.0-windows-x64.zip -Algorithm SHA256
Select-String "windows-x64.zip" SHA256SUMS
The two hashes must be identical (PowerShell prints its hash in capitals; that's fine).

grep macos-arm64 SHA256SUMS | shasum -a 256 --check
Use macos-x64 on an Intel Mac. Expected: ... OK

Antivirus warnings

Antivirus tools, especially on Windows, often flag XMRig as a "coin miner", because malware bundles it. That's expected for the genuine release, and it's exactly why you check the signature instead of trusting the download. You may need to allow XMRig's folder in your antivirus.

Run it

Extract the archive. Then, in a terminal in the extracted folder, start XMRig and point it at your node:

./xmrig -o NODE_IP:3333 -u my-desktop
.\xmrig.exe -o NODE_IP:3333 -u my-desktop
  • -o NODE_IP:3333: your MoneroBox's P2Pool.
  • -u my-desktop: a name for this computer. P2Pool ignores it for payouts, which always go to the wallet set on the node. It just helps you tell your miners apart.

Stop mining with ++ctrl+c++. Run it the same way on every computer you want to mine with.

Use fewer CPU threads

By default XMRig uses most of the CPU. To keep a computer responsive while you use it, limit XMRig to a share of the threads, for example half:

./xmrig -o NODE_IP:3333 -u my-desktop --cpu-max-threads-hint=50

Faster mining with huge pages

RandomX, Monero's mining algorithm, runs noticeably faster with huge pages. XMRig sets them up itself when it can: start it once with sudo on Linux, or from a PowerShell window opened with Run as administrator on Windows (after the first time, Windows needs a reboot). The start-up log shows huge pages 100% when they work.

Gupax

Gupax is a graphical app for mining with P2Pool and XMRig, for Linux, Windows and macOS. It was called Gupaxx until it moved to github.com/gupax-io/gupax. Gupax can also run its own node and P2Pool, but you don't need those: your MoneroBox already runs them. You only use its XMRig tab.

Download and verify

From https://github.com/gupax-io/gupax/releases, download the file for your system (for example gupax-v2.0.1-windows-x64.zip) and SHA256SUMS. Also save the developer's signing key from https://raw.githubusercontent.com/gupax-io/gupax/main/pgp/cyrix126.asc as cyrix126.asc. Then, in the download folder:

gpg --show-keys cyrix126.asc
gpg --import cyrix126.asc
gpg --verify SHA256SUMS

The fingerprint must be 8EFFE4A8C0FD4B6D21C3AAB2EC6E5BB401C6362D, and the check must say Good signature from "Cyrix126 <gupaxx@baermail.fr>". Then compare your download's hash with the one in SHA256SUMS, the same way as for XMRig.

Point it at your node

  1. Extract the archive and start Gupax.
  2. Open the XMRig tab and switch it to Advanced (in the bottom bar).
  3. In the pool list, add your node: IP NODE_IP, RPC PORT 3333 (despite its name, this is P2Pool's stratum port), and any name you like. Optionally give the computer a Rig ID.
  4. Select that pool, set how many threads to use, and start XMRig.

Don't start Gupax's own Node or P2Pool: payouts come from your MoneroBox's P2Pool, to the wallet set there. The Monero address you would enter in Gupax's P2Pool tab isn't used.

Check it works

On the mining computer, XMRig's output (or Gupax's XMRig tab) should show lines like:

[net]      new job from NODE_IP:3333 diff 300K algo rx/0 height ...
[cpu]      accepted (1/0) diff 300K (25 ms)

accepted means your node's P2Pool took the miner's work. On the MoneroBox, check that P2Pool sees your miners:

sudo jq '.hashrate_15m, .connections, .shares_found' /data/p2pool/api/local/stratum

connections counts your miners, and hashrate_15m is their combined hashrate.

Troubleshooting

connect error: connection refused (or timed out)

The miner can't reach P2Pool on your MoneroBox.

  • On the node: systemctl is-active p2pool must print active, and sudo ss -tlnp | grep 3333 must show it listening on 0.0.0.0:3333.
  • The node's firewall must have a rule for 3333: sudo ufw status | grep 3333.
  • Check NODE_IP: the mining computer must be on the same network as the node.
Windows deletes xmrig.exe or blocks it

That's the antivirus (see the warning in Verify). Allow the folder in the antivirus settings, then extract the archive again.

Hashrate is much lower than expected
  • Close other heavy programs, or lower the thread count if you limited it.
  • Turn on huge pages (see the tip under Run it).
  • Laptops throttle when they get hot or run on battery. Plug in, and keep the vents free.

Upgrade

Download the new release, verify it the same way, and replace the old folder.

Uninstall

Stop the miner and delete its folder. Nothing else is installed.