Should I Actually Do This?
Before we get into this, I want to remind you...
π‘ If you just want to send payments, all you need is a mobile phone and Boomer-level technology skills: i.e. it's super easy. Feel free to retreat back to Let's Try A Mobile Wallet. π‘
Still with me? Great.
Running your own Lightning node has quite a few benefits:
- You'll be able to send zero-fee payments to any node you have a direct channel with.
- You'll learn a lot in the process.
- You're getting in early, while the network is still small. Think of it like starting an oil business in Texas in 1902, or setting up a brokerage firm in Manhattan in 1850. It's super early.
- You'll be speeding the world's transition to a more decentralized, fair, and ethical financial system.
- You can personally raise a middle finger to the world's banks, credit card companies, and other parasites.
Sounds great, right?
But stick with me here while we go over some of the prerequisites.
Here come the prerequisitesβ
You should have some experience running a web or P2P serviceβ
Django, Wordpress, Ruby On Rails, Next.js, ASP.net, Laravel, Nginx: These are examples of web applications that run on a server and handle requests over the internet.
Bittorrent, eMule, Morpheus, FrostWire, Bitcoin Core: These are examples of P2P applications which share data with other computers on the internet.
A Lightning Node is, confusingly, a mixture of a web application and P2P application.
Well, technically it is a P2P application, but the instincts (and Linux skills) you can develop by running web applications are super-useful for Lightning. It's useful if you have some experience running one or several of these services, or services like them.
Don't try to run it in the cloud -- at least not just yetβ
So if you have experience running a web application, you might be thinking: "Cool, let me spin this up on Hetzner, Digital Ocean, or AWS!" I'll just ssh
in, and get shit done!
And yes, you could do that. In fact our node, The Megalith Node is running completely in the cloud. So are many of the biggest nodes in the Network.
But. Here are the reasons your FIRST node should NOT be in the cloud:
-
It's expensive. You'll want a Linux instance with 8x CPU, 32 GB RAM, 2 TB of SSD. I think you could also get away with 4x CPU, 16GB RAM, and 2 TB SSD, which would be cheaper, but I wouldn't recommend that. In any case, this setup is going to cost at least $200/month. And this is something I want you to set up, and leave running for at least three (3) years. So you're looking at well past $7,000 in total cost over that time.
-
Centralized infrastructure providers are dangerous. Remember, our mission is to enable a Freedom Moneyβ’ replacement for credit cards. If everyone's node is on AWS, that's bad, because it just one point of failure. What if AWS suddenly tries to block Lightning nodes? To make our dreams come true, we want Bitcoin Lightning clients running on a many different kinds of networks as possible. That's why your office, garage, or living room is actually quite a good location.
-
If you mess something up with the configuration, you could be at risk of losing your funds. And on that note, if you'd like to give yourself a 30-second panic attack, I recommend you read this blog post from ACINQ, where those French geniuses give us a rundown on their terrifyingly-complex security setup.
Let's be real. You don't want to try to implement a super-complicated cloud security setup. You'll probably just end up locking yourself out of your own ultra-complicated cloud-native machine!
Also -- to do this Lightning thing, you're going to have a lot to learn. Do you really want to implement an ultra-complicated security process at the SAME TIME as you are setting up your first lightning node? I didn't think so.
A recently updated Linux machine, password protected, running somewhere in your house or place of business, maybe next to your existing computers: This is actually pretty secure, as long as you don't do anything stupid.
That's why just setting up your own Linux computer is both the cheapest and (at least for now) best way to do it.
Which brings me to my next annoying point...
You should have some experience on the command lineβ
And by command line, I mean BASH, or Zsh if you are a hyper-nerd.
You see, there ARE graphical user interfaces for Lightning Nodes, but they can't do "everything", and anyway you'll need to launch them from the command line.
You'll be using the command line to investigate confusing issues, and also to understand what is actually going on inside your node.. It's best if the command line is not a totally scary unknown territory for you.
You are going to need a very stable internet connectionβ
Your node will be running on a computer, and that computer should be connected to your router using an Ethernet cable.
Wait, can't I just run this on WiFI?β
No. You might think that the WiFi connection in your house is stable, but just trust me on this: it is not stable.
Only run a routing node if you can connect to your router with an Ethernet cable. You will thank me for this advice.
Furthermore, let's have an honest talk about your actual internet connection. By this I mean DSL, Cable, Fiber, etc.
The amount of bandwidth required by a Lightning node is not so high: Much less than, say, it takes to stream a movie. Even if you run a massive routing node, you will never get close to using "too much bandwidth" for your service plan.
But the LATENCY of your connection is important (measured in "ping time"). Actually, here, let's run a ping test. Look at the ping time.
You want to see that the ping time is below 100ms. If you are showing more than 200ms... that is not great. It's also not great if that number is bouncing around a lot. You want it to be consistent.
But even more important: Does your connection ever go down? Do you find that sometimes your internet goes down for an hour or two? Then it's not good enough for a Lightning node.
Do you find that your internet sometimes get randomly really slow and you can't load web pages? I'm telling you upfront: That's bad for a Lightning node. A Lightning node needs to be online 24/7.
Let me say this in a more clear way: If your internet connection is really bad, and goes up and down a lot, you could end up with something expensive: Channels that to into a "forced closed" state while payments in progress. That is bad. We'll get to the details later, but just know that it's bad, for now.
If you try to run a Lightning node with intermittent connection to the internet, you are setting yourself up for a lot of problems. Don't do it.
You're going to be running Linux.β
Yes. I hate to be the one to have to break this to you, but let's just deal with the hard stuff upfront, shall we?
Do not attempt to run a Lightning Node on Windowsβ
If you try to run a Lightning node on Windows, you will will have a bad time.
There a plethora of problems with running a web service on Windows, but the most basic one is: A Lightning Node needs to be online 24/7.
Under Windows, you can't control when the machine restarts. You can spend months trying to change the settings on your machine, but in the end Microsoft will always win: They can remote control your computer and force-restart it essentially at any time.
And they will take this opportunity often: Every time they dream up a new kind of adware or let's-force-you-to-use-Microsoft-edge scheme, or some fake AI-chat nonsense, they will simply reach out and restart your computer in the middle of the night, so they can install it.
Once they've installed their new, even-more-aggressive advertising/tracking software, then, they won't even let you use your computer until you've jumped through some hoops, that look like this:
If you see this screen, that means Microsoft has auto-rebooted your computer, and now they're trying to trick you into settings which will allow them to more comprehensively abuse you. It also means that your Lightning Node was stopped suddenly, hours ago, and that's bad. Really bad.
Do not attempt to run a Lightning Node on a Macβ
Apple is somewhat less abusive than Microsoft, and if you are really careful, you could probably figure out a way to prevent them from auto-restarting your computer.
The problem you will have is COMPATIBILITY. All the developers, and almost all the users of the node implementations -- LND, CLN, Eclair, etc. -- are running their nodes on Linux.
When you run into a problem (And, rest assured, you will run into problems) you want your setup to as closely match the setup of the super-nerds as possible. If you're running on the Mac, you're adding another layer of complexity.
Also: Macs are kind of expensive.
Which reminds me, I've got more bad news...
You should run your Lightning Node on a dedicated computerβ
Now, it doesn't have to be strictly dedicated. Like it's fine to use a web browser on the same computer, and stuff like that. But you don't want to run a Lightning Node on your "daily driver", everyday machine. Why not? Because:
- The computer you use every day you inevitably will need to restart. You'll update something and it will keep hassling you to restart your computer.
- The computer you use every day,might sometimes have constrained resources (CPU, RAM, drive space, etc.), like when you watch a movie on it and the CPU goes to 80%.
- Your daily use machine is less secure, because you might be installing random software on it.
But also, because...
You should plan to run this lightning node for at least 3 yearsβ
Setting up a Lightning Node takes work, and it takes a while for it to pay off. You need a stable setup, where you (hopefully) will only need to restart it a few times PER YEAR. Yes.
You want this thing to be online 24/7, and never go down. You want it to be running for YEARS. So the less you mess with it, beyond what you have to do to get your node running, the better.