Bitcoin Mining Using Raspberry Pi (2024)

Introduction: Bitcoin Mining Using Raspberry Pi

By ssarthak598LinkedIn

More by the author:

About: I build products which solve real world problems. More About ssarthak598 »

Want to mine some bitcoins? Want to earn for free? Have a pi not being used?

Then lets mine some bitcoins!

Step 1: What Is BitCoin?

If you don’t know already, Bitcoin is a virtual currency set up in 2009. Bitcoin has grown in reputation over the past few years becoming a very popular as a method to pay for services over the internet. The value has rocketed recently thanks to the huge coverage in the media, for both positive and negative reasons.

There are two ways to get Bitcoin:

-Buying them from an exchange, which is the process of converting local currency to Bitcoin.

-Mining them. Mining is the process of verifying transactions in the blockchain.

As the whole of the Bitcoin system is decentralised, every transaction is publically viewable within what is called the blockchain. This blockchain contains every bitcoin exchanged between users so, as there is no central server, it has to be self governed. This is the job of the miners.

Step 2: Requirements

In order to mine Bitcoin, you will

A pool account

Bitcoin Wallet

Raspberry Pi

Raspbian image SD card

USB Bitcoin miner

Step 3: Creating an Account

There are two things you need to do:

Download a bitcoin wallet

Create a pool account

Set up paymentSet up workers

Download a Bitcoin Wallet

A wallet is a program that sits on your computer and gives you a wallet address, this is a unique string of numbers and letters that you will use to receive bitcoins. Download the client for your computer from https://bitcoin.org/en/download

After installation, you will have to save a file called wallet.dat, keep this file safe, as this contains your unique wallet address within it, including all bitcoins that you will gain. If you lose this file, you cannot recover any bitcoins it contained.

Create a Pool Account Once you have a wallet address, create a pool account. A pool is a huge collection of other people working towards gaining bitcoins. Due to the complexity of mining a bitcoin, it has become unrealistic to solo mine–the act of processing millions of numbers to solve the block problem. Working as a group, or pool, lets everyone have a chance of earning some Bitcoin. There are many pools around, in this tutorial I’ll be using one called Slush’s pool: https://bitcoin.org/en/download

Set Up Payment

Once you have created a pool account, you'll need to enter your unique wallet address into the Bitcoin payout address.

Create Worker Account

Next step is to create a worker login account. Within your pool account you have the ability to create something called a worker for each of your bitcoin miners, so you're able to monitor them all separately just in case one should fail.

Each worker has its own login name and password. Whilst you are on My Accountclick Register New Worker and give it a name, for example; worker, and a password. Now you're ready to set your Raspberry Pi mining for Bitcoin.

Step 4: Setting Up the Raspberry Pi

Start with a fresh Raspbian install, if you don’t know who to do this, read the tutorial How to Install NOOBS on a Raspberry Pi With a Mac.

If you plan on running more than one Bitcoin miner at the same time, it is best to use a powered USB hub. Take into account the power rating as mining will need a lot of power, as much as one mp per miner.

With your USB miner attached to your Raspberry Pi, let’s get everything installed.

Step 5: Installing Required Libraries

The miner to be installed comes as source files, which means that the program must be compiled into a binary before it can be run. To make a program, in this case BFGMiner, many dependencies are required.

Dependencies are additional software, or libraries the program needs in order to compile properly, as it has been developed using them to make the software more efficient. Hopefully you will be seeing the Raspbian desktop, so double click on LXTerminaland type in the following:

1) sudo apt-get update

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

This process will take a few minutes to complete.

Step 6: Installing BFGMiner

Once all the dependencies have been installed, now it is time to download and install BFGMiner, so type the following into LXTerminal. It’s normal for these to take a few minutes to complete so some patience is needed.

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

./autogen.sh

./configure

make

You will be greeted with a screen that looks similar to the following:

Step 7: Start Mining Bitcoin

Now you’re ready to start mining. To do this, providing you're using Slush’s pool, you’ll use the following command:

./bfgminer -o stratum.bitcoin.cz:3333 -O username.worker:password -S all

The username section is composed of two parts, the username that you use to login to the pool, and worker which is the worker name you gave when you registered the worker. Finally, the password that was set when you created the worker.

That’s a lot of numbers, so I’ll make some of them a bit clearer.
Current mining speed, typically calculated in megahashes or gigahashes. The number of hashes a second that can be calculated the better. A hash is an algorithm of converting numbers and letters into an undecryptable set of characters. So a miner is used to process millions of numbers in an effort to match the hash to guess the original number. The more hashes that can be processed the faster it is able to solve the problem.

Number of accepted shares. A share on a pool is to show the miner has successfully worked out a given problem, so the more shares you can process the better your reward from the pool.

Detailed information on accepted shares and pool updates. This is a running log of what is currently happening with the miners and basic pool information, such as messages of updates and when new blocks are found.

More information can be found at the BFGminer github site.

Step 8: Conclusion

Following these steps will leave you with a very energy efficient bitcoin miner, as a Raspberry Pi only uses four watts of power, and a miner is typically 2.5W. Mining used to be done with computers consuming over 700W for the same process so to make a jump in savings helps repay the cost of the hardware we are using.

All there is to do now is to sit back and watch the money slowly build up. Though it is important that you understand that Bitcoin value fluctuates wildly, it is extremely volatile, so invest at your own risk.

You can also put up LCDs. Connect more Pis for getting better speed :D

For more information there are a number of websites and forums available, such ashttps://bitcointalk.org/,to help get you started.

Bitcoin Mining Using Raspberry Pi (5)

Runner Up in the
Pi/e Day Contest

Bitcoin Mining Using Raspberry Pi (2024)

FAQs

Is Bitcoin mining with Raspberry Pi worthwhile? ›

Due to its limited processing power, the Raspberry Pi is not suitable for mining high-demand cryptocurrencies like Bitcoin.

Is Bitcoin mining just guessing? ›

Crypto miners use specialized, high-energy computers, aka nodes. These computers use trial and error, guessing repeatedly until they find a solution. The more computer power a crypto miner uses, the more attempts they can make to solve the puzzle.

Can you run Bitcoin on Raspberry Pi? ›

It's free and the easiest to set up a Bitcoin node on a Raspberry Pi. You'll need to download the OS, flash it on a microSD card and plug that into your Raspberry Pi.

How powerful of a computer do you need to mine Bitcoin? ›

Anyone can participate in the Bitcoin mining process, but unless you have access to powerful computers known as ASICs (that's “application-specific integrated circuits”), your chances of winning a Bitcoin reward are pretty low.

Can I trust PI mining? ›

The Pi Network app does not actually mine cryptocurrency. Instead, it uses a system called "proof of stake" to distribute coins to users. This system is not as secure as traditional mining, and it is more susceptible to fraud.

What is the most profitable Bitcoin mining hardware? ›

Quick Look: The 8 best Bitcoin mining hardware machines in 2024
  • Bitmain AntMiner S19 Pro.
  • Bitmain AntMiner S9.
  • Bitmain AntMiner T19.
  • Whatsminer M30S++
  • Canaan AvalonMiner 1246.
  • Dragonmint T1.
  • Ebang Ebit E11++

How long does it take to mine 1 BTC? ›

The time it takes to mine 1 Bitcoin depends on your computing power
Number of mining rigsHashrateTime to mine 1 Bitcoin
10012,000 TH/s51 days
50060,000 TH/s10 days
1,000120,000 TH/s5 days
5,000600,000 TH/s1 day
4 more rows
Feb 16, 2024

Why Bitcoin mining is not profitable? ›

Mining Bitcoin has become increasingly difficult and expensive over the years, so it is no longer as profitable as it once was. The profitability of mining Bitcoin depends on a number of factors, including the price of Bitcoin, the cost of electricity, and the hash rate (the computing power of the network).

Is Bitcoin mining a waste of resources? ›

Subsequently, global BTC mining emitted more than 85.89 Mt of CO2eq from 2020 to 2021, equivalent to carbon emissions from 84 billion pounds of coal burned, 190 natural gas-fired power plants, or over 25 million tons of landfilled waste.

What do I need for a Bitcoin node on Raspberry Pi? ›

Bitcoin Node Requirements
  • Operating System: Windows / Mac / Linux.
  • CPU: Basically anything from a Raspberry Pi to Core i7.
  • RAM: 2 GB+
  • Disk Space: 7 GB+
  • Internet Connection: 0.4 Mbps+ Broadband.
  • Download Quota: 20 GB+ per month.
  • Upload Quota: 200 GB+ per month.
Jul 28, 2023

Which Raspberry Pi for Bitcoin node? ›

Bitcoin Full Node Setup. You will need: Raspberry Pi 4 (4GB Memory, at least 32GB micro SD storage)

Do Bitcoin nodes make money? ›

While mining nodes can earn rewards in the form of Bitcoins by creating new blocks, full nodes are responsible for verifying and confirming transactions without receiving any financial reward. This separation of tasks contributes to the security and efficiency of the entire network.

Do you need WiFi to mine Bitcoin? ›

A 4G modem and WiFi router are required if you use your PC for crypto mining. Additionally, an Ethernet cable is required to connect to the equipment used to mine. For your mining farm, a WiFi router and adapter are necessary. A network with automatic restarts is the last thing you'll need for your crypto mining.

What is the best computer for mining Bitcoin? ›

The Bitmain Antminer S21 Hyd 335T is the most profitable Bitcoin mining machine currently, followed by the Canaan Avalon Made A1266, and MicroBit Whatsminer M50S.

How much memory do you need to mine Bitcoin? ›

You should have a minimum of 8GB RAM for mining. A good memory for mining is important for stability and efficiency. If you're looking for a GPU, you can choose AMD or Nvidia graphics cards. AMD GPUs are the most popular, but a simple Intel CPU will do the trick.

What are the disadvantages of pi mining? ›

Users can also speed up “mining” Pi if they invite other people through a referral code. However, after three years since it launched, this cryptocurrency is still almost worthless. Pi has yet to appear on any cryptocurrency exchanges or be used in the exchange of goods and products.

How much money can you make mining monero with a Raspberry Pi? ›

Start mining

The Pi 3 has 4 treads that can be used to get around 9.25 H/s. This should bring in 0.00026 XMR per week at the current difficulty. With the price of XMR at $244.33 at the time of writing this, I will earn 0.064 USD per week.

Is Raspberry Pi 4 good for mining? ›

Track Your Mining Progress

New models like the Raspberry Pi 4b can produce up to 1.75 MH/s, compared to my ridiculously low 252.35 KH/s. While I might not get rich, it took me less than five minutes to start mining and I had an extra Raspberry Pi. It's a nice, slow-growing side income with little effort.

Does Bitcoin mining produce anything useful? ›

The Bottom Line. Bitcoin mining serves the crucial function of validating and confirming new transactions on the Bitcoin blockchain. It is also the way that new bitcoins are introduced into the system.

Top Articles
Latest Posts
Article information

Author: Lilliana Bartoletti

Last Updated:

Views: 6392

Rating: 4.2 / 5 (53 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Lilliana Bartoletti

Birthday: 1999-11-18

Address: 58866 Tricia Spurs, North Melvinberg, HI 91346-3774

Phone: +50616620367928

Job: Real-Estate Liaison

Hobby: Graffiti, Astronomy, Handball, Magic, Origami, Fashion, Foreign language learning

Introduction: My name is Lilliana Bartoletti, I am a adventurous, pleasant, shiny, beautiful, handsome, zealous, tasty person who loves writing and wants to share my knowledge and understanding with you.