How to Mine Monero Crypto Currency on your Raspberry Pi

monero mining on raspberry pi

You probably already asked yourself about mining with your Raspberry Pi
Now that Bitcoin becomes really hard to mine, Monero is the new Bitcoin
In this tutorial you’ll learn how to mine Monero on Raspberry Pi

How to mine the Monero crypto currency on your Raspberry Pi?
Mining Monero on Raspberry Pi is easy when you have the 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 crypto currencies, 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 crypto currency is a decentralized digital currency
This means that it’s not managed by banks and states

It’s a recent concept. The first one 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 crypto currency you’ll get


Monero is one of these crypto currencies, created in 2014

I choose 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 and get rewards

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 achieving this

How to install a miner on your Raspberry Pi

Now that the vocabulary is clear, we can move on to the installation process

Create a Minergate account

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

  • Go to the Minergate registration form
  • Fill 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 Raspbian

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

If not, you can check my post on how to install Raspbian and come back here later
Once you have Raspbian installed, 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
    cd cpuminer-multi
  • You can do the compilation and installation with:
    sudo ./
    sudo ./configure
    sudo ./

    It can take some time on Raspberry Pi

After this, your miner is ready to use

Run it

The executable name is “cpuminer”
I give you the entire command here:

./cpuminer -a cryptonight -o stratum+tcp:// -u YOUR_EMAIL

Replace YOUR_EMAIL by the email address you use as a login on Minergate
Your password is not required

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


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’ll not earn anything

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

And even if you can get a free Raspberry Pi and free electricity, this is not a good deal


Even if it’s not profitable, you can learn many things by installing a miner on your Raspberry Pi
As it doesn’t cost a lot, and the installation is rather easy, it’s a good way to make a first step in the crypto currencies world

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

Related questions

My Raspberry Pi is heating when mining, what can I do? The mining process take all the power of your CPU, so it’s normal to see that kind of thing. 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


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

I’m not an expert in crypto currency, so if you see some mistakes or have other suggestions for readers to enjoy this post, please share in the comments below

How to Mine Monero Crypto Currency on your Raspberry Pi


  1. Jose Reply

    Good day,

    I dont know exactly when was this posted but i got a message on my Pi that (libcurl4-openssl-dev) was not found, any ideas on how to proceed?



    • RaspberryTips Post authorReply

      Hi Jose,

      This package is available in the Raspbian repository

      Did you try “apt install libcurl4-openssl-dev” ?

  2. kurt Reply

    Hey! I’m getting this:

    sudo: ./build-linux-arm: command not found

    Any thoughts? I googled but was unsuccessful.

    • RaspberryTips Post authorReply

      Hi kurt,

      Could you try ./ ?

      That’s the file full name

      Let me know, so I can edit the command in post

      • Shai Reply


        Have the same issue as Kurt, I tried ./ but still same message: no such file or directory

        • Patrick [RaspberryTips] Post authorReply


          Can you try ./ ?

          If it’s ok I will edit the post

          On Github there is a file named, so it should be that

  3. Bill Reply

    Hi, I have been trying to do this on multiple websites, but all have been unsuccessful. None of the commands are working. Not even apt-get update. It runs for a while, but then returns a bunch of 404 errors. Any ideas?

  4. Herman Reply

    Hi, Thanks for the awesome post first.
    I started mining Monero as this tutorial, but I always got “invalid shares” on Dashboard.
    Any ideas about this issue?

    • Patrick [RaspberryTips] Post authorReply


      Nope no ideas
      And I tried this tutorial this week on Raspberry Pi 4 to see if the results are better and I didn’t see major issues with Buster

      Are you using Minergate or another pool?
      With Minergate you can probably ask them
      check this link:

    • Jan Reply

      Hi Herman, is there any chance you’d be able to upload an image of your setup. I’ve been trying to get this working for ages, have had to reinstall raspian from scratch 5-6 times. If you’ve got it working I’d be so grateful for a copy. Obviously, a version which is safe for you to upload, with your wallet info and wifi passwords removed etc. If you can, you can, if you can’t thats fine too. Thanks in advance, Jan

  5. Jan Reply

    Just feeding back: It also didn’t work for me when I did sudo ./build-linux-arm but it DID work when I did sudo ./

    It definately needs the sh on the end

    So far so good.
    The final step (sudo ./ takes about 2 minutes.

    While doing sudo ./, I encountered the following error:
    “algo/rainforest.c: In function ‘rf_crc32_32’:
    algo/rainforest.c:411:7: error: ‘rf_crc32_table’ undeclared (first use in this function); did you mean ‘rf_crc32_32’?
    algo/rainforest.c:411:7: note: each undeclared identifier is reported only once for each function it appears in
    algo/rainforest.c: In function ‘rf_add64_crc32’:
    algo/rainforest.c:461:7: error: ‘rf_crc32_table’ undeclared (first use in this function); did you mean ‘rf_crc32_32’?
    make[2]: *** [Makefile:2410: algo/cpuminer-rainforest.o] Error 1
    make[2]: *** Waiting for unfinished jobs….
    mv -f algo/.deps/cpuminer-pluck.Tpo algo/.deps/cpuminer-pluck.Po
    mv -f algo/.deps/cpuminer-neoscrypt.Tpo algo/.deps/cpuminer-neoscrypt.Po
    mv -f sha3/.deps/cpuminer-sph_radiogatun.Tpo sha3/.deps/cpuminer-sph_radiogatun.Po
    make[2]: Leaving directory ‘/opt/cpuminer-multi’
    make[1]: *** [Makefile:2881: all-recursive] Error 1
    make[1]: Leaving directory ‘/opt/cpuminer-multi’
    make: *** [Makefile:694: all] Error 2
    Compilation failed (make=0).
    Common causes: missing libjansson-dev libcurl4-openssl-dev libssl-dev
    If you pulled updates into this directory, remove configure and try again.”

    (31/08/19, clean raspian install, raspberry pi 3B+)

      • Brady Reply

        Has there been any resolution to this? I am having the same issue, ending with:
        Compilation failed (make = 0)
        Common causes: missing libjasson-dev libcurl4-openssl-dev libssl-dev

  6. ben Reply

    where do you executethe command to run? is it in the cd for cpuminer or just normal??

  7. Patrick Fromaget Post authorReply


    Just tested this on Buster, and it works perfectly

    As Mike wrote, we can now use “./”
    I’ll edit the tutorial immediately to avoid this issue

    And yes, you need to be in the correct path to execute the cpuminer command
    Or use the complete location: /opt/cpuminer-multi/cpuminer

Leave a Reply

Your email address will not be published. Required fields are marked *