The little raspberry pi that could mine Monero.

Author:

Background (Oversimplified)

Bitcoin is easily the most well-known crypto currency out there, so you may be asking yourself why don’t we just mine that? The short answer is we can’t, it’s to difficult. To get any sort of results You would have to rely on GPU’s and specialized machines called ASIC That are specifically designed to mine Bitcoin. Mining with your GPU can shorten the lifespan significantly but most people just want to use them to play games and ACIS can range in price from $1500 to tens of thousands of dollars. When these high-level minors have an operation like this they don’t just buy one there are data centers full of them. Doesn’t seem fair does it? This is where Monero comes out on top for your average person. Don’t ask me how but built into the algorithm it is not worth the effort to use an ASIC. You would be better off using the CPU in your gaming PC then an ASIC which is good for us. Bitcoin Is also not private like people say it is. Every transaction ever made is clearly visible on the block chain Monero isn’t perfect but it still leaves Bitcoin in the dust.

I will be setting this up on a raspberry pi quad core with 8 GB of RAM. If you need help getting started here is a link to my previous post click the raspberry.

ssh in to your pi and clone the following repositories you might have to install git.

git build-essential cmake libuv1-dev libssl-dev libhwloc-dev 

git clone https://github.com/xmrig/xmrig.git

I’d recommend making a directory for the build to keep things organized.

mkdir build 
cd build
make

Let it run, this will take a while. In the meantime we can set up a wallet.

Head over to the link below to download the official Monero wallet. I set mine up using the GUI wallet on Windows.

https://www.getmonero.org/downloads/

I use the simple settings just to get started but it can be changed at any time.

  • Choose a name
  • you’ll see a list of 25 words write these down and make multiple backups. This is your seed phrase this is how you recover your wallet When you forget your password. Do not share this with anybody.
  • It will make you fill in some of the words to make sure you are paying attention. Again make sure to write this down and keep multiple backups.
  • make a strong password.

Wait for your wallet to synchronize. Go to account tab on the left and copy your wallet address. Head back over to your raspberry pi. Go to where you installed the minor and fill in the blanks and press enter.

Running the command as root increases your hash rate significantly.

./xmrig -o (pool name) -u (wallet) -p (minername)

It will take a minute but eventually you’ll see something that looks like this. New job signifies you got a new math problem to work on and accepted means you contributed enough to earn a tiny reward. You can get denied which means you weren’t contributing enough to get a portion but I haven’t seen that yet.

To view your Hash rate a.k.a. how many guesses are you making per second type (h). My pi is currently has a hash rate of 93.07 per second. (s) will show you how many shares you have contributed to as well as your difficulty. This is the command You probably will be using the most. Other commands are (c) to view your connection. (p) two pause mining and (r) two resume.

I left my pi running overnight for about 10 hours and was able to get about 1,137 shares. So is this going to be a very profitable venture? No but I did do the math, if I run my pi overnight for 10 hours every night it only cost me about approximately $3.53 a year. That’s almost as much as one Starbucks Venti, and yes I googled that. I learned more about crypto currency over the past 3 days setting up and researching all of this so I still consider that a win. I also plan on getting a case for my pi was a fan and I’d be curious to see what it can do if I overclock it. I may also attempt this on my main machine or my server for comparison sake.