Crypto Mining on a Raspberry Pi 4 Cluster – Monero Crypto Currency – [Tutorial]

Picture of Written by Rob Parker

Written by Rob Parker

Rob is a Certified Ethical Hacker (CEH v11) from EC-Council and a certified EIPA Data Protection Officer that specialises in security and ethical hacking. He has worked in all parts of the world in various security roles and is keen on helping others in their ethical hacking journeys.

Steam Labs Ethical Hacking posts are designed to educate, introduce and demonstrate hacking tools for penetration testing purposes only. We will not be held responsible for people who use these skills for illegal or malicious attacks.

Now that Bitcoin is becoming very hard to mine, Monero is the new Bitcoin. In this tutorial you’ll learn how to mine Monero on Raspberry Pi. In this tutorial I am going to introduce viewers to the Monero crypto mining setup on the Raspberry Pi 4 cluster. I will walk you through the setup which includes1 – How to do a headless setup on a Raspberry Pi 4 using Raspi OS Lite2 – How to SSH into the headless Raspberry Pi OS using terminal and command line3 – How to mine the Monero crypto currently on multiple Pi’s, this concept can be used to mine other crypto currencies on the Raspberry Pi 4 that are maybe more profitable4 – How to setup the Monero Gui wallet to track your earnings5 – How to view hashes that the raspberry pi workers nodes are solving and view all jobs it has assisted with on the Monero network.

Install Raspberry Pi OS

If you already have Raspberry Pi OS on your Raspberry Pi, you can move to the next paragraph.

If not, download Raspberry Pi OS Lite from this link and follow the video to setup a headless image.
Once you have Raspberry Pi OS installed, the Internet configured and SSH enabled, you can move to the miner installation.

Install the Monero miner

Follow these steps to install it on your Raspberry Pi:

  • I recommend connecting to the Raspberry Pi via SSH.
    So you can just copy/paste commands from this page.
  • Update your system:
				
					sudo apt update
				
			
  • Upgrade your system:
				
					sudo apt update
				
			
  • Install relevant dependencies
				
					sudo apt install git build-essential cmake libuv1-dev libssl-dev libhwloc-dev -y
				
			
  • Setup xmrig, this is how we will mine the Monero Crypto currency, then follow the below commands
				
					git clone https://github.com/xmrig/xmrig.git
make
cd xmrig
mkdir buildbase
cd buildbase
cmake ..
make
				
			
  • Now, we will need to link the Pi to Moneroocean and use the wallet ID as well as the Raspberry Pi name identifier, if you have a cluster.
				
					./xmrig -o gulf.moneroocean.stream:10128 -u 43f2Shkgw7Q9wpCdLEXDqR8jPFpakdi7UG6KitgNLPzgjW5s5ZVR3geT7bCZnfqBVW8voJ5Pmj5hzNDdwRz1STDhPqNgjJt -p RPi4A
				
			

If you got to this stage, I am hoping the above instructions helped. Stay tuned for more on Monero crypto mining in the coming weeks.

Useful links

Monero Gui Wallet Download | https://www.getmonero.org/downloads/

Raspberry Pi article on mining | https://raspberrytips.com/mine-monero-raspberry-pi/Raspberry Pi Lite 

OS 64 bit | https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2021-11-08/

Geek Pi Cluster Case | https://www.amazon.com/GeeekPi-Raspberry-Cluster-Stackable-4-Layers/dp/B083FDHPBH

You May Also Like