How to Build a Money-Making Monero Mining Machine

Monero mining is hot and getting more and more popular every day. As a beginner, if you find it too risky to invest your own money in cryptocurrency, you can take a different approach and mine the cryptocurrency instead.

This tutorial will take you step by step through how to build a Monero mining rig running Ubuntu Server that utilizes an upgraded graphics card to perform GPU mining.

Monero Mining Supplies

The following supplies are needed before setting up our Monero mining rig.

Radeon RX 570 Gaming X 4G Graphics Card and EVGA 500 Watt Power Supply
Radeon RX 570 Gaming X 4G Graphics Card and EVGA 500 Watt Power Supply

It’s not critical to have the exact hardware listed above. Just make sure that your motherboard is 64-bit and your power supply outputs enough power for your motherboard and graphics card.

Install the Power Supply and Graphics Card

It’s always a good idea to update your BIOS before installing new hardware. Once the BIOS is up-to-date, we can insert the new hardware into the motherboard of the Monero mining rig.

Ensure Your BIOS is Up-to-Date

By updating your BIOS to the latest version, you will be able to quickly tell if your graphics card is compatible with your motherboard.

When you have an outdated BIOS, your BIOS may reject your graphics card and beep at you. In this case, an old BIOS on your Lenovo ThinkCentre will result in a 4-2-3-3 beep code after installing your new graphics card and powering on your machine. This actually means “Extended Block Move” and will prevent the OS from booting.

To ensure compatibility with the graphics card, let’s update the BIOS.

  1. Download the Flash BIOS update (CD ISO image version) from Lenovo’s website.
  2. Download and install Etcher
  3. In Etcher, click on Select image and select your BIOS image
  4. Insert the USB flash drive into the computer. Etcher will automatically select your USB flash drive.
  5. Click Flash
  6. After flashing is complete, remove the USB flash drive.

Now we can update the BIOS by booting from USB.

  1. Insert the USB flash drive containing the BIOS image into your computer.
  2. Reboot the computer and hit F12 to change the boot device.
  3. Select the USB flash drive as the boot device
  4. Proceed with the flashing of your BIOS, accepting all default options.

Your BIOS is now up-to-date.

Install the EVGA 500 Watt Power Supply

The recommended power supply unit (PSU) for the Radeon RX 570 is 450 Watts. The PSU that ships with the Lenovo ThinkCentre M57 does not meet this power requirement. We chose to update the PSU to the EVGA 500 Watt power supply.

Before unplugging anything, you want to take note of which cords are plugged into which devices and slots on the motherboard. After noting this, you can proceed by unplugging all cords, unscrewing the PSU, and removing it from the case.

Installing the EVGA 500 Watt Power Supply
EVGA 500 Watt Power Supply Installation

Next, screw the new PSU into the case and plug in all cords according to your notes. If you hooked everything up correctly, your new power supply has been successfully installed.

Install the Radeon RX 570 Gaming X 4G Graphics Card

Now the fun part. Our Monero mining rig wouldn’t be complete without an upgraded graphics card.

The process of installing a new graphics card is extremely easy. If your motherboard has a PCI Express x16 slot and your power supply unit has sufficient power, this step will be straightforward.

To install your RX 570 graphics card into the Monero mining rig, orient the graphics card and slide it into the open PCI Express x16 slot. Next, simply plug the 8-pin power connector into the graphics card.

Installing the Radeon RX 570 Gaming X 4G Graphics Card
Radeon RX 570 Gaming X 4G Graphics Card Installation

As long as you are able to turn on your computer and boot into your operating system without your motherboard beeping at you, you have successfully installed your new graphics card hardware.

Download and Install Ubuntu Server

Next, we want to install the Ubuntu Server operating system (OS) onto our Monero mining rig.

Ubuntu Server is our OS of choice because of its lightweight footprint. Ubuntu Server is a “headless” OS meaning there is no graphical user interface (GUI). This is ideal for mining because the entire GPU is essentially available for mining.

Download Ubuntu Server

Download Ubuntu Server from Ubuntu’s downloads page. This tutorial was tested with Ubuntu 16.04.3 Server 64-bit. A later version of Ubuntu may work if available.

A 64-bit OS is required to mine Monero, so don’t waste your time if your motherboard is 32-bit.

Create a Bootable USB Flash Drive with Ubuntu Server

The next step is to create a bootable USB flash drive containing the Ubuntu Server image.

  1. Download and install Etcher (if not done above)
  2. In Etcher, click on Select image and select your Ubuntu image
  3. Insert the USB flash drive into the computer. Etcher will automatically select your USB flash drive
  4. Click Flash
  5. After flashing is complete, remove the USB flash drive

Install Ubuntu Server

Now it’s time to install Ubuntu Server. This step will erase everything on your hard drive, so be sure to backup all of your data before proceeding.

  1. Insert the USB flash drive containing the Ubuntu Server image into your computer.
  2. Reboot the computer and hit F12 to change the boot device.
  3. Select the USB flash drive as the boot device
  4. Proceed with the installation of Ubuntu Server, accepting all default options.
Ubuntu Server installation screen

When finished installing Ubuntu Server, reboot the computer as instructed and login to your Ubuntu account with your new credentials.

Install Graphics Card Drivers and Mining Software

Now that our new graphics card is installed and our Monero mining rig is running Ubuntu server, we need to install the drivers and software necessary to mine with our RX 570.

After logging into Ubuntu, execute the following commands.

sudo apt update
sudo apt dist-upgrade
sudo reboot

Install the AMD Driver

To install the driver for your Radeon RX 570 Gaming X 4G graphics card, you must install the Linux AMDGPU-PRO driver. Issue the following commands as detailed here on AMD’s website.

wget https://www2.ati.com/drivers/linux/ubuntu/amdgpu-pro-17.40-492261.tar.xz
tar -Jxvf amdgpu-pro-17.40-492261.tar.xz
cd amdgpu-pro-17.40-492261
./amdgpu-pro-install -y --opencl=legacy
sudo reboot

Please note that the –opencl=legacy option is necessary when issuing the amdgpu-pro-install command. If you don’t set opencl to legacy, you may get the following error when building xmr-stak in a future step.

No AMD OpenCL platform found. Possible driver issues or wrong vendor driver.

Finally, after adding yourself to the video group, reboot your machine.

sudo usermod -a -G video $LOGNAME
sudo reboot

At this point, the driver for your Radeon RX 570 Gaming X 4G graphics card is now installed.

Install AMD APP SDK 3.0

Next we must install the AMD APP SDK for 64-bit Linux since we are using an AMD GPU. Download AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2, extract, and install the application.

tar -xvjf AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.tar.bz2
cd AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64/
sudo ./AMD-APP-SDKInstaller-v3.0.130.136-GA-linux64.sh

Install Monero Mining Software

We will be using xmr-stak for Monero mining on our AMD GPU.

Install Updates and Download Mining Software

First, lets install some prerequisites and download the mining software.

sudo apt install libmicrohttpd-dev libssl-dev cmake build-essential libhwloc-dev
git clone https://github.com/fireice-uk/xmr-stak.git

How To Change xmr-stak Donation Level

Before we compile xmr-stak, you can optionally change the developer donation rate.  By default the mining software will donate 2% of your hashpower to the developer’s pool.

If you aren’t feeling generous, we can edit donate-level.hpp and change the donation level to 0%. You can use vim or your favorite text editor to perform this task.

vim ~/xmr-stak/xmrstak/donate-level.hpp

Your donate-level.hpp should look like this. Save the file.

Screenshot of xmr-stak's donate-level.hpp
Change the xmr-stak donation level to 0%

Compile and Install Mining Software

Now that our hardware is installed and our driver and software prerequisites are satisfied, it is time to install the mining software for our Monero miner. Execute the following commands from your home directory in order to compile and install xmr-stak.

mkdir xmr-stak/build
cd xmr-stak/build
cmake .. -DCUDA_ENABLE=OFF -DOpenCL_ENABLE=ON -DHWLOC_ENABLE=OFF
make install

Mine Monero

Congratulations, you now have a money-making Monero mining machine! Now all we have to do is startup the miner. Execute the following commands to start xmr-stak.

cd ~/xmr-stak/build/bin/
./xmr-stak --noCPU

The mining software will begin to run. We added the –noCPU option in order to force xmr-stak to perform GPU mining. You will see output similar to below.

Console output of xmr-stak GPU mining Monero
Console output of xmr-stak GPU mining Monero

Now you can sit back and watch your Monero mining rig make you money. Please leave any questions or comments below.

Happy mining!

12 thoughts on “How to Build a Money-Making Monero Mining Machine”

    • Mac, good question. The hardware capabilities of your motherboard does not have to be anything spectacular, so an old 64-bit computer is sufficient. What really matters is the GPU that you choose and what kind of hashrate it can manage. On the other hand, a mining rig has a much higher initial investment whereas the DIY approach is more affordable for beginner miners.

      Reply
  1. Great beat ! I would like to apprentice even as you amend your site, how can i subscribe for a weblog website? The account helped me a appropriate deal. I had been a little bit acquainted of this your broadcast offered vibrant transparent concept

    Reply
  2. Youre so cool! I dont suppose Ive learn something like this before. So good to seek out anyone with some authentic thoughts on this subject. realy thanks for starting this up. this website is something that’s wanted on the internet, someone with a little originality. helpful job for bringing one thing new to the internet!

    Reply
  3. I like the valuable information you provide in your articles. I’ll bookmark your blog and check again here regularly. I am quite certain I’ll learn many new stuff right here! Best of luck for the next!

    Reply

Leave a Comment


The reCAPTCHA verification period has expired. Please reload the page.