Lightning is a separate layer. While different implementations handle this differently, they all follow the same hierarchy. Bitcoin is the base layer. Lightning runs independently, but needs to connect to Bitcoin to open and close channels. Lightning does this via smart contracts. You do not need to run them on the same server instance. They can be ran on different devices.

There are multiple ways to accomplish this. You can build your own from scratch by installing Bitcoin Core and then choosing a Lightning implementation such as LND, CLN, Eclair, etc. You can also go for a pre-packaged method where no command line skills are needed via Umbrel, Start9, etc.

So, to answer your questions, are they two separate things? Yes. Are they on two separate servers? Commonly, no, but they can be, and in larger implementations should be for redundancy and disaster recovery.

Reply to this note

Please Login to reply.

Discussion

#[0]

Thanks. So for any kind of production site, you're really looking at four set ups...?

1. Bitcoin

2. Lightning

3. Nostr relay

4. Site/app/Nostr client

What kind of production site are you referring to? But yes, all of these things should be separate containers/servers.

What kind of production site are you referring to? But yes, all of these things should be separate containers/servers.

What kind of production site are you referring to? But yes, all of these things should be separate containers/servers.

Well, my own site, I suppose (I built it twice from scratch with Rails and Stripe). Journalism, publishing, articles. It might be possible to attempt the Substack on Nostr idea or something along those lines if I abstract some things out. But then we get excited about lightning and zaps and bitcoin so how do you do that and what does it all actually mean in terms of servers and databases and running things and costs and time all the rest? All of these things seem like fun ideas at the start and then take up lots of hours and life energy, so have to imagine their lines properly first. Also, not sure on a conceptual level that "Substack on Nostr" is going to be a thing. The more innovative thing might be integrating BOLT 12 into Nostr, across the whole network, at the mostly decentralised protocol level, not as a site.

I run a everything on a Raspberry Pi 4 and a 3 year old laptop. The laptop cost me $150. The Raspberry Pi 4 + 1TB SDD cost me $165. It's pretty cheap and low maintenance.

Right, that would be the other option, and build one of those little things with my 10-year old, which would be a cool bitcoin project to experiment with.

Right, that would be the other option, and build one of those little things with my 10-year old, which would be a cool bitcoin project to experiment with.

Do that! I can confirm that it was a great project with my 10 year old.

I'm sure. Build a little bitcoin machine with dad and learn a bit about computing and money and value at the same time.

Great conversation!

If you run #[5] you get a bitcoin node, a Lightning node, and your own personal Nostr relay out of the box.

#[0]