How to Mine Monero Crypto Currency on your Raspberry Pi


You probably already asked yourself about mining with your Raspberry Pi.
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.

Mining Monero on Raspberry Pi is easy when you have good tools.
You can download and install a miner for free, to start mining a few minutes later.
You also need an account on a mining pool to do this (I’ll show you how).

So, let’s start learning a little more about this topic.
I’ll start with a short introduction about cryptocurrencies, Monero and mining pool.
Then we’ll see how to install a miner on your Raspberry Pi.
And finally, we’ll talk a little about profitability when mining on Raspberry Pi.

What is Monero?

Crypto currencies reminder

A cryptocurrency is a decentralized digital currency.
This means that it isn’t managed by banks and states.

It’s a recent concept, and the first cryptocurrency was Bitcoin in 2009.
As it is decentralized, it allows anyone to be a part of the chain.

By being a part of the network, you lend your device resources to the community to help the network.
And the system can reward you, it’s what we call a miner.
The more resources you have, the more cryptocurrency you’ll get.

Monero

Monero is one of these cryptocurrencies, created in 2014.

I chose Monero for this tutorial, rather than Bitcoin because it’s easier to get something.
In the Bitcoin network, there are big miners, and most of the time you can’t get anything with a standard computer.
So, with a Raspberry Pi it’s even worse …

The advantage of Monero is that normal people with a classic CPU can help to get rewards.

Get My Commands Cheat Sheet!
Grab your free PDF file with all the commands you need to know on Raspberry Pi!

Mining pool

Just a few words about the mining pool as we’ll use it later.

A mining pool is simply a network of miners.
When a block is found in a pool, all miners get rewarded depending on how they helped the entire network achieve this.

How to install a miner on your Raspberry Pi

Now that the vocabulary is clear, we can move on to the installation process.
You’ll get better result with a high-end Raspberry Pi model (I’m using this one for this tutorial), but any model should work if you just want to test it.

Create a MinerGate account

The first thing you need to do is to get access to a mining pool.
I recommend creating a MinerGate account.
It’s simple and you can use it anywhere, not only on Raspberry Pi.

  • Go to the MinerGate registration form.
  • Fill out the form.
    minergate registration
  • Confirm your email and log into your account.
  • On the Dashboard, you can check which currency you are currently mining and your winnings.
    We’ll check that later.
  • In the main menu, click on Mining Pools > Monero.
  • Scroll down the page to the mining pool information:
    minergate monero pool
  • Keep this information safe, you’ll need it later.

Install Raspberry Pi OS

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

If not, you can check my post on how to install Raspberry Pi OS and come back here later.
Once you have Raspberry Pi OS installed, the Internet configured and SSH enabled, you can move to the miner installation.

Install the Monero miner

To mine Monero, we’ll use the cpuminer-multi tool from Tanguy Pruvot.
You can check the GitHub project here.

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
    sudo apt upgrade
  • Install all needed dependencies:
    sudo apt install git automake autoconf libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev
  • Go into the folder you want to install in and run these commands:
    cd /opt
    sudo git clone https://github.com/tpruvot/cpuminer-multi
    cd cpuminer-multi
  • You can do the compilation and installation with:
    sudo ./autogen.sh
    sudo ./configure
    sudo ./build.sh
    This can take some time on Raspberry Pi.

After this, your miner is ready to use.

Are you a bit lost in the Linux command line? Check this article first, for the most important commands to remember, and a free downloadable cheat sheet so you can have the commands at your fingertips.

Run it

The executable name is “cpuminer”.
I give you the entire command here:
./cpuminer -a cryptonight -o stratum+tcp://xmr.pool.minergate.com:45700 -u YOUR_EMAIL

Replace YOUR_EMAIL with the email address you use to login on MinerGate.
Your password is not required.

Get My Commands Cheat Sheet!
Grab your free PDF file with all the commands you need to know on Raspberry Pi!

A few seconds later, the mining process starts:

mining monero cpuminer

If you go back to the MinerGate dashboard, you can see the miner online.

That’s it, you’re mining on your Raspberry Pi!

Thoughts about mining on Raspberry Pi

Profitability

After this little excitement, let’s get back to reality.
In this profit calculator, we can convert H/s into profit estimation.

Even if I remove the electricity cost, with a 2H/s ratio, you won’t earn anything on Raspberry Pi 3B+.

monero profitability raspberry pi

This simulation shows us a $0.27 gain after one year.

If you consider the $35 of the Raspberry Pi (minimum), and the electricity cost (probably around $0.10 a week), you’ll lose money by mining Monero on your Raspberry Pi. That’s why I recommend other options to make money with a Raspberry Pi in this article, as crypto-mining is not the best choice.

And even if you can get a free Raspberry Pi and free electricity, this is not a good deal.
Raspberry Pi 4 has more hashing power (about 12H/s), but still not enough to make you rich :).

Building a Raspberry Pi cluster might seem a good idea to get better results, but it wouldn’t be more profitable if you look at the profit/power ratio.

Help me help them <3
Help me raise funds for education by donating to my Pencils of Promise campaign.
Together we could fund a school for them!

Education

Even if it’s not profitable, you can learn many things by installing a miner on your Raspberry Pi.
It doesn’t cost a lot and the installation is rather easy, so it’s a good first step in the cryptocurrency world.

You can now try it on bigger devices and win a little with cryptocurrencies 🙂

Video

If you prefer, here is a video I made on my YouTube channel to explain the steps to mine Monero on Raspberry Pi:

Related questions

My Raspberry Pi is heating when mining, what can I do? The mining process takes all the power of your CPU, so heating is normal to see. If you want to avoid this, you can mine with less CPU, by adding the -t option to the cpuminer command (“-t 2” for example, t stands for threads).

How to use MinerGate on other platforms? Create an account on MinerGate, then click on “Downloads” in the main menu. Choose the download file corresponding to your computer operating system (Windows/Mac/Ubuntu) and GPU, then install it. You’ll get a better rate on your computer. Here is an example on my laptop:
minergate mining on windows

Get My Commands Cheat Sheet!
Grab your free PDF file with all the commands you need to know on Raspberry Pi!

Want to chat with other Raspberry Pi enthusiasts? Join the community, share your current projects and ask for help directly in the forums.

Conclusion

That’s it, you now know how to mine a cryptocurrency (Monero here) with your Raspberry Pi, and on any Linux system.

I’m not an expert in cryptocurrency, so if you see some mistakes or have other suggestions for readers to enjoy this post, feel free to contact me.

If you want to try other cryptos with another miner, you can read my recent article on how to mine Dogecoin on Raspberry Pi.

Get My Commands Cheat Sheet!
Grab your free PDF file with all the commands you need to know on Raspberry Pi!

Additional Resources

Not sure where to start?
Understand everything about the Raspberry Pi, stop searching for help all the time, and finally enjoy completing your projects.
Watch the Raspberry Pi Bootcamp course now.

Master your Raspberry Pi in 30 days
Don’t want the basic stuff only? If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiple projects with step-by-step guides.
Download the e-book.

VIP Community
If you just want to hang out with me and other Raspberry Pi fans, you can also join the community. I share exclusive tutorials and behind-the-scenes content there. Premium members can also visit the website without ads.
More details here.

Need help building something with Python?
Create, understand and improve any Python script for your Raspberry Pi.
Learn the essentials, step-by-step, without losing time understanding useless concepts.
Get the e-book now.

You can also find all my recommendations for tools and hardware on this page.

Patrick Fromaget

I'm the lead author and owner of RaspberryTips.com. My goal is to help you with your Raspberry Pi problems using detailed guides and tutorials. In real life, I'm a Linux system administrator with a web developer experience.

Recent Posts