What is Monero? Crypto currencies reminderA 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
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 PiNow 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 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 Keep this information safe, you’ll need it later Install RaspbianIf 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 systemsudo apt update sudo apt upgrade Install all needed dependenciessudo 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 commandscd /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 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://xmr.pool.minergate.com:45700 -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:
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 ProfitabilityAfter 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
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
EducationEven 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 questionsMy 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:
ConclusionThat’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