burn the bridge Profile picture
#FREESAMOURAI https://t.co/nZtTTPBw3V I wrote some Bitcoin self-custody & mining guides. Now I co-host @pod256 Support 🧡 https://t.co/MnUtM4qAwf

Jun 26, 2021, 24 tweets

1/24 Build a self-custodial Lightning node with @RaspiBlitz

A thread on Lightning for beginners.

2/24 This thread is the short version of a more detailed article that can be found on my blog.

Lightning is a rabbit hole in and of itself, so this thread will only cover the very high level steps involved. Please check out my article for the full story.

econoalchemist.com/post/build-a-s…

3/24 Lightning is a layer-2 payment network built on layer-1, #Bitcoin

Network peers with open bi-directional channels can send/receive payments quickly without the need to wait for block confirmations. Other peers can help facilitate the best network route for payments.

4/24 By running your own Lightning node, you can maintain custody. There are no privacy guarantees in Lightning. @cycryptr wrote an excellent article on the subject & had a great rip on @citadeldispatch with @openoms & @ODELL

citadeldispatch.com/cd21/

abytesjourney.com/lightning-priv…

5/24 I used a @Raspberry_Pi 4B-4GB, a Smraza Case, 32GB microSD Card, Samsung T7 1TB SSD, & an ethernet cable for my build. Total cost was ~$260 USD.

6/24 First, build the RasPi OS image by downloading & verifying the zip file. Then download the imager. Save both files in the same folder then flash the image file to your microSD card.

downloads.raspberrypi.org/raspios_arm64/…

raspberrypi.org/software/

7/24 After flashing, write a blank ssh file to the root folder. Then insert the microSD card into the RasPi. Connect the SSD, ethernet, & power adaptor. Then open an SSH connection from your desktop to your RasPi.

8/24 Once logged in, use the commands found here to compile the @RaspiBlitz software then reboot. You will now log in with a new username/password. RaspiBlitz connects via Tor by default.

github.com/rootzoll/raspi…

9/24 Upon initial configuration; choose Bitcoin, name your node, set your passwords, format the SSD, & begin the Initial Blockchain Download (IBD). This took me 3-days 6-hours.

10/24 During IBD, you can setup your new LND Wallet. Make sure to secure your seed phrase on paper, not in a digital format. Do not share it with anyone.

11/24 After IBD, you can install the Ride The Lightning (RTL) web-interface from the main menu. This is a smooth UX interface for interacting with your node.

12/24 Deposit on-chain #bitcoin to your LND wallet then you can open public or private (un-announced) channels. Be aware of the privacy implications such as exposing your node's capacity and your active & historical channels. Check out nodes on 1ml.com to see.

13/24 You & your peer will both maintain a balance state of your channel. At first, all the liquidity will be on your side which means you can spend but not receive. Lightning Terminal Loop (LiT) is another service that can help with that.

14/24 The loop out will balance your channel by moving sats en route to Lightning Labs. Then Lightning Labs will send #bitcoin to your on-chain LND wallet minus their fee. It's custodial. This is done with HTLC's so if it doesn't work, no loss. This can take several attempts.

15/24 A dishonest peer could force-close your channel & broadcast a previous balance state thus stealing some funds from you in the event your node is off-line. Watchtowers can be used from different geolocations to protect against this with a justice tx.

openoms.gitbook.io/lightning-node…

16/24 Keeping an automatic backup of your Lightning node can be helpful in the event of a catastrophic hardware failure. I utilize the USB stick option. To restore; you will need your 24-words, "C" password, & the channels.backup file.

17/24 @ZeusLN can connect to your @RaspiBlitz node via Tor. Now you can send/receive Lightning payments on the go, backed by your own node at home. Export the tls certificate from RaspiBlitz and install it on your phone to prevent MITM attacks.

18/24 You can create invoices from RTL or from @ZeusLN mobile. Share the resulting QR code or copy/paste the alpha-numeric string. Invoices expose your node's pubkey so be cautious about public sharing. You will need inbound liquidity to receive sats.

19/24 Paying invoices is just as easy from both interfaces. You cannot make self payments. By making some initial Lightning payments you can get the gossip network to start noticing your node better which may help if you had trouble looping out.

20/24 @RaspiBlitz has several extra features like @BtcpayServer, Electrum Rust Server, Mempool Explorer, Join Market, and you can even download the Bitcoin Whitepaper from the blockchain.

22/24 More companies are accepting Lightning so you can use your sats in more places. A couple services that I have enjoyed are @paywithmoon & @bitrefill. Lightning has many conveniences and many tradeoffs. Like Bitcoin, there are no privacy guarantees.

23/24 Off-chain payments expose less info to the ledger however considerations should be made around which UTXO's are used in funding channels & how they are used after.

Lightning payments are fast but off-line peers can cause routing disruptions.

24/24 Tx fees are low but maintaining balanced channels introduces some friction into the experience.

Typically, the amount of #bitcoin you have on Lightning is less than on-chain, yet the amount of backup info required is more.

Overall Lightning is a great tool to use.

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling