Builder's Guide
  • Welcome to the Builder's Guide to the LND Galaxy!
  • The Lightning Network
    • Overview
    • Payment Channels
      • Lifecycle of a Payment Channel
      • Watchtowers
      • Understanding Sweeping
      • Etymology
    • The Gossip Network
      • Identifying Good Peers on the Lightning Network
    • Pathfinding
      • Finding routes in the Lightning Network
      • Channel Fees
      • Multipath Payments (MPP)
    • Lightning Network Invoices
      • Understanding Lightning Invoices
    • Making Payments
      • The Payment Cycle
      • Timelocks
      • ⭐Hashed Timelock Contract (HTLC)
      • Payment Etymology
      • ⭐What Makes a Good Routing Node
      • Understanding Submarine Swaps
      • Instant Submarine Swaps
    • Liquidity
      • ⭐Understanding Liquidity
      • Managing Liquidity on the Lightning Network
      • Liquidity Management for Lightning Merchants
      • How to Get Inbound Capacity on the Lightning Network
      • Lightning Service Provider
    • L402: Lightning HTTP 402 Protocol
      • Macaroons
      • L402
      • 📋Protocol Specification
      • Implementations and Links
    • Taproot Assets
      • Taproot Assets Protocol
      • Taproot Assets on Lightning
      • Edge Nodes
      • Taproot Assets Trustless Swap
      • FAQ
      • Glossary
  • Lightning Network Tools
    • LND
      • 🛠️Get Started
      • lnd.conf
      • First Steps With LND
      • Wallet Management
      • Sending Payments
      • Atomic Multi-path Payments (AMP)
      • Receiving Payments
      • Unconfirmed Bitcoin Transactions
      • Channel Fees
      • Inbound Channel Fees
      • Macaroons
      • Configuring Watchtowers
      • Pathfinding
      • Blinded Paths
      • Key Import
      • Secure Your Lightning Network Node
      • Configuration of a Routing Node
      • Quick Tor Setup
      • Configuring Tor
      • Enable ‘Neutrino mode’ in Bitcoin Core
      • Send Messages With Keysend
      • Partially Signed Bitcoin Transactions
      • Bulk onchain actions with PSBTs
      • Sweeper
      • Debugging LND
      • Fuzzing LND
      • LND API documentation
      • Channel Acceptor
      • RPC Middleware Interceptor
      • HTLC Interceptor
      • NAT Traversal
      • Recovery: Planning for Failure
      • Migrating LND
      • Disaster recovery
      • Contribute to LND
    • Lightning Terminal
      • What is Lightning Terminal?
      • 🛠️Get litd
      • Run litd
      • Integrating litd
      • Demo: Litd Speed Run
      • Connect to Terminal
      • Recommended Channels
      • Rankings
      • Health Checks
      • Liquidity Report
      • Opening Lightning Network Channels
      • Managing Channel Liquidity
      • Autofees
      • AutoOpen
      • LND Accounts
      • Loop and Lightning Terminal
      • Loop Fees
      • Pool and Lightning Terminal
      • Command Line Interface
      • Troubleshooting
      • Lightning Node Connect: Under the hood
      • LNC Node Package
      • LITD API Documentation
      • Privacy and Security
      • Privacy Policy
      • Terms of Use
    • Loop
      • 🛠️Get Started
      • The Loop CLI
      • Autoloop
      • Static Loop In Addresses
      • Instant Loop Outs
      • Peer with Loop
      • Loop API Documentation
    • Pool
      • Overview
      • Quickstart
      • 🛠️Installation
      • First Steps
      • Accounts
      • Orders and Asks
      • Sidecar Channels
      • Zero-confirmation Channels
      • Channel Leases
      • Batch Execution
      • Account Recovery
      • Pool API Documentation
      • FAQs
    • Taproot Assets
      • Get Started
      • First Steps
      • Taproot Assets Channels
      • Asset Decimal Display
      • Become an Edge Node
      • RFQ
      • Collectibles
      • Universes
      • Asset Loop
      • Debugging Tapd
      • Multisignature
      • Minting Assets With an External Signer
      • Lightning Polar
      • Operational Safety Guidelines
      • Taproot Assets API Documentation
    • Aperture
      • ⚒️Get Aperture
      • LNC Backend
      • LNC Mailbox
      • Pricing
    • Faraday
      • 🛠️Get Started
      • The Faraday CLI
      • Faraday API Documentation
  • LAPPs
    • Guides
      • Use Polar to Build Your First LAPP
        • Setup: Local Cluster with Polar
        • Setup: Run the Completed App
        • Setup: Run the App Without LND
      • Add Features
        • Feature 1: Connect to LND
        • Feature 2: Display Node Alias and Balance
        • Feature 3: Sign and Verify Posts
        • Feature 4: Modify Upvote Action
      • Make Your own LNC-powered Application
    • Next Steps
  • Community Resources
    • Resource List
    • Lightning Bulb 💡
    • Glossary
    • FAQ
Powered by GitBook
On this page
  • Deposit bitcoin
  • Open a channel
  • Make a payment
  • Get inbound capacity
  • Receive payments
  • Connect to Terminal

Was this helpful?

  1. Lightning Network Tools
  2. LND

First Steps With LND

Learn how to fund your wallet, open your first channel and make your first payments with LND.

Previouslnd.confNextWallet Management

Last updated 13 days ago

Was this helpful?

To begin using LND, we first need to make sure it is running and fully synced to the chain and graph. We can use the command lncli getinfo to get this information. If your node is not yet synced to the chain or graph, we will need to wait. If the command fails entirely, LND may not be running.

Once your LND node is running and fully synced, we can begin using it to open channels and make payments. Depending on what we want to achieve, the flow might differ, but the following guide should provide a good representation of a typical .

Deposit bitcoin

The first step to getting started is to deposit bitcoin into our Lightning Node with an on-chain transaction. We can generate a taproot address with the command lncli newaddress p2tr. If our existing wallet or exchange does not support sending to taproot addresses, we can also replace p2tr with legacy segwit (np2wkh) or native segwit (p2wkh) to generate the respective address formats.

Once our bitcoin transaction is waiting to be confirmed, we can use the command lncli walletbalance to see the new unconfirmed balance of our wallet.

Open a channel

To open a channel, we will first need to decide on a peer. You can use or a to find a peer.

To open a channel, we need to know our peer’s public key and their IP or onion address. We’ll also need to decide on a channel capacity. We should also note that we might not be able to open a channel of the full amount that we have in our wallet, due to on-chain fees and anchor reserves (for each channel our node needs to keep 10,000 satoshis in on-chain balance, up to a total balance of 100,000 satoshis). Additionally, it’s important to note that some peers might also impose minimum channel sizes. You can try to triangulate the minimum channel size for certain peers by looking at an explorer. But, regardless, you will be notified of the minimum channel size when you try to open a channel.

We can use a command like the following to open our first channel. It specified the peer’s node key, their onion address and port, the channel size and the fees we are willing to pay for this transaction. Your channel will have to be confirmed on the blockchain within two weeks, or your peer might forget about it! If our wallet balance is still unconfirmed, we can only use it to open a channel with it by specifying min_confs to be zero.

lncli openchannel --node_key 026165850492521f4ac8abd9bd8088123446d126f648ca35e60f88177dc149ceb2 --connect d7kak4gpnbamm3b4ufq54aatgm3alhx3jwmu6kyy2bgjaauinkipz3id.onion:9735 --local_amt 1000000 --sat_per_vbyte 1 --min_confs 0

Typically, our channel will take three confirmations to be considered open and usable.

Advanced users can also .

Make a payment

Once our channel is active, we can use it to make outgoing payments. Grab a Lightning invoice from a mobile wallet or online shop. Then, pay the invoice with the command line!

lncli payinvoice lnbc10u1p30rpd4pp5zuewvg8ltvet6exlm7r6jv3tqrgw4t6hqfvuxzr8yak80lpz2kfqdp9gf6kjmryv4ew9qyewvsywatfv3jjq5n0vd4hxcqzpgxqyz5vqsp5xznzm7hyrezws4djjw375axnpexzparf8vgcuv2gu8md0ma7frsq9qyyssq2p4kgmerjz9c220gkkf7fwcdcrs0ux3ghy5mgryzws0tk9pq5uv3kqzfdztjxt6qe0zsgqe3u53ckfh3k2z2fvznu8tlfd92cs9a3egputr0mg

In your Terminal, you will see what route the payment is taking and what fee it is paying.

Get inbound capacity

Before we can receive payments, we will need to get some inbound capacity. We can achieve this in multiple ways:

  • Make many outgoing payments

We can see the remote and local balance for all our channels with the command lncli listchannels

Receive payments

Once we have inbound capacity, we can begin receiving payments over the Lightning network.

We can create a blank invoice with the command lncli addinvoice and pass it to a mobile wallet or whoever owes us money.

We can also specify parameters to create a more specific invoice, for example, by including an amount or a note. Popular options include:

--memo A memo, such as “for dinner yesterday”

--amt An amount in satoshis

--expiry An expiry time in seconds. The default is 3600 seconds (1h)

--amp Generates an AMP invoice which can be paid multiple times

Connect to Terminal

Ask a friend to open a channel, or buy a channel using

For easy access to a graphical user interface showing your peers, your most recent forwards and Lightning Lab’s liquidity products try out Lightning Terminal, which you can .

payment channel lifecycle
Lightning Terminal
Lightning Network explorer
Read more: Identifying Good Peers in the Lightning Network
open a channel using external funds using the PSBT feature
Loop Out
Lightning Pool
Read more: How to get inbound capacity on the Lightning Network
Read more: Generating and understanding AMP invoices
learn how to setup here