Search This Blog

Wednesday, January 24, 2024

Raspberry Pi: How to mine Monero

As I was looking for projects for Raspberry Pi I found a video on Youtube that NetworkChuck had posted. One project that I wanted to try for a few days was to mine cryptocurrency on the device, mostly to see if it was possible and learn what the process looks like. While the Pi 5 is the most powerful yet, it does not compare to dedicated mining machines. Simply put, it was interesting to learn but not a profitable venture in the slightest.

Some things to consider are the following:

- You are part of a miner pool, since your hardware might be weak you pool your resources with others and thus share the rewards with the pool

- There is a minimum payment threshold before the currency is sent to your wallet, I mined for 4-5 days straight and did not see any results in the wallet.

Download and install the wallet

I used the basic GUI wallet from Monero, they have a regular installer for Windows.

You install it like any other app, keep in mind that you can avoid the 90gb storage by running it in simple mode. It will take a while to sync the so called blockchain when starting up the wallet, but you avoid having to deal with 90gb of storage. A server somewhere else will be handling this for you, so it is also less anonymous if that is important for you.

Pro tip: Store your account recovery details, passwords etc. safely.

In your wallet you can find your wallet address under the account tab, use this when you start your Monero miner on the Raspberry Pi 5 later.

To install the miner

First I created a folder called monero.

Then went into the folder, ran the following code from the terminal:

sudo apt install git build-essential cmake libuv1-dev libssl-dev libhwloc-dev -y

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

cd xmrig

mkdir build && cd build

cmake ..

make

To start the miner 

Be in the build folder and enter the command below. You define which pool, which address and what you want to name your miner in case you have several computers mining at the same time.

./xmrig -o gulf.moneroocean.stream:10128 -u <wallet adress goes here> -p pi5

While it is mining you can press H to check your hashrate, higher is better. To see what you have contributed press S. Press C to check your connection, such as your difficulty.

To stop the miner

Ctrl + C, like any other command in a terminal

No comments:

Post a Comment