Full Bitcoin node on a Raspberry Pi 3 with or without a PiDrive
5 stars based on
33 reviews
Bitcoin is a digital currency supported by a peer-to-peer network. In order to run efficiently and effectively, it needs peers run by different people…. This system will not mine for Bitcoins…it will play its part to keep the Bitcoin peer-to-peer network healthy and strong.
For a detailed explanation for why it is important to have a healthy Bitcoin peer-to-peer network, read this article about Bitcoin full nodes. In fact, once the server is set up, you will only interact with it using command line calls over SSH. Raspberry Pi is an inexpensive computing hardware platform that generates little heat, draws little power, and can run silently 24 hours a day without having to think about it. I decided to create my own Bitcoin full node on a Raspberry Pi.
My Raspberry Pi full node is up and running, performing well, has about 75 peers and is relaying transactions to the Bitcoin network. I have to say, ever since I got it set up it has been low maintenance. I am going to assume that if you are reading this to create your own Raspberry Pi bitcoin full node, then you already know a little bit about linux, electronics, or running command line tools like SSH. Prepare the MicroSD Card: I suppose you could go for GBs to be even more future-proof, if you are willing to spend the money.
If you only have a Linux box to start, you probably already know how to format the microSD card. Install the operating system: Installing software on a Raspberry Pi can be mildly complicated. There are ways to avoid using a keyboard, video display, and mouse KVM altogether. But in the interest of keeping things simple I recommend putting your Raspberry Pi into its case, then insert the microSD card into your Raspberry Pi trust me, it is easier to put the case on firsthook up the KVM cables, plugin the ethernet cable, and plugin the power.
Install dependencies broken up here to show more cleanly - you can do one apt-get call if you want:. Verify your Bitcoin full node is working: Assuming all went well above you can just type the following in your command line:. If you type the following you will see the status of your Bitcoin full node:. It will likely tell you that it is loading the blockchain or tell you how many blocks have been loaded thus far. If you made it this far, congratulations! Unfortunately, you are far from over.
For now, just stop the Bitcoin server you just worked so hard to start with the following command:. Once it gets to about blockit starts to run out of RAM and all of the coaxing in the world does not help.
If you want to give it a try, start up the Bitcoin service using that switch and see if that will allow you to synchronize the blockchain without running out of RAM. Again, just my experience and newer versions of Bitcoin may resolve this issue. Synchronize the blockchain on your primary machine and then simply copy your personal seed of the Bitcoin blockchain to your Raspberry Pi full node. Now you should be able to start up your bitcoin server again and start relaying Bitcoin transactions in realtime.
Just execute the Bitcoin server command:. Make sure port forwarding is turned on in your router: One more, quite important thing…you need to enable port forwarding on your router to point to port to your internal Bitcoin full node IP address.
How do you do this? Why do you need port forwarding? Basically it allows other Bitcoin peers to automatically connect to you without the need for you to invite them first. Without port forwarding you will have far fewer peers and not allow the Bitcoin network to be healthy. So much so, that you cannot really claim you are running a full node without port forwarding or wide open IP access enabled.
Why a Bitcoin Full Node? Why a Raspberry Pi? Background I decided to create my own Bitcoin full node on a Raspberry Pi. You should be all set! Remember when you want to check in on things just open and SSH connection and run: