Building Your Own Bitcoin Node

Nathan Thomas
8 min readJun 3, 2022

--

Bitcoin logo on a picture of a desert

This article is part of a series from Nathan Thomas, a full stack software engineer working in San Francisco, CA. Some others include how to solve the Product of Array Except Self and Maximum Product Subarray code challenges.

Getting Started

Welcome, fam.

If you’re here, I think you’re in for a really awesome ride. I’m going to teach you how to build your very own Bitcoin node. 🔥

By the end, you’ll have something that you can open on your computer that will look like this:

Screenshot of a Bitcoin light node running
Screenshot of a Bitcoin node running

Nice, right?

Don’t worry, you’ll be there shortly too.

I always like to let people know what they’re getting into before going very far in my articles, so here it is:

  • This entire project will definitely cost some money (about $250 USD at time of writing, although you should be able to shop around for something much cheaper and used if you really want to)
  • You don’t need to know how to code
  • You do need some great computer literacy (installing programs, feeling confident working with SD cards, etc.)
  • Once you have the parts (more on that below) you’ll need several hours of time to set everything up

You know I’m all about typing up code to build awesome things, but that’s for another day. This tutorial doesn’t require code because I want everyone to be able to participate! 🙌🏻

Okay fam. Let’s get to it.

“I think the internet is going to be one of the major forces for reducing the role of government. The one thing that’s missing, but that will soon be developed, is a reliable e-cash, a method whereby on the Internet you can transfer funds from A to B without A knowing B or B knowing A… ”

Milton Friedman, Economist

Time to Buy Some Stuff

If you don’t have them already, you’ll need two main things — a Raspberry Pi, and an external SSD. Here’s what I recommend:

Don’t worry, those aren’t sponsored links. They’re just recommendations.

I make my money from other ways without having to write articles that trick you into buying stuff. 👍🏻

Also, as a fairly frugal person myself, I know it’s not fun to spend lots of money. 💸

The great thing about what you’re buying here is that none of these parts are specific to Bitcoin. You’ll be able to reuse the Raspberry Pi if you want for some really crazy projects in the future, and who can’t use a good external SSD for storage? Where else are you going to put all those photos of your great uncle’s third wedding from 2015?

If you decide not to get the Raspberry Pi kit I linked, just make sure to collect the following parts:

  • Raspberry Pi 4
  • Raspberry Pi 4 case & fan
  • Raspberry Pi 4 power supply
  • Ethernet cable
  • 16GB or larger microSD card
  • 1TB or larger SSD (with a USB A-type connection cord)

I realize it might take days for you to get these parts togethers, so go ahead and do your thing.

I’ll be waiting for you just down below when you get back.

“We are all now connected by the Internet, like neurons in a giant brain.”

— Stephen Hawking, theoretical physicist

Setting Up the Hardware

Now that you have the parts you need, there’s nothing standing in the way of getting your Bitcoin node up and running!

If you bought a Raspberry Pi kit, it should have instructions on putting it together. I’ll let you follow those. 🏗

If not, here’s a walkthrough of setting up a Raspberry Pi package that you can riff off of to try to set up any custom case/parts you might have bought.

Done? Nice.

The next thing you need to do is make sure your external SSD is formatted the right way. If you don’t, Umbrel (the software we’ll be using to have a nice GUI dashboard for our Bitcoin node) won’t be able to start downloading the Bitcoin blockchain.

If you have a Windows machine, you’ll need to format it for “Ext4” (walkthrough). If you have a Mac, format it for “Fat32” (walkthrough).

Done? Awesome.

Let’s move on to software. 🙌🏻

Installing the Software

First, you’ll need to flash Umbrel’s software onto your micro SSD card. To do this, install a SD card flasher like BalenaEtcher (for Mac, Windows, and Linux).

Next, download the most recent version of Umbrel. We’ll be flashing that onto the SD card in a second. 😎

Once you have the Umbrel OS image downloaded, connect your SD card and flash the image to it with BalenaEtcher:

Flashing the Umbrel OS image to an SD Card with BalenaEtcher
Flashing the Umbrel OS image to an SD Card with BalenaEtcher

On the first step here, you need to select the .img file that you just downloaded from the Umbrel website. Next, select the target as your SD card. Finally, you can go ahead and flash it!

Once that’s done, we’re ready for the next step — installing it on the Raspberry Pi! 🔥

“Think of Bitcoin as a bank account in the cloud, and it’s completely decentralized: not the Swiss government, not the American government. It’s all the participants in the network enforcing.”

— Naval Ravikant, former CEO of AngelList

Getting Your Node to Connect

Believe it or not, this is now the easy part if everything is set up correctly. Here are the steps for connecting your Bitcoin node to the network:

  • Put your microSD card into the Raspberry Pi port. It will look like this:
Raspberry Pi with an SD card being plugged into it
Image by raspberrypi.org
  • Next, put the Raspberry Pi into its case and connect the power cord
  • Plug in the external SSD drive, making sure to use one of the USB ports here:
Raspberry Pi with a USB being plugged into it
Image by raspberrypi.org
  • Next, plug the ethernet cord into the ethernet port right by where you plugged in the external SSD. Connect it to your router and plug the entire rig into the wall with the power supply.
  • Sit back and watch it turn on 🔌

“Bitcoin is a way to have programmable scarcity. The blockchain is the data structure that records the transfer of scarce objects.”

— Balaji Srinivasan, former CTO of Coinbase

It’s Aliiiiiive 🧟‍♀️

Now that your small zombie child is all wired up, you can kick back and just enjoy the rest of this process as Umbrel’s software does all the work.

Once the Raspberry Pi turns on, Umbrel will automatically boot up from the microSD card and start doing its thing. You should be able to grab your computer and go to http://umbrel.local (your computer needs to be on the same Wifi network as your Bitcoin node).

This is the front-end that will let you interact with your Bitcoin node. When you go there initially, this is likely what you’ll see (as it’s still setting up):

Umbrel loading screen
Umbrel loading screen

This could take a while, so don’t worry too much!

Once the node finally finishes booting up, you should be presented with a setup screen. Go through the flow and create your new account. When you get the chance, try enable 2 factor authentication (2FA) for extra security on your Bitcoin node (with something like Authy or Google Authenticator which you can find on your phone’s app stores).

During normal day-to-day use, this is the login screen that you’ll see when you go to http://umbrel.local:

The Umbrel OS login screen
Umbrel login screen

If you enabled 2FA previously, any password login will be followed by a requirement to enter a code for it:

The Umbrel OS 2FA screen
Umbrel 2FA screen

Once you’re setup with a new account and logged in, you’ll see that Umbrel has started downloading the entire Bitcoin blockchain and installing it on your external SSD:

The Umbrel OS home dashboard with the blockchain downloading
Umbrel main dashboard view

You can also click on the “Bitcoin” tab on the sidebar to see a more detailed breakdown as it’s downloading the blockchain:

The Umbrel OS Bitcoin dashboard
Umbrel dashboard while downloading Bitcoin blockchain

In my case, it took 2–3 days for this download to finish. However, take heart in that seeing this means that your Bitcoin node works!

Congrats! 🎉

Once the download of the blockchain is complete and the node is synchronized, this is what you’ll see:

Screenshot of a Bitcoin light node running
Screenshot of a Bitcoin light node running

“Within the coming years, disrupting the Bitcoin network will become increasingly more difficult as Bitcoin wallet software and the protocol become more mature and resilient.”

— Brian Armstrong, CEO of Coinbase

Installing Other Apps

You’ve done it… You’ve set up your own very first Bitcoin node.

That’s so badass. 🙌🏻

From here, there are all sorts of things you can do with you Bitcoin node (and Umbrel OS) like:

  • Start participating in running (and getting paid for) a Lightning network node to help make it cheaper for people to send Bitcoin
  • Install some other apps on the Umbrel platform (some of them let you do cool things like watch transactions as they come into the pool for the next Bitcoin block that will be mined)

Here’s a screenshot of just a few of the apps you can install with Umbrel and run alongside your Bitcoin node:

The Umbrel OS app store
Umbrel app store

“To join in the industrial revolution, you needed to open a factory; in the Internet revolution, you need to open a laptop.”

— Alexis Ohanian, Co-founder of Reddit

Conclusion

Congrats. You just built your very own Bitcoin node! 👏🏻

I hope you’ve enjoyed this guide and come away with some new knowledge. Doing small projects like this is super fun and gets you involved with a global community of enthusiasts.

Feel free to reach out to me on any of the links below if you want to talk about Bitcoin, cool tech, or anything else (like great book recommendations).

Thanks for reading.

Nathan ☕️

(GitHub, LinkedIn, Twitter, and Personal Site)

--

--