Image
Image
27-29 May, 2025
Image 27-29 May, 2025

Las Vegas, NV

Skip to content
Subscribe
  • Home
  • Services
  • Video
  • Events
Subscribe

Reading

How To Build Your Own Lightning Node with Lightning Network Daemon (LND)
News Adoption

How To Build Your Own Lightning Node with Lightning Network Daemon (LND)

Joe Davison
By: Joe Davison
Aug 01, 2022
3 min read
How To Build Your Own Lightning Node with Lightning Network Daemon (LND)

This article was originally published on joedavison.com

Lightning Network is growing in popularity and many believe it is the answer to bitcoin scalability. In order to understand Lightning Network more, I recently set out to build and run a Lightning node from scratch on my spare Linux machine.

To start, I downloaded the LND source code from github. I had some local environment issues to fix such as installing Go and a series of other dependencies. I saw the docker distribution and tried that rather than worry about my local environment.

Unfortunately I had issues with docker that proved even more difficult so I went back to configuring my local environment, setting environment variables, configuration files in ~/.lnd/, admin.macaroon, etc.

Rather than download the entire blockchain, I configured LND to use neutrino. Finally got it working and ran ./lnd from the command line. Opened another terminal.

Then I used lncli to set up a wallet and generate a bitcoin receive address. Deposited some bitcoin to the node. Spent some time studying the various endpoints that could be called with lncli and the API signatures. Tested out a bunch of lncli commands to get a feeling for interacting with the node endpoints.

I decided to open an initial channel of 200,000 sats. I picked a well-connected and well-known node to open a channel with, fulmo.org. I noticed there was an option in the command to open a new channel which allowed for pushing a balance to the remote node.


I decided to retain 100,000 in local balance and push 100,000 to the remote node. I thought this would be a good idea to start out with some inbound capacity but I soon after learned this was a mistake. (When the channel is closed, that amount will go to the remote node. A small cost for a big education …)

Once this channel was open, after a few hours I decided to search the internet for my node. I googled the public key of my node and found a result on 1ML. I went through the process to claim my node. This process involved opening a channel in a specific amount to 1ML. This would be my node’s second channel of 278,171 sats.

uiRZoNmz4bFrQDl3OB8HLfMQs Us2R0n1DOxSE5sBk

You can find my Lightning node 1ML profile page here.

With two channels open, it was time to test sending and receiving some payments.

OMWMgxvFXnusoWuJ0HvYlF1CnJxp4U20h82dR3URsJSo 8L5xn0NPuTyP01p0YRIELLznGDI 9AT1oMdXui3F4hDu1U7fgFqg 4aooucEjwreCpG2XWUDNYrSmZkCJ9DgEQgNdbWqJwmTgtCQw
78nmYIU1vTR8qBbetNwkyH6PJK0cpq Ao79OKa rWrMTe1fubG frNTWRW088eM8cKnTGANse6JcR59iEQkxqf03nnAv1O0fwp8rq4m

While doing some additional research I heard about RTL, a front-end to the same functionality available through lncli. After resolving a number of nodejs dependencies (including gratuitous use of the ‘–force’ modifier), and setting few configuration flags, I got RTL running and navigated to localhost:3000

gosDi7BLyJmQZT5hafmdO0LEhMV uFDxUd8UG zzV4XXfWRuRTzQuhNSOeo80TwPLHKy6kvdU3BvZVMjPhsvYDP06fAIo3LktOui8zdC 0KIsN2PdPSkKMp6nY3baSTfFzw6DJSvjRydiDGceQ
TdZCJf53Z2UhT nyJ3XproFJqbivwLtNLDYjVhqQBtXuxAB2N Ag

RTL dashboard for LND node 030f59c7ce0a35969c11

I used the RTL interface to update the fee policy on my channels to 0 mSat base (as suggested by lightning researcher René Pickhardt), 1 mSat fee rate

Observations so far:

  • Payments over 70,000 sats consistently cannot find a route
  • Payments between 20,000 and 50,000 sats work most of the time but not always
  • In the typical case payments have 4-5 hops
  • In the worst cases there are 15 hops or no route at all
  • No receive routes found for Blue Wallet or LNTXBOT invoices
  • Gossip messages are being broadcast

Next steps:

  • Increase capacity to 0.1 BTC (10 well-connected channels 0.01 BTC each)
  • Retest sending 100,000+ sat payments
  • Retest receiving in any amount

My takeaway:

Lightning Network circa 2022 reminds me of the 1995-1999 era web. It’s fun, it’s confusing. It sort of works, well enough that everyone sees massive potential. It feels inevitable, like it is only a matter of time until this is everywhere.

In the meantime, there is much work to do. What a time to be alive!

About the author

Joe Davison is a former Engineering, Product and Program management leader at Google and Apple with 20+ years of experience scaling foundational internet services and software development organizations.

Follow Joe on Twitter:

Stay on top of Bitcoin
news, get weekly updates
in your inbox.

Recommended News

Editors Picks
Editors Picks
New Hampshire Approves and Signs Bitcoin Reserve Bill into Law
May 08, 2025
2 min read
By: Alex Lari
Adoption
Adoption
Florida Bitcoin Reserve Bills “Indefinitely Postponed”
May 07, 2025
2 min read
By: Alex Lari
Adoption
Adoption
Roswell NM Launches World’s First Municipal Bitcoin Strategic Reserve
May 04, 2025
9 min read
By: Guy Malone
All News
Accelerating Adoption
News
  • Adoption
  • Legal
  • Markets
  • Mining
  • Opinion
  • Press Release
  • Learn
  • Sponsored
Company
  • About Us
  • Brand Assets
  • Newsletter
  • Services
  • Site Map
  • Terms & Privacy
Connect
  • Contact Us
  • Contribute
  • Services
  • Media Partner
  • RSS
  • Videos
Social Media
  • Twitter
  • YouTube
  • Telegram
  • LinkedIn
  • Instagram
  • Nostr
  • TikTok
  • Flipboard

© A Bitcoin-Focused Company | 256 Media, 2024

Language Switcher
Search
  • News
    • Adoption
    • Legal
    • Markets
    • Mining
    • Opinion
    • Press Release
    • Learn
    • Interviews
  • Services
  • Video
  • Events
  • News
    • Adoption
    • Interviews
    • Learn
    • Legal
    • Markets
    • Mining
    • Opinion
    • Press Release
  • About Us
  • Contact
  • Newsletter
Search

Popular Articles

Launch of Onramp Trade: Industry-Leading Bitcoin Financial Services Platform
May 8, 2025 · 2 min
New Hampshire Approves and Signs Bitcoin Reserve Bill into Law
May 8, 2025 · 2 min
Arizona Governor Vetoes Bitcoin Bill
May 7, 2025 · 2 min
Florida Bitcoin Reserve Bills “Indefinitely Postponed”
May 7, 2025 · 2 min
Bitcoin Dominance Hits 65%, Highest in 4 Years
May 6, 2025 · 3 min
Ledn’s Mauricio Di Bartolomeo & Adam Reeds: Revolutionizing Global Lending
May 5, 2025 · 9 min

Bitcoin Only
Newsletter

Get weekly news roundups direct to your inbox!