The Swiss Road To Crypto

Running A Lightning Node: Cloud vs Self-Hosted Hardware with Massimo Musumeci

November 06, 2023 Didier Borel Episode 97
The Swiss Road To Crypto
Running A Lightning Node: Cloud vs Self-Hosted Hardware with Massimo Musumeci
The Swiss Road To Crypto +
Become a supporter of the show!
Starting at $3/month
Support
Show Notes Transcript Chapter Markers

Running a Lightning Node: Cloud vs Self-Hosted Hardware


In this insightful conversation, we welcome back Massimo Musumeci from Denali. We delve into the nuances of running a lightning node in the cloud versus on self-hosted hardware. Massimo breaks down the advantages and disadvantages of each, elaborating on potential use cases, crucial aspects to consider, and applications that can run on a Lightning node. We also go in-depth about important software like Balance of Satoshi, LN Beats, and Lightning Terminal. Massimo also talks about the different node use cases, highlighting personal use for financial self souvreignty, routing and receiving payments for merchants. 


00:06 Introduction to Lightning Node and its Features

01:30 The Importance of Appropriate Hardware for Running a Lightning Node

03:47 Advantages and Disadvantages of Running a Lightning Node in the Cloud

03:57 Different Use Cases for Lightning Node

07:48 Backup Strategies and Updates for Lightning Node

13:49 Essential Software for Running a Lightning Node

21:56 Applications of Lightning Node

28:16 Experience at the Lugano Plan B Conference

30:11 Conclusion and Ways to Show Support

balance of satoshis (bos)

https://github.com/alexbosworth/balanceofsatoshis


lnbits

https://github.com/lnbits/lnbits

Satsmobi

https://satsmobi.com

rebalance-lnd

https://github.com/C-Otto/rebalance-lnd

MASSIMO MUSUMECI DETAILS

MY details

twitter: https://twitter.com/massmux (@massmux)

youtube

https://www.youtube.com/@MassimoMusumeci

Website:

https://massmux.com

Substack newsletter/snippets/nowtos

https://massmux.org

github

https://github.com/massmux

Cloud provider

Https://voltage.cloud


Breez sdk

Support the Show.

Become a subscriber and help support this podcast with fiat currency, credit card or Apple Pay
https://www.buzzsprout.com/2058047/supporters/new

If you want to contribute to the podcast, you can listen to the episode in a lightning enabled podcast player and stream sats or send as a 1 off.
Download the Fountain app and donate sats or look up the Breez app,

show your support by sending sats- the cool way!
insert this into a Lightning wallet

theswissroadtocrypto@fountain.fm

subscribe to newsletter https://didierborel.substack.com/subscribe?
visit website https://www.theswissroadtocrypto.com/

recommend on Twitter @SwissRoadCrypto

This podcast is produced by Didier Borel and Mikhael Junod

Copyright © *2020* *The Swiss Road to Crypto*, All rights reserved.










massimo:

And this common line tool has a lot of feature one of All these features is the possibility to connect real time to telegram and provide automatically the static become backup channel file for each open and closed channel event. So what does it mean? It means that any time you have a new open channel event in your On your node, you will receive real time the channel backup file to a telegram message on your mobile.

Didier:

today I am pleased to have again Massimo Musumeci from Denali. We will discuss running a lightning node in the cloud and the advantages and disadvantages of running a node in the cloud versus self hosted hardware. We will also discuss why you would want to run a Lightning node, possible use cases, and what are important aspects to consider, how to install the hardware, and what applications run on a Lightning node. Massimo was on a previous podcast with Alex Poltorak to speak about Nostr, so as you can imagine, he is active in the space. In Nostr, we often use Lightning to zap sats to other users. So good afternoon, Massimo.

massimo:

Hi, thank you for inviting me and hi to everyone.

Didier:

Okay. Let me, maybe for people who are not familiar with running a Lightning Node, let me give them a little bit of the following anecdote, which will show them how important it is to have the appropriate hardware and therefore why you might want to run your own Lightning Node in the cloud. Previously, I used to run a Bitcoin node, a full node on the base layer. And at one point, I wanted to play around with Lightning, and so I wanted to have a Lightning node that would, of course, be connected to my Bitcoin base layer node. And it was at that point, I was running my Lightning node on a... Raspberry Pi, and it was at that point that I realized that my node stopped working in my, because my Raspberry Pi, it overheated because I didn't put a fan on top of it, or next to it, and it was in the summer. So the Raspberry Pi overheated. So my Bitcoin base layer node stopped running. So therefore, if I had been running a lightning node, also possibly on my Raspberry Pi, but, or on some other device connected to my Raspberry Pi. Raspberry Pi on the Bitcoin base layer, I would have had a problem. And for people who don't know, if somebody, if other people try to steal money from you in a channel basically you have a week to recuperate the money. In other words, you have to show to the Bitcoin base layer I think it's a pre image of a transaction. That was later than the one that the other person is trying to, is showing. And therefore, not only do you claim back your money, you claim back all the money in the channel. So basically, if somebody is trying to steal from you you have one week to not only correct the amount that he's trying to steal from you, but take all the money in the channel. So his as well, that's a little bit the penalty. However, for that, you have to, you have one week to do that. Those are the rules of lightning. Of course, for that, you need Proper hardware and software. And in my case, with my Raspberry Pi, Uh, it would have taken me more than a week to get my Bitcoin base layer node up and then the Lightning node as well. So basically I would have lost all the money and all my channels. So that's when I realized if you want to run your own Lightning node, you better either have Good hardware, either your own hardware, or if you want to delegate that problem, you run your lightning node in the cloud. So Massimo, do you want to maybe talk about the advantages and the disadvantages of running your own lightning node in the cloud vis a vis your own hardware,

massimo:

yes, sure. Before, defining the advantages and disadvantages you have to ask yourself, what are you configuring and using your lighting node for? This is a node use cases. So I'm divided in three categories, the node use cases, and for example, personal use, financial self sufficiency. This is the most popular case. And in this case, you are running your lighting node, maybe at home or using your hardware. You are running Tor, for example, and you're running your node for managing your personal expenses. For connecting your personal wallet and making your daily expenses. In this case you will open a smaller channels and so you need a smaller liquidity. In this case the system is more decentralized than the next. Two cases. The second is business. For example, if you want to run a routing node or you want to do a liquidity sale, in this case, your node acts more like a hub for acting other payments. And it is rarely the origin or the end point No, the you maybe wanted to run in the cloud or using hosted hardware, you may run Tor or clear net, but in this case you will open bigger channels with bigger nodes and so higher liquidity is needed. And you have to point out a strategy for fees management and balancing. And the third case is merchant. In this case, you will operate lighting node for receiving payments at a business. And in this case, your node is the endpoint for lighting payments. So you have different approach to liquidity and balancing and inbound liquidity in this case is strongly important. So these are the three most important use cases in my point of view and using your node for some kind of service or some kind of activity, for example, routing, liquidity sale, or even a merchant activities, you may want to opt to a cloud solution because you have some advantages. In fact, you spoke about your your troubles running your own

Didier:

I was happy I wasn't running a lightning node because I would have lost all the money and all my channels. Yeah, so that's when I realized either I have to get good hardware or the other use case that we're exploring right now is putting it in the cloud. Yeah, go ahead.

massimo:

Yes. In fact in fact in this case you may want something more reliable and you want to delegate some activity outside. And this is the ca the case of running in the cloud, for example. In this case, you have advantages of availability because they take care of hardware failure and upgrades. Network connectivity and maintenance. Channel state storage, data storage, redundancy, and power continuity. So you have an advantages because these parts are outsourced to them. And you have also advantages when you are going to update your l and d backend, for example, but you have also some trade off because you don't own the hardware. You are more centralized, you are less sovereign, and you depend to the hosting provider because they becomes a single point of failure. And this maybe maybe important if you. If you run in the cloud, so you have to understand if there are more advantages for your business than trade off.

Didier:

Okay so can you describe maybe a little bit the the backups and the updates and monitoring, how, what would you describe are the best procedures for making sure that you're, you always have all the backups of the states of all the channels and that your software is always up to date?

massimo:

Yes, sure. Yes, when you are running like the node in production state, some important points are to be considered. You must be, your node must be available the most of the time. Your node must have a good backup strategy. You're not must run on an affordable hardware and you must update quickly and smoothly and you have the need to have always a rollback available. So these are the most important points to consider. wHen talking about backup, the backup is very important. Because you have a lot of sats locked in channels in case you are running a lightning node for professional use for routing node, for example. And the question is what to do if my node breaks down and it is lost. I have lost access to my node. So for L& D implementation, you have to backup to make a strategy for these cases. You have to make the seed phrase backup as usual, and you have to back up the channel channel static file, channel backup file. This is an important file which may must be updated for each open and closed channel event. So in case of disaster. If everything else is lost, you have to restore your funds and funds can be restored using a fresh LND install choosing the restore from the seed and loading the backup file. This operation will close all existing channels and you will get back your funds on chain. So this is a procedure which will Close force close the channels and we'll send back your funds on chain. This will take a little bit because this may take also some days and in some cases also some weeks for being a complete about the cap. It's important also that the capping collateral data may be also necessary, for example, if you're a node. Is for providing services maybe you have for example, a LN bits install. In this case you have a LN bits database. For example PostgreSQL. So in this case, you have to plan a strategy for regular set of dumps of this database. Because this database may contain details of user's balance bold char keys, LN URL information, and so on. So the the backup is a very important aspect and about the channel backup file. What to say this file must be updated for each open and closed channel event. You can get this file from Thunder Hub, for example, or you can use some smarter method. For example one of. The most interesting software is a balance of Satoshi, which is a software from lighting labs from Alice Bosworth. And this is a common line tools that is very powerful and use it in a lot of application. And this common line tool has a lot of feature one of All these features is the possibility to connect real time to telegram and provide automatically the static become backup channel file for each open and closed channel event. So what does it mean? It means that any time you have a new open channel event in your On your node, you will receive real time the channel backup file to a telegram message on your mobile. This is very useful because you don't have to worry about this file. It's produced automatically and you get it automatically without having to. To do manual operations, and so this is a good way to get your channel backup file. Otherwise, you can find also your channel backup file inside your install if you're managing your hardware yourself.

Didier:

When you're managing your hardware yourself, do you recommend backing up the state of... channel after each each transaction after each variation in the state of the channel or like it's happening in the example you gave with Telegram or if you're back, if you're doing the backups yourself, do you, how often do you, is there a cost to backing up after each transaction and you do it less often or what do you recommend?

massimo:

If you're managing yourself the hardware, you should and if you are running a L and D implementation, you should use a script for making your channel backup file up to date. And for example, in the raspy bolt guide you can find A world a world chapter where there is a lot of discussion about the channel backup file and you can see even a script for making up to date this file. Otherwise you can also have a balance of Satoshi in your own install. And connect it to your Telegram to your Telegram account. This is very nice, in my opinion, in, even if you're running your own node, your own hardware, or you're using a cloud, it's very useful to, to use and connect the balance of Satoshi to Telegram, in my opinion.

Didier:

Okay. Let's have a little, let's go a little bit through the software that somebody wants to run his own node should have. So what are a little bit the musts the musts in terms of software? Balance of Satoshi, would you want to, are there any other ones?

massimo:

Yes. So you can install on your node as much software as you want, and it depends on what is your business with your node. And normally you will have this configuration. We'll have the LND backend. On the cloud or on a separate machine, and then you have a remote VPS, for example, or physical server connected using macaroons to the back end. In this way, you can easily install and manage software that you need for your business. So the most important software, in my opinion, is Microsoft The first one is a balance of Satoshi. We already spoke about this. It's very nice and very useful even for managing the channels. And the second is without any doubt, in my opinion, Ellen beats and beats is an accounting system. Which is used also in Bitcoin Voucher Bot software and many other software. And this this is an accounting system that can be used for managing, for example, LN URL for managing both cards for creating separate wallets on the same. And for creating, for example vouchers, so vouchers that can be used to withdraw funds from your node. This software has a really a lot of applications and it can be run on a separate server using Docker. For example, and it's also very interesting because with the, with it's a pile, a plugin system, you can even install a lot of software. So you can, for example, even run a cashew mint. or additional software, additional plugin, even for connecting to Nostr. It's in my opinion, it's a must for your node. And then another software which is very useful to be used is Lighting Terminal. For Lighting Terminal is a web based Dashboard. So is a dashboard which is useful to manage your lighting node for performing loops and for buying and sell channel, some pool, for example, and for connecting to lighting terminal. Using voltage is very simple because there is a paying phrase. That can be used to connect to the lighting terminal. Once connected to the lighting terminal, you can do a lot of interesting things. One of the most useful I think is loop in and loop out with a nice GUI. And for example, you can you can make a loop in. For example, if you have a channel open to a certain node. And you, for example, you have a channel of 50 million sats capacity open to a certain node, and then you are left with just 5 millions outbound capacity, for example, and then you want to use your own chain. Liquidity in order to raise the outbound capacity. So you can do this using a loop in, and this is a easy, if you're using the lighting terminal, there is a slide. You can move this slide until you reach the desired outbound capacity. And then you can you can submit this this uh, this transaction because it's an on chain transaction. And when this on chain transaction is confirmed, you will get the corresponding outbound capacity back on this channel. This is very useful in case you are running a node for routing or for liquidity sale. So this is useful. And using LIT Lighting Terminal, is even very simple to do. And the last software I want to point out, in my opinion, is ChargeLND. Why ChargeLND? Because if you have a big routing node with a lot of channels you have to adjust very frequently the Uh, the fees on each channel, and this is necessary because the the balancing will always change. And so you have to adjust the, this fees frequently, and you can't do this manually because it's if you have a lot of channels, you cannot do this manually. You need a script for doing this. And one of the scripts that are available for for this purpose is charge LND. And this script matches your open lighting channels against a number of customizable criteria and applies a channel fee. Based on the on a specific policy. So you have a configuration file where you have to specify your policy. You have to specify the criteria. Which have to be matched on your channels. And once you have created this configuration file, you can run this script each 10 minutes, for example, or 20 minutes, and you will have your fees updated automatically. And this is a very useful. For a routing business, because you don't have to do this manually. We, it would be quite impossible to do this manually.

Didier:

Okay, thank you for that detailed and relatively, in depth description of how to run a A lightning node and the software you would need. Tell me, you, have a lightning node, I know it's of a decent size, and you use Voltage, Voltage, are they a cloud provider to you? And do you think they themselves have the hardware, or are they renting cloud capacity from, I don't know, Amazon or somebody else?

massimo:

Yeah. Yeah. But voltage is just an example. There are several cloud providers. Voltage is a cloud provider, which is which provide you a L and D backend. So they just provide the L and D backend. All the software you need, you have to install in a separate VPS, for example, and connect to the backend using macaroons and remote connections. thEy use,

Didier:

The back end, you think they actually own hardware or they're renting it from somebody else?

massimo:

No. They say they use they use AVS or Google. Yes. Yes, this is yes, I know. And this is very sad. I agree with you, but when you are running a note for business, you have to take some trade off because you can't you can do everything or you have good hardware set up hardware connect network connection, so on, or you have to, uh, to decide you have to make some decision. So using voltage may be a solution because you can have something more easy to manage. So this can be a possibility. It's obvious that there are trade off. We already spoke about this. You are More centralized, they are a central point of failure and so on. So you have to decide if this is something that you can accept or not.

Didier:

Okay, all yeah, you'll have to give me the links to all these various pieces of software and I'll put it in the show notes, but all right, and finally You are, I know, active on Nostr quite a bit. What are the most common use cases you're seeing on Nostr for making payments? I saw one use case of, the software to make images with artificial intelligence called MidJourney, which does probably better images when you give it a specific prompt, and then check. to GPT, but I think you have to open an account with MidJourney and it costs. So I saw somebody on Noster who he has an account, you give him the prompt and he'll give you the image created by MidJourney even if you don't have an account with MidJourney because he charges you a little something for it. So that's one application I saw, for example, of using, Lightning over Noster. To make a little bit of money. Have you, what kind of use cases do you see, for example, on on Nostr of course, using Lightning? Why do people zap Sats on Nostr?

massimo:

There are there are a lot of application for for your node. And either using Noster or not. You can do for Noster. Yes, you can configure your node with, for example, a lightning address. Using L Beats and you can use this lighting address on Noster to get dap. This is an application and is based on L and Beats for for this purpose. And this is quite easy to do using this setup. In addition to this you can also have multiple, uh, possible application and I can. I can talk about some application for your node. One is, for example, Point of Sale. And this is an application that can be run on a mobile or a device with a printer on board. And this is useful for a shop or a commerce. You can... Get payments in lightning. This is based on Ellen beats. Ellen beats has a boss plugin, which can be installed and run in several wallets. And this is the POS application. Very nice. Useful for shops. There is also another application, which is interesting. My opinion is NFC cards. So in this case, you can create both cards and connect it to your node. So you can you can have

Didier:

What's a Bolt card? What's a Bolt card? I don't...

massimo:

Yes, both cards are NFC cards like this.

Didier:

Okay, for people who are listening, it looks like a little credit card, yeah, okay.

massimo:

Yes, NFC cards, which can be used to pay tapping the NFC device, which is accepting lightning payments.

Didier:

Okay.

massimo:

And this can be managed with your node. It's not quite easy, but it's possible. It can be managed using LMBits. And also

Didier:

sorry, just to interrupt you for people who didn't quite see or understand is basically you have a little credit card to which you load on some SATs on this this NFC card, which looks like a little credit card. And then when you are in a shop or in a merchant or you want to pay with these SATs. You have the, I think, what, near field technology that you can put next to a payment device, a point of sale payment device of the merchant or something, and it's like you're going to zap him the sats through this NFC card, volt card, if I am, yeah, exactly.

massimo:

something like this. Obviously the merchant must accept lighting payments and must have a device with POS with NFC enabled. Yes. In this case, you can have this card and use this card to pay your bill or to, to the merchant using tapping with this

Didier:

Yeah, it's a little prepaid card that like a, an Apple prepaid card or an Amazon card and you pay in the store, but you're going to pay when that's if the person has the technology and the point of sale device enabled in a shop, correct?

massimo:

Like this, but for for lighting for lighting payments in NFC devices. Yes. This is also an application. This can be managed with your node running Ellen beats. And another application is voucher are QR code printed on paper, so very easy to, if you have a little printer, you can print these vouchers on a piece of paper. And these vouchers can be used to withdraw funds from the node, and they can be programmed. You can set the maximum amount. Maximum number of uses is memo details, et cetera. And this can be used for giving sats to someone. This is also a nice application. And the last application to talk about is the LN URLP which is another kind of QR code. But this cure code can be used to pay funds statically to your node. So these are cure code static cure code. They can be printed on paper or they can be linked statically. In a website, and they are useful for getting donations, for example, of a variable amount or they can be printed on paper to be used in physical shop as a price labels, for example, and every amount is a center to the node. So this is also. A nice application for your node. So this was the most the most used application for a lighting node. Yeah.

Didier:

Okay.

massimo:

there are a lot of more application for your node.

Didier:

Okay. Okay. Great. Thank you. Yeah, we'll try to list all those applications or all those sort of those apps in the show notes and and yeah, okay. Thank you very much. We both were at the Lugano Plan B conference. Were there any meetings there or conferences there from other people? You gave a talk on this. Specific subject. So you were a speaker, but were there any meetings or talks from other people that you especially enjoyed at this conference?

massimo:

yEs. The conference has been very nice. There are a lot of talks in particular I enjoyed, uh, the talk the masterclass from. is one of the team of BTC space server. And since I do appreciate so much their work and the product BTC space server, which is in my opinion, a great product. And so this talk was very nice. And he, showed how to receive a payment in sats and get the immediately converted to USDT, for example using side shift as a exchange And in general, he talked about BTCP server, how to configure it and how to use, and this is application. And yeah, I enjoyed so much of this talk.

Didier:

Okie dokie. Yeah, I liked the conference quite a bit, that I was there last year. Like you, I think last year was the first year, and this year I thought it was even better. I thought the level of. All the participants and speakers and everything was very good, was very high. Yeah, it was very good. Okay, Massimo. So it was a pleasure to speak to you again. And we'll probably be in touch again in the future because you're my tutor for Noster. So I'll have to come back to you on Noster. Okay.

massimo:

Okay. Thank you very much for your invite and goodbye to everyone.

Didier:

Okay. Bye bye. Yeah. If you enjoyed this episode and you think you learned something new, the best way to show support is by sending in sats over the Lightning Network. If you already have a Lightning wallet, you can contribute directly with a one off payment by sending sats to my Lightning address, theswissroadtocrypto at fountain. fm Or you can download a Podcasting 2. 0 app like Breeze or Fountain that allows you to stream sats as you listen. Finally, if you want to contribute in fiat, you can do that with a credit card or with Apple Pay. There's a link in the show notes for that. Finally, don't hesitate to leave a comment, either in the show notes or on social media, and don't hesitate to share the episode on social media. Thank you.

The Importance of Appropriate Hardware for Running a Lightning Node
Advantages and Disadvantages of Running a Lightning Node in the Cloud
Different Use Cases for Lightning Node
Backup Strategies and Updates for Lightning Node
Essential Software for Running a Lightning Node
Applications of Lightning Node
Experience at the Lugano Plan B Conference
Conclusion and Ways to Show Support