Mining XMR On Ubuntu In A Flash!

Thierry
5 min readSep 7, 2021

--

I am a tactical type of guy looking for results and success using the most efficient available way possible and while using best practice. This blog is not to discuss XMR as a cryptocurrency but to get you to CPU mine XMR in a few minutes on Linux Ubuntu. It is a complete guide to mine XMR unlike other articles giving just some bits and pieces or vague instructions. This blog assumes you have root privilege's if not use sudo before each command line. let’s get started!

Join The Monero Mining Pool

Go to the MINEXMR site: Monero Mining Pool — MINEXMR

Go to the guide and chose a regional pool close by you. For the blog I am using the EU location: Mining Guide — MINEXMR

Go to the setup wizard to create your account and worker: Configuration wizard — XMRig

Click on “New Configuration”

Click on “Add Pool” and select the pool to use. I use the minexmr.com pool for this tutorial

You will be prompted to enter your info

Enter your XMR wallet address. Worker name is optional since it will be picked up dynamically from the Linux command when running it, however entering it will create a complete command line to start the worker in Linux (see later in the steps). For this example, we will use “Testworker”. Click on Add Pool. You are now a member of the pool using you wallet address as a unique identifier.

Now click on the Misc. chevron

Select the pool donation, minimum is 1%. Then click on the Result chevron to view your account configuration and command line to start your worker.

./xmrig --donate-level 5 -o pool.minexmr.com:443 -u 43rME483iMfaUJJqeAt8TyEiw6DmqTzxPHvvbR4VTua1Ugn5Uz6uq3vPiajWkxdqNChgRVzpuZUhkDVwamASEyQFJrdr7aS -k --tls --rig-id Testworker

Where43rME483iMfaUJJqeAt8TyEiw6DmqTzxPHvvbR4VTua1Ugn5Uz6uq3vPiajWkxdqNChgRVzpuZUhkDVwamASEyQFJrdr7aS is your wallet address

And Testworker your worker's name

And pool.minexmr.com:443 the pool's address

And --donate-level 5 is optional since it will pickup the donation from the configuration earlier

Congratulations you have now joined the pool! Time to start Mining!

Updating Ubuntu

Let’s get on your Linux terminal and type:

apt-get update && apt-get upgrade-y

Installing XMRIG From GitHub

Follow the commands below in sequence, type:

  1. apt-get install git build-essential cmake libuv1-dev libssl-dev libhwloc-dev

2. git clone https://github.com/xmrig/xmrig.git

3. mkdir xmrig/build && cd xmrig/build

4. cmake ..

5. make -j$(nproc)

Start XMRIG

Type:

./xmrig -o pool.minexmr.com:443 -u your wallet address S -k — tls — rig-id your worker’s name

Example:

./xmrig -o pool.minexmr.com:443 -u 43rME483iMfaUJJqeAt8TyEiw6DmqTzxPHvvbR4VTua1Ugn5Uz6uq3vPiajWkxdqNChgRVzduZUhkDVwamASEyQFJrdr7aS -k — tls — rig-id Testworker

At startup you will get the log

Looking at the screen above you will notice 1 failed line: “ FAILED TO APPLY MSR MOD, HASHRATE WILL BE LOW”. You will always get this MSR MOD message if you are running your worker on a vCPU (Virtual CPU) for MSR MOD to run you need to use a dedicated physical CPU for mining. In this tutorial I am running the worker on a VPS with a vCPU

Your Worker In Action

Go to the MINEXMR dashboard Dashboard — MINEXMR

Enter your wallet address and click on the search icon to view your dashboard

Top part of the dashboard
Bottom part of the dashboard

You can monitor your worker(s) and send your mined XMR’s to your wallet from the dashboard by clicking on “Send Now”. The minimum withdraw is 0.004 and it takes a few hours to get to your wallet.

In this example I am using 4 vCPU Cores (AMD Virtual CPU) to run each worker, the performance will be increased, indeed, if you are using dedicated AMD physical CPU’s.

Running XMRIG In The Background

When starting XMRIG you will run into the process being attached to your terminal window and soon as you close the terminal window it will stop the process and shutdown your worker.

To avoid this problem you must run your worker in the background using the nohup command:

nohup ./xmrig -o pool.minexmr.com:443 -u your wallet address -k — tls — rig-id your worker’s name> log.out &

Example:

nohup ./xmrig -o pool.minexmr.com:443 -u 4AS1JSypyE84B7dYd4CRvDKQJHHwxKCY6KGC8NjXCyR2SD9qQLVVDknekE4eerDbkRRviUtG3Q1j8cE7Qjujcugw6W7deno -k — tls — rig-id Testworker> log.out &

Then type the exit command to close the terminal window.

This is it. Happy mining!

— — — — — — — — — —

I am not a Financial Advisor my blogs are for educational purpose.

If you enjoyed and benefited from this blog, crypto donations are welcome to help support my future blogs:

BTC: bc1qm3f8ky4xcwg62nn9n9nx5dnmtkklehwkhz5753

ETH: 0x13c77781d7661420fB58b538a18A5B47eA50F462

XMR: 4AS1JSypyE84B7dYd4CRvDKQJHHwxKCY6KGC8NjXCyR2SD9qQLVVDknekE4eerDbkRRviUtG3Q1j8cE7Qjujcugw6W7deno

ADA: addr1q8vw4ct4zgsv4qan0nylcnk82gngsqtukyz43ms9htuthmwcatsh2y3qe2pmxlxfl38vw53x3qqhevg9trhqtwhch0ks8js0um

SOL: 7EvtSvhfZJRDEnnHmaWBKzqmkqi8yTv1FkJ3gP9S2YW6

LTC: LXhGaCqmWcr2VKuANqgVf81gsFZejVyfjZ

--

--

Thierry

Tactical Thinker. SAP Sr Consultant by trade. My mission: sharing tactical knowledge in Technology, Health and Fitness, and Cryptos to help others succeed.