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
  • Install Polar
  • Core UI Components
  • Create and Start a Network
  • Create and Pay an Invoice

Was this helpful?

  1. LAPPs
  2. Guides
  3. Use Polar to Build Your First LAPP

Setup: Local Cluster with Polar

PreviousUse Polar to Build Your First LAPPNextSetup: Run the Completed App

Last updated 3 years ago

Was this helpful?

Install Polar

This tutorial will leverage the Polar application for setting up a local cluster of Lightning Network nodes on regtest. Polar for MacOS, Linux, and Windows. The source code is hosted .

Core UI Components

After downloading, installing, and running Polar, the following welcome screen will appear.

There are three options for users in the top right:

  1. Create Network: spin up a new cluster of LND, c-lightning, eclair, and bitcoind nodes. This will create a Docker container within which Polar will operate.

  2. Import Network: download a pre-built cluster of Lightning nodes for local testing.

  3. Manage Images: customize the command used to start various versions of LND, c-lightning, eclair, and bitcoind nodes.

This tutorial will first focus on Create Network, so click either the orange “Create a Lightning Network” button in the middle, or Create Network in the top right corner.

Create and Start a Network

After clicking Create Network, the following screen should appear. As previously mentioned, it allows you to specify how many of each node implementations your cluster will be composed of.

Note: You will always need at least one Bitcoin Core node!

Create a new Lightning Network with the following parameters:

  • Network Name = test01

  • How many Managed Nodes?

    • LND = 2

    • c-lightning = 0

    • Eclair = 0

    • Bitcoin Core = 1

After clicking the orange Create Network button, Polar should display this new interface.

Press the orange Start button in the top right corner to start your local network. It takes a couple seconds for the nodes to boot up, but the indicator lights will eventually turn green signaling that the process has completed. Once this has happened, click on “alice” the lnd node to see the below screen.

Most of the information on this screen is self-explanatory. The local regtest instance is only at Block Height = 1 so alice’s Confirmed Balance and Unconfirmed Balance are both 0 sats. To change that, click on the Actions tab for alice, ensure Deposit Funds is set to 1,000,000 and press Deposit.

Two numbers should have changed after clicking Deposit. First, the height number in the top status bar incremented from 1 to 107. That is because it takes 100 blocks for a coinbase reward to become spendable by a bitcoind node (if you click on backend1, you’ll see a Spendable Balance of >349 BTC and an Immature Balance of >5000 BTC), and an additional 6 blocks for a deposit to lnd to be confirmed. Second, alice’s balance in the top right of her node panel increased from 0 to 1.0M sats, signifying the successful deposit.

Create and Pay an Invoice

Now that alice’s on-chain wallet has been funded, it’s time to open a channel. Click Open Channel -> Outgoing, select bob as the Destination, accept the default Capacity (sats) of 250,000, and click the orange Open Channel button.

Once the channel has been opened, click on the new green line between alice and bob’s lnd nodes to see the below screen.

Hovering over the green dot on alice’s node will display “Source”, while hovering over the blue dot on bob’s node will display “Destination”. This is to signify which side of the channel has the Source Balance of 240,950 sats, and which side has the Destination Balance of 0 sats.

Since bob has no Destination Balance, right click on his node open an Actions panel, and select Create Invoice. Accept the default 50,000 sat Amount, and press the orange Create Invoice button. Successfully doing so should create this screen.

Click on Copy & Close, right click on alice’s node, and select Pay Invoice. Paste the invoice you copied from the above screen into the Bolt 11 Invoice field, and click the orange Pay Invoice button. After doing so, the alice, bob, and channel dashboards should look like this:

Congratulations! You’ve made your first successful Lightning Network payment on regtest!

Before moving on, click on bob’s lnd node and over to his Connect dashboard. The url:port information for bob’s GRPC Host, REST Host, P2P Internal, and P2P External will be useful in the next section, as will the Hex details of bob’s TLS Cert and Admin Macaroon.

Now, click the red Stop button in the top right corner and prepare for the next section.

Mac and Windows users will need to install as a dependency before using Polar. Linux users will need to download both and .

Docker Desktop
Docker Server
Docker Compose
can be downloaded
on Github
Polar website
Polar welcome screen
Create Network Screen
New Network Screen, Pre-Boot
New Network Screen, Post-Boot
Alice's Action Tab
New Channel Details
Invoice Success
Alice, Bob, and Channel Success
Bob Connect