Choosing Hardware
I know you are excited about this section. But before we pull out the screwdrivers...
Can't I Just Use a Hosted Service?
If you come from a web or app-development background like me, you might be thinking: Can't I just use a hosted service? I host my website or application with Wordpress.org, or Vercel, or AWS, or Heroku, or Cloudflare, or Netlify, or whatever. They handle all the complicated stuff for me. Can't I do this with my Lightning node?
Here's your answer. Yes, you can.
And we've recently released a full-featured system from running web-based nodes "in the cloud": Rizful.
Rizful: Could be a great choice depending on your node purpose
Remember way back in What Is The Purpose Of Your Node? I asked you to pick one of these purposes:
- "Mostly Send"
- "Mostly Receive"
- "Routing Node"
If you picked "Mostly Send" or "Mostly Receive", then Rizful could be a great choice. This is why:
- You can rely on Rizful to keep your node running 24/7.
- You don't have to keep much BTC on your node. If something goes horribly wrong with Rizful, you'll only lose the amount that is currently on the node.
- Compared to running your own hardware, Rizful is inexpensive -- something like $150 per year, to keep your node running 24/7.
- If you're not acting as a "Routing Node", if Rizful gets taken down by the Men In Black Helicopters, freshly dispatched by Bank Of America -- well, actually the network will be fine without you. You're not routing other people's payments, so it's not going to mess things up for the people who really need to use the Freedom Tech™.
Rizful: Maybe don't use it for a Routing Node
If you are a Gentleman, and you are thinking of outfitting your fine estate with the "Routing Node" strategy, I would think carefully before proceeding with Rizful. This is because:
- As I will describe in The Gentleman's Guide To Routing Nodes, to run an effective routing node, you need to keep a significant amount of BTC on your node. This means you are trusting Rizful with a serious amount of money. Don't do this.
- A routing node needs significant CPU and memory. Rizful is high-performance, but I wouldn't use it for a node with 100+ channels.
- Rizful is a single point of failure. The network needs routing nodes that run on their own hardware, in the true spirit of Freedom Tech™.
So: Do your own research. If you decide to go with Rizful, you might be able to skip a lot of the rest of what I am going to teach you here. But it should be fun to read, anyway...
What about Umbrel, Start9, or Another Pre-built Node?
Good question. There are companies, most notably Umbrel and Start9, which are run by well-intentioned Bitcoiners. These companies are offering pre-built nodes which have everything that you will need for a Lightning node pre-installed.
The idea is that you can simply turn on one of these computers, and access to your node is packaged in a friendly-looking interface. Just point, click, and Freedom Tech™!
Advantages of a pre-built node
- You are contributing to the decentralization of the network. There is no centralized point of failure.
- You skip a huge amount of complexity involved with installing hardware and software.
- You might never need to get on the command line to twiddle with things. (Although I would not be so sure about that...)
- Updates should be handled for you.
Disadvantages of a pre-built node
- These machines do not have redundant hard drives. When you hard drive fails (it will fail eventually), your computer will not boot. You will be sad.
- These machines are Leaky Abstractions. When you first run it, you will think that you can do everything through the easy-to-use interface, but then something will go wrong, and you will realize you need to use the command line. Problem is, you didn't set the thing up yourself so you have no idea how it works.
If had to give you definitive advice, it would be similar to the advice about Rizful: Umbrel or Start9 can be OK if you are running a "Mostly Send" or "Mostly Receive" node. But if you're running a routing node, you are REALLY going to want to understand how your node works, and therefore it is incredibly valuable (maybe even "necessary") to start from scratch, install everything yourself, and, you know, be a real nerd about it.
Below here, we will be "doing the work" and setting up our own node from the beginning. If you decided to use Rizful, Umbrel, or Start9, it's probably useful to read this too, just to understand more about how your node works.
Below here, you need to have some experience as someone who like messing around with computers.
I can give you advice, but I make no guarantees and provide no warranty. You are solely responsible for securing your own funds on your node.
The fun part where we go buy a computer
For your routing node, you are going to want at least a reasonably modern computer (less than 6 years old).
Your computer should have these minimum specifications:
Component | Specification |
---|---|
CPU | 8x |
RAM | 32 GB |
Drive 1 | SSD, Nvme or HDD / 1 TB |
Drive 2 | SSD or Nvme / 2 TB |
Drive 3 | SSD or Nvme / 2 TB |
What is this you say?
You think this is ridiculously over-provisioned?
You saw a guide online where someone is running a Lightning node on a Raspberry Pi with 2x CPU, 4 GB of RAM and an SD card for storage?
You think I'm actually from the CIA and trying to discourage anyone from actually running a node?
Well, thanks for your input.
I'm telling you this for your own benefit, and for the benefit of of the network. This is why:
You are building a computer that you will be storing significant funds on, and you want to have that computer running for at least three (3) years.
Every channel that you open increases (slightly) the demands on you hardware, and trust me, you DO NOT want to max out your RAM or CPU, such that your computer slows to a crawl.
Remember, at a minimum you will be running one of the node implementations (probably LND), and then Bitcoin Core... and then very likely other software alongside that.
Don't buy a super-cheap computer
Don't try to save $100 by under-sizing your computer.
And about those hard drives. One (1) hard drive will be for your boot disk. The other two (2) will be for Bitcoin Core data and your Node's data.
Again. You might now have your hand raised, and want to say: "But people run routing nodes on Raspberry Pis!".
Yes, people have done this.
But: almost all of them would never do this again. I will quote here from LND's Documentation, where they discuss "prerequisites":
LND makes frequent reads and writes, meaning you should not use a SD card, but instead a SSD of good quality.
I'm going to do you a favor and be more explicit:
If you try to run a Lighting node with with an SD card as your primary storage, I'm going to find you, and then I'm going to personally offer you some strong words. But even before I can do that, your node is going to die and you are going to lose data, and maybe funds. Don't do it.
OK. Let's take a few deep breaths and then....
Where should I get a computer if money is no object?
I would try System76, or another "luxury" provider who will provision a Linux machine for you. With the three hard drives, you'll be looking at nearly $2,000 or so. But this will save you from having to mess with the hardware.
Can I build my own computer from raw components?
Yes, if you can.
The nerds say I should use ECC ram. Are they right?
They might be right. You'll need to do some research to be sure that your motherboard is compatible with ECC ram, or alternatively just order a computer which already has ECC ram installed.
Look at this computer I found on Ebay.
My personal strategy with computers is not to build them myself, but instead to buy refurbished gaming computers on Ebay.
CPU and RAM are sufficient. Case is big enough to install two more hard drives. The RTX 3060 is fine: We want the most basic GPU possible.
And: Let's pause for a philosophical moment here. A computer, formerly leveraged for the use of a 13-year-old in the American suburbs to play Fortnite on, will now be repurposed, at the grand price of $500, as a node on the world's first serious & scalable system for permissionless money. Pretty cool.
Also: On the question of "used" vs "new": The truly paranoid might not want to buy a used computer, because maybe the NSA (or someone else) has installed a backdoor in it. This line of thinking is I think is silly. If the NSA is installing back doors, then you'll get that back door with EITHER a new or a used computer.
Get your 2 extra SSDs
Most new and used computers will come with one hard drive, which is fine.
You should then buy two (2) more SSDs, of 2 TB size each. Probably any reputable brand is fine.
Here are the two I have chosen for this demo:
Let's Get the OS Ready To Install
Let's skip ahead.
You've taken delivery of a computer. You purchased two new SSDs.
My experience is that you always want to get your OS up and running before you even open the computer case to install the SSDs.
Why? Because if you start messing with the hardware BEFORE installing the OS, then if something goes wrong with the OS install, and you think there might be a hardware issue with the computer, at least, if you have not yet opened the case, you can be sure that the hardware issue is not your fault.
A full tutorial on installing Linux is out of scope for this guide, but let me make some comments.
As far as I understand it, true nerds use OpenBSD as their Linux distribution. I have never used OpenBSD, and have heard scary things about it with respect to hardware drivers. But if you are a true nerd, congratulations, go ahead with OpenBSD.
Dummies such as myself would be wise to stick with the most-established and most-boring distribution: Ubuntu. Note that Ubuntu has started offering various "enterprise" options that are not free. I have no idea why you would need those "enterprise" options, but I can tell you for sure that I have never used them.
Install Ubuntu
To install Ubuntu, you will need a $10 USB "flash drive". Any one is fine, as small as 8 GB is probably fine, but you can get a huge 128 GB one for $10 or less currently.
You're going to start by making a USB "boot drive" to install Ubuntu on this machine.
I am now going to save you a lot of annoyance by providing one important detail.
You are going to start your journey on the Ubuntu download page.
Let's look at a screenshot of that page so I can make my point:
You can see there are some versions of Ubuntu with some confusing version names.
You need to choose the LATEST "LTS" version.
What does "LTS" mean?
It means "Long Term Support". And as we've discussed, you are going to run your Lightning node for a minimum of three (3). If you fuck this up and install a version of Ubuntu which is NOT "Long Term Support", then you are going to have annoying problems about a year from now.
That's all you need to know: choose the LATEST "LTS" version.
Currently Ubuntu has this nice walkthrough for downloading the Ubuntu image and making a flash drive installer. But note, unhelpfully in this walkthrough they are pushing you toward the "Ubuntu 23.04" release, which is NOT "Long Term Support".
You may need to fight briefly with the BIOS
The BIOS is the "firmware" on a computer. If you have no experience with this, you may need to find a 14-year-old gamer to help you with this. Basically, you're going to need to tell the BIOS: "Hey, boot from this USB drive so I can install Ubuntu."
I can't give you exact directions here because, annoyingly, it totally depends on which exact motherboard is installed in the computer.
But this is actually one of the reasons you are installing Ubuntu instead of some other, more nerdy Linux distribution: Many, many people have followed this path before you and installed Ubuntu on whatever computer you are working with.
In all cases, before booting, you will stick your USB installer into a USB port on the computer.
Just as an example for getting to the BIOS screen: On Dell Alienware computers, you can get into the BIOS by holding down the F2 or F12 key on boot. You would then switch the selected "boot drive" to the USB installer, restart, and at that point hopefully the computer will boot from the USB flash drive.
You know you've been successful with this when you get to a screen like this:
You can use the default settings for the Ubuntu install. If you bought a used computer, Windows is probably already installed on the drive, and installing Ubuntu will "nuke" the Windows install, which is what you want.
Some notes:
- You might have heard of people setting up "dual-boot" systems which can switch between Windows and Ubuntu. Don't do this. It adds complexity, and won't be useful because you are going to be running your Lightning node 24/7.
- Choose a password for the computer which is too long to guess, but not so long that you forget it and lock yourself out of the computer.
- You will have an option to encrypt the hard drive. I want to avoid giving you specific advice here. The advantage for an encrypted hard drive, obviously, is security, but a disadvantage (which is a big one) is sometimes things go bad, and then you can't boot the computer.
You will know that your Ubuntu install is successful when you can restart, and see a screen like this:
Let's install the SSDs
Now we have confirmed that Ubuntu is installed on our boot drive, so it's time to install the two SSDs.
Let's take off the side of the case...
Let's put the first SSD in the slot...
This computer only has one empty SSD slot, so we're going to put our 2nd SSD in a 2.5" to 3.5" "drive bay converter"
Next, we install the "drive bay converter", which encloses ssd #2, in the slot near the top-right of the case:
Sweet.
Now let's turn the computer on again, and see we can find those hard drives mounted onto the system.
Now that we have our drives installed, I want to give you some more insight into why I want you to get an 8x CPU computer with 32 GB of ram, even though that is kind of "overkill".
Right now, there are only about 15,000 nodes on the network. (As of April, 2024). As it is running, your node collects "Gossip Data", which is information about all the public nodes and channels on the network.
Right now, that data is about 100 MB in size.
So the node software does a lot of stuff with that data, including lots of complicated route-finding.
When computers have to do complicated stuff with data, it's useful that all of that data can fit into memory (RAM).
100 MB is not a lot, and even a computer with 4 GB of memory could probably run a lightning node AND have enough RAM leftover to work with the 100 MB of data.
But: what has not yet been tested on the Lightning Network is: What would happen if the number of nodes suddenly went to 100,000? Or how about 100,000,000?
That could lead to all the node data taking up many gigabytes of memory!
Probably the node implementations like LND and CLN would be updated to handle really big amounts of data like that. But without a doubt, wrangling that much data constantly would use more memory and CPU! That's why we are planning ahead, to future-proof your Node setup.