Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: nullama on March 04, 2022, 12:29:13 AM



Title: Open source stack to build your own lightning node
Post by: nullama on March 04, 2022, 12:29:13 AM
Here's a list of projects that you can use to create your own lightning node. Every part of this stack is completely open source so you can customize it however you want.

It's composed of three main parts:

  • Bitcoin Core (https://github.com/bitcoin-core): The Bitcoin node, configured to run as a server. This is your private Bitcoin node that you will connect to. Setup a RPC user and password for it.
  • c-lightning (https://github.com/ElementsProject/lightning/): The lightning node. This is a lightweight C implementation of the Lightning Network. Note that if you're running this on a different machine than the Bitcoin Core one, then you need to create an SSH tunnel between the two devices.
  • C-Lightning-REST (https://github.com/Ride-The-Lightning/c-lightning-REST): This project generates a rest API interface for your c-lightning node.

Now you are able to access your Lightning Node through REST, making it compatible with many other tools. For example:

  • Ride-The-Lightning (https://github.com/Ride-The-Lightning/RTL): RTL is an awesome web based interface for managing your node.
  • Zeus Wallet (https://zeusln.app/): This mobile wallet allows you to connect to your own lightning node through the rest interface.

And that's it, you can now use your lightning node with many of the new applications that are running on top of lightning (https://bitcointalk.org/index.php?topic=5376105.0).


Title: Re: Open source stack to build your own lightning node
Post by: odolvlobo on March 04, 2022, 04:58:02 AM
Here's a list of projects that you can use to create your own lightning node. Every part of this stack is completely open source so you can customize it however you want.
...

I recommend looking at established Lightning node projects such as RaspiBolt, RaspiBlitz, and Umbrel.


Title: Re: Open source stack to build your own lightning node
Post by: ABCbits on March 04, 2022, 11:09:32 AM
Here's a list of projects that you can use to create your own lightning node. Every part of this stack is completely open source so you can customize it however you want.
...

I recommend looking at established Lightning node projects such as RaspiBolt, RaspiBlitz, and Umbrel.

While Umbrel has been around for some time with decent user, don't forget the developer doesn't consider Umbrel secure enough.

Umbrel is currently in beta and is not considered secure.

We are trying to iterate rapidly and build out our vision and only have so many hours in the day. Due to this, we've decided to make the following trade-offs to allow us to ship a working beta with critical features, such as over-the-air (OTA) updates and easy log access, as soon as possible.

Umbrel is still in an early stage and things are expected to break every now and then. We DO NOT recommend running it on mainnet with real money just yet, unless you want to be really #reckless.


Title: Re: Open source stack to build your own lightning node
Post by: nullama on March 06, 2022, 03:22:10 AM
Here's a list of projects that you can use to create your own lightning node. Every part of this stack is completely open source so you can customize it however you want.
...

I recommend looking at established Lightning node projects such as RaspiBolt, RaspiBlitz, and Umbrel.

Those projects you're mentioning are just pre-packaged solutions that use the core lightning projects.

The main lightning implementations are: LND, C-Lightning and Eclair.

Have a look at RaspiBolt For example: https://raspibolt.org/guide/lightning/

Quote
To enable the Lightning Network on your RaspiBolt, we install LND, the “Lightning Network Daemon”. We then set up an automatic Static Channel Backup to protect ourselves in case of failure of the SSD drive. We’ll then add “Ride The Lightning”, a web-based node management tool. Finally, we’ll install the Zeus mobile app to make on-chain and LN payments and manage our node while we’re on the go. Together, they make operating your node a breeze.

Instead of c-lignting, raspibolt uses LND, but the rest of the stack is the same as I posted.

You have more flexibility when using the core projects independently. But yes, if you just want to install something quickly, you can choose one of those ready to use packages like the ones you mentioned.


Title: Re: Open source stack to build your own lightning node
Post by: n0nce on March 20, 2022, 02:38:00 AM
I would also recommend installing everything yourself, since you'll understand what you are actually running, you'll have verified checksums of every project yourself or compiled them yourself and also will know how to update it.

For what it's worth, I created a guide / walkthrough (https://bitcointalk.org/index.php?topic=5366854.0) to install essentially exactly the programs you listed, with the addition of electrs. It's very lightweight and highly recommended to anyone who uses an SPV wallet (almost everyone I know).