⚡🛠️ Structurally, when you set up a Bitcoin node and a lightning node, are they two separate things on two seperate servers or instances that talk to each other, or does lightning live under bitcoin somewhere and they share things within that hierarchy..?

- Bitcoin + db

- Ligthning + db

or

- Bitcoin + db

----- Lightning + db

Reply to this note

Please Login to reply.

Discussion

I’m not the most qualified person to answer the technical questions, but Lightning is a scaling layer on bitcoin, so it relies on a fully-synced bitcoin node to function. There is more than one implementation, so node operators can choose which one they prefer. For example, if you want to run LND, you would install that software on the same system as your bitcoin node so it can refer to a local copy of the blockchain to perform channel actions.

Tagging a few people here who can probably give you better answers.

#[2] #[3] #[4] #[5] #[6]

I'm also not super technical but I believe they are instances that talk to each other. LND can connect to the Bitcoin db in a few ways (btcd, bitcoins, etc)

https://github.com/lightningnetwork/lnd/blob/master/docs/INSTALL.md#btcd-options

Is Andreas Antonopulos still taking his time to get on Nostr?

Him or Rene would be the best people to give exhaustive answer I think.

I haven’t seen him here but I tagged some of the plebs who I think can dive a bit deeper on the topic.

Missed that.

Thanks for a pro tip, followed all. Was only following Ben.

Thank you all, I will keep reading.

Lightning node needs Bitcoin node to be able to do all onchain related things such as opening and closing channels. Both running on the same instance.

Matthew, https://Plebnet.wiki is a good place to get started.

They are two separate programs which can run at the same or different machines. Doesn’t matter!

The Lightning „Program“ needs a connection to the Bitcoin „Program“.

Normally you run both on the same machine. This can easily be done with #[2] or a raspiblitz installation.

But you can also install and configure both on your day to day pc or one you are using only for this use case

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.

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.

🍿