Lightning Routing Node Starter Pack
This starter pack is for Bitcoiners who want to run a reliable Lightning routing node from home. You could set up your routing node on someone else’s cloud server, but that wouldn’t be very self-sovereign!
This starter pack is not for Bitcoiners who just want to send and receive payments with a non-routing Lightning node.
Routing vs non-routing
A routing node is a node with channels that are publicly advertised, broadcasted, as being available to potentially route payments for others on the network.
A non-routing node is a node with only “private” channels, the existence of a private channel is only known to the two nodes it is connecting. Non-routing node and their channels do not appear on the public Lightning network.
A node that is not reliably online or not rebalancing its channels should be non-routing and should not have public channels. Otherwise, the node is wasting gossip network resources, causing payment routing failures, and if it’s not using Tor then it may be needlessly violating the node operator’s privacy by leaking their IP address.
A routing node should be trying to maximize its uptime and rebalancing channels to ensure sufficient liquidity for payments to flow. This guide will focus on the uptime part of the equation, as I am clueless on rebalancing channels (if you have resources on that, please tweet them at me!).
Computers can be fragile or robust, it really depends on what components are used and how they are configured.
Memory: you’ll want to use ECC RAM
In systems without ECC, an error can lead either to a crash or to corruption of data; in large-scale production sites, memory errors are one of the most common hardware causes of machine crashes. https://en.wikipedia.org/wiki/ECC_memory
Generally it’s only high-end workstations and servers that have ECC RAM. The good news is that there are lots of used systems available for <$300 on eBay! You don’t need the latest and greatest hardware, as bitcoind and LND are not that resource intensive day to day, you just need reliable hardware!
Hard drives: HGST
HGST drives continue to impress as far as overall AFR rates and this isn’t the first year that’s been true. Overall, these are some of the most reliable drives over time that Backblaze has tested. The complete AFR rate over all five years is 1.68 percent — higher than the 2018 data alone, but still within a very reasonable window. https://www.extremetech.com/extreme/175089-who-makes-the-most-reliable-hard-drives
Partitions: ZFS mirroring
One major feature that distinguishes ZFS from other file systems is that it is designed with a focus on data integrity by protecting the user’s data on disk against silent data corruption caused by data degradation, current spikes, bugs in disk firmware, phantom writes (the previous write did not make it to disk), misdirected reads/writes (the disk accesses the wrong block), DMA parity errors between the array and server memory or from the driver (since the checksum validates data inside the array), driver errors (data winds up in the wrong buffer inside the kernel), accidental overwrites (such as swapping to a live file system), etc.
ZFS is a battle-hardened file system, and setting it up with disk mirroring is simple with this tutorial for Ubuntu: https://tutorials.ubuntu.com/tutorial/setup-zfs-storage-pool#0
You’d have a pretty resilient system with ECC RAM and 2+ HGST hard drives set up for ZFS mirroring! We can make it even more reliable by powering it with an Uninterrupted Power Supply (UPS) battery.
There are two separate issues with a power outage or brown out.
First, it’s smart to put both your node hardware and your internet router on the UPS, as you may still have internet access despite a power outage. In this case, you’ll want a UPS with a great battery so you can stay online long enough for power to be re-established (if this takes longer than a few hours, then you’ve got other things to worry about than your routing node!).
Second, if you do lose internet access during a power outage, then you’ll want your node to shut down gracefully as a sudden loss of power can cause data loss. You could either try to remember to shut it down manually, or you can connect the UPS via USB to your node and have the UPS automatically shut it down.
Most homes only have one ISP, but in a lot of places they are not a monopoly, so you could subscribe to two or more ISPs to have redundancy there.
Another thing I’ve notices is that fiber connections with FIOS or Google are more reliable than cable/ADSL connections, so upgrade your internet!
Laptop vs Rack
If you have any other ideas or suggestions for node reliability, tweet at me!