The Raspberry Pi is a great hobby mini-computer, but what if we can also use it to make money?
The rise of Bitcoin has created an interest in cryptocurrency mining. If you have a spare Raspberry Pi lying around, you can put it to work mining for digital currency.
5 Steps to Mining Crypto With Raspberry Pi
- Install an Ubuntu server on your Raspberry Pi to start mining.
- Select the cryptocurrency you want to mine.
- Choose a wallet for your cryptocurrency.
- Execute the necessary code to run the miner.
- Track your progress.
I used Ubuntu server 20.04.3 long-term support (LTS), which supports Raspberry Pi 3, 4 and 400 on the 64-bit version, and an old Raspberry Pi 3 Model B revision 1.2 that I had lying around.
I am going to mine Duino-Coin, which is a coin that can be mined with an array of technologies, including Arduinos ESP8266/32 boards, Raspberry Pis and computers, as well asWi-Fi routers, smart TVs, smartphones, smartwatches, single-board computers (SBCs), microcontroller units (MCUs) and graphics processing units (GPUs).
How to Set Up Your Raspberry Pi to Crypto Mine
Installing Ubuntu on the Raspberry Pi is a very straightforward process. You can find detailed documentation on the Ubuntu website.
After the installation and boot of Raspberry Pi, we can log in with secure shell protocol (SSH) and should be presented with the Ubuntu server start screen:
Welcome to Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-1042-raspi aarch64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
System information as of Mon Dec 6 13:23:09 UTC 2021
System load: 1.2 Temperature: 45.1 C
Usage of /: 13.8% of 13.93GB Processes: 137
Memory usage: 28% Users logged in: 0
Swap usage: 0% IPv4 address for eth0: xxxxxxxxx
We can even see the temperature of the Raspberry Pi. Mine seems to be at 45 degrees Celsius just after boot.
Set Up Your Cryptocurrency
To set up Duino-Coin, all you need to do is follow these commands. We start by installing all the dependencies:
# Update package repositories and install dependencies
$ sudo apt update
$ sudo apt install python3 python3-pip git python3-pil python3-pil.imagetk -y
Then we can clone the Duino-Coin repository:
# Clone Duino-Coin repository
$ git clone https://github.com/revoxhere/duino-coin
# Install Python dependencies for Duino-Coin
$ cd duino-coin
$ python3 -m pip install -r requirements.txt
We also need to generate a wallet where our mining profits are going to be added. Duino-Coin has a few wallet options, including a graphical user interface wallet, a command line interface wallet and a web wallet.
I chose the web wallet because it has additional features, like the ability to view your miner stats and calculate estimated profits.
Start Crypto Mining With Raspberry Pi
To run the miner, we need to execute the following command:
# Run Miner (inside duino-coin directory)
$ python3 PC_Miner.py
Duino-Coin basic configuration tool
Edit Duino-Coin PC Miner 2.75/Miner_config.cfg file later if you want to change it.
Don't have an Duino-Coin account yet? Use Wallet to register on server.
Enter your Duino-Coin username: xxxxxxxxxx
Set mining intensity (1-100)% (recommended: 95): 95
Set mining threads (recommended for your system: 4): 4
1 - Low difficulty (for Raspberry Pis, older computers)
2 - Medium difficulty (for typical computers)
3 - Network difficulty (for powerful computers)
Select mining difficulty you want to use (1-3): 1
Do you want to add an identifier (name) to this rig? (y/N): y
Enter desired rig name: RPI3
Set developer donation level (0-5) (recommended: 1), this will not reduce your earnings: 1
Config saved! Launching the miner
‖ Official Duino-Coin © Python Miner (2.75) 2019-2021
‖ https://github.com/revoxhere/duino-coin
‖ CPU: 4x Cortex-A53
‖ Developer donation level: 1
‖ Algorithm: DUCO-S1 ⚙ Low diff
‖ Rig identifier: RPI3
‖ Have a peaceful afternoon, xxxxxxxxx!
16:12:51 net0 Searching for the fastest node to connect to
16:12:52 sys0 Thank You for being an awesome donator ❤️
Your donation will help us maintain the server and allow further development
16:12:53 sys0 Mining thread #0 is starting using DUCO-S1 algorithm with 95% efficiency
16:12:53 sys1 Mining thread #1 is starting using DUCO-S1 algorithm with 95% efficiency
16:12:53 sys2 Mining thread #2 is starting using DUCO-S1 algorithm with 95% efficiency
16:12:53 sys3 Mining thread #3 is starting using DUCO-S1 algorithm with 95% efficiency
16:12:53 net0 MOTD: You are mining on Bilapool, have fun!
16:12:53 net0 Connected to master Duino-Coin server (v2.7, 51.158.113.59:6043)
16:12:55 cpu0 ⛏ Accepted 1/1 (100%) ∙ 02.1s ∙ 54 kH/s ⚙ diff 2 k ∙ ping 18ms
16:12:55 cpu3 ⛏ Accepted 2/2 (100%) ∙ 02.4s ∙ 110 kH/s ⚙ diff 2 k ∙ ping 16ms
16:12:55 cpu1 ⛏ Accepted 3/3 (100%) ∙ 02.5s ∙ 165 kH/s ⚙ diff 2 k ∙ ping 18ms
16:12:56 cpu2 ⛏ Accepted 4/4 (100%) ∙ 03.1s ∙ 220 kH/s ⚙ diff 2 k ∙ ping 44ms
16:12:57 cpu1 ⛏ Accepted 5/5 (100%) ∙ 01.7s ∙ 222 kH/s ⚙ diff 5 k ∙ ping 21ms
16:13:00 cpu2 ⛏ Accepted 6/6 (100%) ∙ 04.3s ∙ 224 kH/s ⚙ diff 4 k ∙ ping 20ms
16:13:01 cpu0 ⛏ Accepted 7/7 (100%) ∙ 06.0s ∙ 225 kH/s ⚙ diff 5 k ∙ ping 26ms
16:13:02 cpu3 ⛏ Accepted 8/8 (100%) ∙ 06.9s ∙ 226 kH/s ⚙ diff 5 k ∙ ping 16ms
16:13:02 cpu1 ⛏ Accepted 9/9 (100%) ∙ 05.2s ∙ 224 kH/s ⚙ diff 5 k ∙ ping 20ms
16:13:05 cpu3 ⛏ Accepted 10/10 (100%) ∙ 03.2s ∙ 225 kH/s ⚙ diff 4 k ∙ ping 16ms
16:13:06 cpu2 ⛏ Accepted 11/11 (100%) ∙ 05.2s ∙ 224 kH/s ⚙ diff 4 k ∙ ping 20ms
16:13:06 cpu0 ⛏ Accepted 12/12 (100%) ∙ 05.3s ∙ 223 kH/s ⚙ diff 4 k ∙ ping 16ms
On the first run, the script will ask for the following configuration:
- Wallet Username: This is what you created in the previous step.
- Mining Intensity: Normally it’s 95 percent but if you aren’t using the Raspberry Pi for something else, you can go up to 100 percent.
- Mining Threads: This depends on your Raspberry Pi hardware. Mine has four cores, so I chose four threads.
- Mining Difficulty: For the Raspberry Pi, a low setting is recommended
- Designate a Rig Name: You can choose not to add a name, but I suggest using a name so you can easily track your stats.
- Developer Donation: You can choose to support the developer or not.
Then the miner will start its work. And that’s all you need to do to start mining Duino-Coin on the Raspberry Pi.
Track Your Mining Progress
You can go to your wallet to check your miner stats:
As you can see, after a couple of hours, the results are not a million dollars but an estimated $0.003 daily.
Keep in mind, however that this is an old Raspberry Pi 3. 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. Maybe in a year, I’ll be able to afford a nice coffee.
Crypto mining is a hot topic in the world of technology and finance. Raspberry Pi offers an inexpensive entry point for those looking to start making money through cryptocurrency.
While it’s not as powerful or efficient as some more expensive solutions, it can still provide you with a steady stream of income.