Is it really possibile?
Many people ask themselves if t is possible to use their small Raspberry to earn money in general. With criptocurrencies spreading all over the world, mining has become really popular and easy to access also with a very simple PC. But, honestly, if you are expecting to generate an income by mining criptocurrencies, I must advise you that this is really hard. However, I will explain a step-by-step guide to make possible mining in our Raspberry.
What we need
- Raspberry PI 3 model B kit (including at least also case, USB adapater and power supply)
- 1 micro SD card (at least 8 GB, preferrably class 10) with an SD adapter
- 1 HDMI cable (not strictly necessary)
- a USB/wireless keyboard
You can find in Amazon or other e-commerce vendors many offers related to starter kits (for example give a try here) which includes part of above component. I strongly suggest to evaluate to buy a case with cooling system with fans (for example give a try here).
I will configure my raspberry by ssh connection from my PC with Putty.
I will also use as mining software “cpuminer-multi”. This is a multi-threaded CPU miner, fork of pooler’s cpuminer and supports a wide number of algorithms.
We suppose to start from a configuration of Raspberry 3 model B with Raspbian Stretch Lite. You can achieve it by following my guide in Installing Raspbian Stretch Lite in your Raspberry Pi 3 model B.
Let’s connect to our Raspberry:
Install all dependencies:
sudo apt-get install automake autoconf pkg-config libcurl4-openssl-dev libjansson-dev libssl1.0-dev libgmp-dev make g++ git
and confirm installation.
Clone git repository where cpuminer-multi is hosted:
git clone https://github.com/tpruvot/cpuminer-multi
enter the new folder created:
Compile with following 3 commands:
./autogen.sh ./configure --disable-assembly CFLAGS="-Ofast -march=native" --with-crypto --with-curl make
Last command will take some minutes.
Now you are ready to start mining. Waiting for my new article where I will explain differences between solo mining and pool mining, you can try you miner installation registering in a mining pool and connecting to it.
For example, I usually use Minergate (here you can register), and this is how to start mining.
Choose your coin to be mined: in the following example I will mine Bytecoin (be aware, it is different from most famous BitCoin and better suitable for low performance hardware). So, next command will be the following:
./cpuminer -a cryptonight -o stratum+tcp://bcn.pool.minergate.com:45550 -u <<YourMinergateMail>> -p <<YourMinergatePassword>> -t 3
where you have to edit:
- <<YourMinergateMail>> with mail address used to register in Minergate
- <<YourMinergatePassword>> with password set during Minergate registration
last option, “-t 3” set the maximum number of cores usable. I strongly suggest not to use all cores because of temperature growth that could lead to Hardware failures. Take a continuous look on system temp with the following command:
watch cat /sys/class/thermal/thermal_zone0/temp
which gives you a continuous look to system temperature (divide resulting number by 1000 and you have temperature in °C)