Raspberry Pi Bitcoin Mining – Is That Profitable?

Raspberry Pi Bitcoin Mining

The Raspberry Pi is a very small and affordable computer that runs based on the Raspberry Pi OS. These types of computers are small single-board computers developed in the United Kingdom by the Raspberry Pi Foundation. You can use the Raspberry Pi computer to learn programming through fun, practical projects. But can you use the Raspberry Pi for Bitcoin mining and if you can then is it profitable?

According to many reliable sources, the Raspberry Pi 4 can generate 108 hashes per second. If the statistic is right then you will be able to mine approximately 0.00005127 XMR per day and it will earn you $0.07156 a day. But if you don’t have a free power source like solar panels then mining with Raspberry Pi 4 won’t be profitable because the power consumption will cost you more than what you will earn from the mining with Raspberry Pi.

What Is Cryptocurrency Mining?

What Is Cryptocurrency Mining

Cryptocurrency mining is a type of mining that you can think of like a digital version of gold mining where you have to perform combined complicated calculations and pure luck with your computer to mine various cryptocurrencies including Bitcoin. In fact, cryptocurrency mining is a process where mining rigs (specialized computers) are used to validate blockchain transactions for a specific crypto coin. In return, you will receive a mining reward for your computational effort.

What Is Bitcoin Mining?

Bitcoin mining is the process of introducing new Bitcoin to circulation by solving a computational puzzle. This process is also used for adding transaction records to Bitcoin’s public ledger of the blockchain. This process is also used for verifying bitcoin transactions. So, bitcoin mining is not only a process of creating new coins but is also used for validating cryptocurrency transactions. You will require sophisticated hardware to solve the extremely complex computational math problem.

How Bitcoin Mining Works?

How Bitcoin Mining Works

The main purpose of Bitcoin mining is to solve the computational math problem and the first computer to find the solution to the problem is awarded the block of Bitcoin. You will need high configuration expensive computers and enormous amounts of electricity to solve the puzzle and win the bitcoin block. You will require hardware that is known as application-specific integrated circuits or ASICs and it might cost you around $10,000. If you can successfully add a block to the blockchain then you will earn 6.25 Bitcoins as a reward.   

Requirements For Raspberry Pi Bitcoin Mining

If you want to mine Bitcoin using Raspberry Pi then you will need below items – 

1. Raspberry Pi 4 or Raspberry Pi 3

2. 8 GB (or larger) microSD card (see best Raspberry Pi microSD cards) with a fresh install of Raspberry Pi Lite OS or Raspberry Pi OS with Desktop.

3. Power supply/Keyboard/Mouse/Monitor/HDMI Cable (for your Raspberry Pi)

4. Optional (Recommended): Heatsinks and fan for your Raspberry Pi

5. Optional: Solar Panel Power Bank with USB-C

6. Optional: Raspberry Pi Cluster Case with Heatsinks and Fans 

How To Mine Bitcoin With Raspberry Pi

You can easily mine Bitcoin using the Raspberry Pi. You will need quite a few items to mine Bitcoins and your total cost would be $55-$460. To mine Bitcoin with Raspberry Pi you have to create a pool account and download a Bitcoin wallet. After installing a Bitcoin wallet, you will be able to create a pool where other miners also participated. After creating a pool and wallet you have to configure payment by entering your wallet address. If you have one ASIC Bitcoin miner, you’ll need one worker account. In order to set up the Pi, install the proper libraries:

sudo apt-get update

sudo apt-get install autoconf autogen libtool uthash-dev libjansson-dev libcurl4-openssl-dev libusb-dev libncurses-dev git-core –y      

Next, install BFGMiner:

git clone https://github.com/luke-jr/bfgminer.git

cd bfgminer




After installing the BFGMiner, you are ready to mine Bitcoin. Now, simply enter the proper commands, details are available on the BFGMiner GitHub Readme.  

Single Pool Mining:

bfgminer -o http://pool:port -u username -p password

Multi-Pool Mining:

bfgminer -o http://pool1:port -u pool1username -p pool1password -o http://pool2:port -u pool2usernmae -p pool2password

Multi-Blockchain Mining:

bfgminer -o http://pool1:port -u pool1username -p pool1password –pool-goal default -o http://pool2:port -u pool2usernmae -p pool2password –pool-goal freicoin

Single Pool Standard HTTP Proxy Mining:

bfgminer -o http://pool:port -x http://proxy:port -u username -p password

Single Pool Socks5 Proxy Mining:

bfgminer -o http://pool:port -x socks5://proxy:port -u username -p password

Detail Process Of Mining Other Cryptocurrencies With Raspberry Pi

With Raspberry Pi, you can also mine other cryptocurrencies like Bytecoin, Monero, Magi, Storj, etc. Let’s check them out!

Bytecoin And Monero Mining With A Raspberry Pi

Required Items

1. Raspberry Pi ($35-60 USD)

2. Raspbian

3. CPUminer software

4. MinerGate account

5. Total Cost: $35-60 USD

If you want to mine Bytecoin and monero with Raspberry Pi then you have to register with MinerGate first. After installing MinerGate install the below dependencies:

sudo apt-get install autoconf libcurl4-openssl-dev libjansson-dev openssl libssl-dev gcc gawk

Then, clone the miner repository:

git clone https://github.com/lucasjones/cpuminer-multi.git

After finishing the above step, navigate into the CPUminer directory and compile the program:

cd cpuminer-multi




Now you are ready to start mining. Run the following help command to view instructions for using CPUminer:

./minerd –help

To Start Mining Monero, Run:

./minerd -a cryptonight -o stratum+tcp://xmr.pool.minergate.com:45560 -u [email protected] -p x -t 4

For Bytecoin Mining, Run:

./minerd -a cryptonight -o stratum+tcp://bcn.pool.minergate.com:45550 -u [email protected] -p x -t 4

Magi Mining With A Raspberry Pi

Required Items

1. Raspberry Pi ($35-60 USD)

2. Raspbian

3. CPUminer

4. Magicoin wallet

5. Total Cost: $35-60 USD

Mining Magi is quite similar to Bytecoin and Monero but here you will need Novaspirit’s CPUminer. Then you have to install Rapsbian. After the installation, compile the CPUminer software and its dependencies:

sudo apt-get install automake autoconf pkg-config libcurl4-openssl-dev libjansson-dev libssl-dev libgmp-dev make g++ git libgmp-dev

After that you have to clone the source code from GitHub:

git clone https://github.com/novaspirit/wolf-m7m-cpuminer

Now, generate the required files for compiling the miner:

cd wolf-m7m-cpuminer 


Next, You have to use compiler flags:

CFLAG=”-O2 mfpu=neon-vfpv4″ ./configure

After that, modify the makefiles to switch -march=native to -mcpu=acortex-a53. These are located at:

nano Makefile


naon m7/MakeFile

After completing the above steps, compile the software using the make command:

make -j4 

Now direct the software to a pool:

./minerd -a m7mhash -o urlofpool:8080 -u worker.1 -p password

Storj Mining With A Raspberry Pi

Required Items

1. Raspberry Pi ($35-60 USD)

2. Raspbian

3. Storj software

Storj Mining includes proof-of-retrievability therefore, it’s a fantastic cryptocurrency mining option with a Raspberry Pi. In order to mine Storj, first download, Download Node Version Manager:

wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.3/install.sh | bash

After that install the NVM Long Term Service (LTS) variant:

nvm install –lts

Aftewr the installation, perform an update: 

sudo apt-get update && sudo apt-get dist-upgrade

Then, install Python:

sudo apt-get install git python build-essential -y

After completing all the above steps, your Storj dependencies should be installed. To install Storj Share, enter:

npm install –global storjshare-daemon

Now, create a Storj Share node:

storjshare create –storj=YOUR_STORJ_TOKEN_WALLET_ADRESS –storage=/mnt/storjmerge/storj.io/ 

Finally, create a script to make Storj start everything simultaneously:

storjshare daemon

storjshare start –config /path/to/storjconfig/xxxx.json

Now, create a watchdog script in the home directory:

nano ~/watchdog.sh

In the watchdog.sh, add these lines:


. $HOME/.bashrc

. $HOME/.profile

. $HOME/.env

APP=$(ps aux | grep -v grep | grep storjshare)

if [ -z “$APP” ];


echo “Restart storjshare-daemon”

storjshare daemon


APP=$(ps aux | grep -v grep | grep ‘farmer.js –config’)

if [ -z “$APP” ];


echo “Restart farmers”

storjshare start –config $HOME/.config/storjshare/configs/1f100594a6c1830b3d135f537575dea05f41cbf1.json


Next, make this executable with:

chmod +x ~/watchdog.sh

And create a Cron job using:

crontab -e

by these lines:

*/5 * * * * $HOME/watchdog.sh

@reboot $HOME/watchdog.sh

Is Raspberry Pi Bitcoin Mining Profitable In 2022?

Is Raspberry Pi Bitcoin Mining Profitable

According to many expert opinions, mining for bitcoins with any consumer-grade computer is not profitable because of the cost of electricity and hardware. Therefore, miners now use ASIC Bitcoin Miners to minimize the cost. Moreover, many miners join a mining pool to reduce the cost and harness the power of a group of distributed computers. But if you want to mine with Raspberry Pi then you have to consider the cost of your power consumption as well as the price of the device. If you don’t have a free power source then it won’t be profitable to mine Bitcoin using Raspberry Pi Bitcoin.

Final Thought

Finally, crypto mining is profitable if you can do it properly. While mining cryptocurrencies, you have to try to minimize your cost to increase the profit. The price of Bitcoin is increasing day by day and if you want to mine Bitcoin to store them then Bitcoin mining with Raspberry Pi could be profitable for you. Apart from that mining Bitcoin with Raspberry Pi is not worth trying.

Last Updated on January 12, 2022 by Musa D

Scroll to Top