Lightning Node on a Raspi 4

I would love a good guide on setting up a Lightning Node on a Raspi 4, care to share a link?

I would say the easiest way is Raspiblitz. An alternative to this would be MyNode.

But there are also a lot of instructions that are described step by step.

After my SDcard died, I installed Raspiblitz and have stayed with it ever since. The project is constantly being developed, there are regular updates and many extensions.

1 Like

it’s surprising to me how few people that actually seem to be using the correct SD cards /usb flash memory for running operating systems…

not all cards are even good for being OS storagenode, the correct ones while most likely more expensive will give you much better iops, less latency and much much more endurance.

haven’t tried them myself, but the theory behind it is pretty simple… why spend money on memory chips / controllers with high endurance for storage memory cards that might be rewritten like 1000 times max

while the good cards use the same nand flash that is in regular ssd’s or similar i believe.

i suppose in theory some of the cards might have the same chips, but just not the algorithms and such that improve endurance… so i suppose maybe it could be fixed in software… but why bother.

1 Like

This is completely offtopic, did this get moved here?

Thanks, gonna check out both!

Can I ask why you would want to host a Bitcoin lightingnode is it just to use the wallet?

You can install windows on an USB stick but why would you do that? You only need to insert some installation disk once and that is it. Same with a Pi3 or Pi4. You need the SD card to boot the installation disk. For many Linux distribution, there is no dedicated installation disk. You boot the system directly from the SD card. You can try it out. Installing it on a hard drive or SSD is recommended but optional. You can also decided that this system doesn’t work for you and just shut down the system and try out another Linux distribution.

Often the Linux distribution doesn’t write much anyway. For a long time, I was booting a Linux from a USB stick in a read-only mode similar to a live CD. It was keeping everything in RAM. I had a script to persist the changes that I wanted to have on the next boot. I would see an issue to run that from an SD card. It would consume writes only if I tell it to do so.

The main difference is that this is Linux. With Linux you can do that. I don’t see an issue running Linux directly from an SD card.

It is to help the network and also fun to play around a little.

And the added bonus is of course more security when using a wallet connected to your own full node.

2 Likes

I would like to hijack this topic because I have a similar problem to solve and maybe one of you can point me to a solution.

I would like to pay my next food delivery order with BTC (just an example. It could be anything). Food delivery supports BitPay. BitPay is working on lightning integration. Currently they don’t support it but hopefully one day they will. Or the food deliver switches out BitPay for some other service that does support lightning. I doesn’t really care when it happens. I expect it to happen one day.

My plan: Lock 500€ BTC into a payment channel. I want to split the onchain fee once but consume the balance “for free” over several food delivery orders with almost no fee. A year later I might be able to resupply my channel without an onchain transaction. I just need an exchange with payment channel support. The first exchanges exist already. This should allow me to reuse the same payment channel over and over again.

Only issue I currently see is security. The maximum security I would get if the full node is running on my headless server at home in a docker container. From my mobile phone I would like to connect to my full node and make payments. Which software do I need for that?

1 Like

the one thing that really gets me is the for free part…

essentially that’s impossible else the credit card companies would have figured out how to set that up a long time ago… transactions in a global market is pretty complex and requires a lot of data moving around… ofc it will continually become cheaper, and yes with a server one would essentially be able to have that do the work instead of having to pay others for it.

the question really is why would you want to… unless if you were moving around really big transactions and there isn’t a maximum fee type deal…
or if you where making a grand number of small transactions…

so you are looking for ideas on how to optimize the storj payment system, ofc that is Ethereum based, which to my knowledge doesn’t swing with lightning… so maybe that’s a bad guess.

if it’s just for personal usage, why don’t you just get a crypto credit card and run a mining / ledger / honeyminer type thing on the server and transfer that into the CC crypto wallet.

but i’m not really that well versed in the whole crypto thing, but from what i understand it’s kinda what you are trying to do.

1 Like

Wellcome to lightning. Yes I can make offchain payments for free. Let me know if you have any questions. Otherwise the topic was more about which software do I need and not so much about how lightning works.

Who owns the priate key for the CC crypto wallet? I want a lightning wallet on my mobile phone with only me owning the private keys for it.

1 Like

i duno, i don’t have one :smiley: i suppose they would need some kind of access for it to work, but yeah if they can allow the transaction they could in theory control the wallet…

define free… is that like facebook is free, or driving on the roads is free… or how parks are free… or how one gets free food when visiting family for xmas, or how a new company will give one free stuff to get one subscribed to their service.
somewhere somebody has to pay…
so sounds a bit to good to be true.

1 Like

the correct ones while most likely more expensive will give you much better iops, less latency and much much more endurance.

That may all be correct, but in the end the card reader itself is the bottleneck. Of course, I could overclock the reader, but then the life of the card would also suffer massively. And a NAND SDCard with a reasonable amount of storage space costs a lot of money. The solution via SSD is much cheaper and more reliable.

Same here. Then use Raspiblitz. It has a lot of features :slightly_smiling_face:
You can also install Docker there and run the StorjNode.

I’m not quite sure if I understand the question correctly, I use the RTL web interface with VPN or TOR, as my node can only be reached via Onion.

It is safest for me to access it from outside via VPN. I once had the Zeus app on my smartphone in connection with Orbot, so I could reach my node via smartphone via TOR. I think an app is better in the end if you want to scan QR codes and use it to pay or receive. I haven’t tested that yet. I always pay directly from the RTL web interface.

1 Like

Yeah, I will go for RaspiBlitz, already got most of the needed hardware :wink:

This lil guy will literally sit on top of one my Storj node’s towers, don’t need 2 competing nodes :slight_smile:

2 Likes

6 posts were split to a new topic: SD vs SSD what the difference and why one cannot fully replace the other?

I have a bitcoin full node that I use for nothing and I have been considering adding lightning to it.
If you want to run a node, you need a stake to get in the game. It is like the gold that a bank keeps to prove it can handle your money.
Once you have that you have to transfer it from bitcoin into lightning. At the moment that is very not free.
Once that is in, payments can be virtually free depending on the cost of the channel you end up using.
Channels are kind of hard to understand but I did find something called autopilot that could manage it for you.

Lightning would be a cheaper way to pay SNOs but then storjlabs would have to buy bitcoin rather than use their storj coin stock.
Then, would there be problems with channels being depleted because payments are one way from them to SNOs?
The SNO would just need a lightning wallet, no?

There are similar solutions for ERC-20 tokens. We tried but failed because it comes with a few tradeoffs. I would say for ERC-20 tokens the solutions are not production-ready.

Let’s assume we would have a lightning network and could send STORJ payments over it. For the first payout, the satellite would open a new payment channel and lock some funds in it. Yes, the balance of the channel would be depleted at some point. There is a simple solution. The satellite could open a payment channel to your preferred exchange. Once per year, you could send all of your balance to the exchange which would automatically resupply your payment channel. Now we would be in a situation where we only need to rebalance a handful of payment channels between satellite and exchange from time to time. Basically, this also describes one of the current drawbacks. We need exchanges with payment channel support or otherwise, this plan doesn’t work.

2 Likes

isn’t it basically an accounting problem you are trying to solve with just adding more layers of tech…

simplify the concept down to it’s bare component parts… forget that it’s crypto and all that…

you have a bag of money, you distribute them / use them, they is then paid back to you for services and you end up with a bag of money.

sometimes it help’s a lot to get rid of all the clutter so our minds can truly comprehend the problem…
i’m sure, that i’m way off point… but that doesn’t matter, it’s about solving the problem, not my understanding of it.

else one of the most amazing tools i’ve found is turning stuff upside down, mirror, reverse, inverse, polarize… whatever we want to call it… if the solution doesn’t work… try the exact opposite.

might not technically always work well nor apply. but it often helps to think differently or notice different states or behaviors.

i know i’m not fully understanding it, transferring the tokens around needlessly is the problem… you need to become the exchange… people put in money… (own storj in your bank/exchange) and you simply move the numbers in an internal system… and sometime do one time transfer to been the balances of the satellites semi accurate.

the mastercard system does something similar… it will not update immediately, it does periodic updates, which is why you can pull money from multiple points at the same time or could…
then everything would end up getting back and then eventually one would have the double spend problem… ofc thats only a problem if the transactions happen externally… if the transactions happen in a “service / bank / exchange” that is local on a server or cluster or whatever… then you don’t have the issue with wasting massive resources on crypt computation, which is essentially the problem…

but that isn’t really required to keep a ledger, only if anyone unknown has to has access and use the ledger.

to my limited understanding of what you are saying :smiley:
anyways hope there maybe a bit of inspiration in my ranting
and yes i’m sure i’m wrong in 1400 ways, i know

I am not sure I understand what you are even talking about. My point was quite simple. Solutions like Lightning are great. There is an easy way to solve the payment channel rebalance problem. Just invite the exchange to the party and you can reuse the same payment channel over and over again. I am not trying to solve any issues. I am just explaining how payment channels are working. We don’t need to make this topic complicated.

3 Likes

In lightning node (and the proposed raiden for ethereum) you have a bag of money and you lock it up in channels. Other people’s money can then flow through these channels and you get paid a tiny amount.