PLEBNET Wiki

website·Indexed 31 days ago

https://www.plebnetwiki.com/

A comprehensive guide for Lightning Network node runners, covering node setup, liquidity balancing, routing fees, PPM, node hardening, security hygiene, and channel management.

Tokens
7.6K
Snippets
23
Records
52
Agent score
55%

What's inside PLEBNET

  1. Understand Lightning Network node liquidity balancing

    Liquidity balancing in a Lightning Network node involves managing the distribution of funds between 'Local' and 'Remote' balances across channels.

    • Local Balance: Funds you can send outward to a peer.
    • Remote Balance: Funds a peer can send to you (inbound liquidity).

    A 'perfectly balanced node' (where every channel is 50:50 local/remote) is practically impossible because active routing constantly shifts funds. However, maintaining a general balance is critical because senders typically assume a channel has 50% local capacity. If a sender attempts to route a payment that exceeds your actual local balance, the HTLC (Hashed Time-Locked Contract) will fail with a TemporaryChannelFailure, which can negatively impact your node's reputation with the sender.

  2. Understand the basics of Lightning Network routing

    Routing enables the transfer of Satoshis between nodes that do not share a direct channel. Because it is capital-intensive to maintain direct channels with every possible counterparty, routing nodes act as intermediaries. These nodes provide a service by forwarding payments along a path from the sender to the recipient and collect a routing fee for this service.
  3. Importance of Lightning Node uptime

    Consistent uptime is critical for lightning nodes to maintain a positive reputation among peers. Frequent reboots or offline periods cause peers to route around your node. Extended downtime carries the risk of open channels being force-closed, which may result in the loss of satoshis as the balance settles on-chain.
  4. Understand Inbound vs Outbound Liquidity in Lightning Network

    In the Lightning Network (LN), liquidity refers to the distribution of satoshis (sats) within a channel:

    • Outbound Liquidity: Sats on the local side of the channel. These are sats you control and can send.
    • Inbound Liquidity: Sats on the remote side of the channel. These are sats your peer controls, which allow you to receive payments to your side of the channel.

    By default, opening a simple channel places all sats on the local side of the opener. To receive payments over Lightning, you must have inbound liquidity (sats on the remote side) in at least one channel.

  5. Understand Static Channel Backups (SCB) in LND

    Static Channel Backups (SCB) are files used by LND to recover funds from on-chain wallets and the local side of off-chain channels. Unlike state backups, SCBs do not maintain the latest channel state; instead, they notify remote peers to force close the channel. This allows the user to receive their local balance relatively quickly, as the time lock for force closures typically applies only to the peer initiating the closure, not the other peer. SCB files are automatically updated whenever a channel is opened or closed.
  6. Manage Lightning Network liquidity using fees and routing

    To prevent liquidity from becoming stuck on a remote peer, node operators should set fees higher than their cost of rebalancing. This ensures that the cost of moving sats back to the local balance is covered by the fees earned from routing. If a node has a natural two-way flow of payments, manual rebalancing may not be necessary.
  7. Create an SSH SOCKS5 proxy for secure web interface access

    Local web interfaces for node software (like Umbrel, Thunderhub, RTL) often lack HTTPS and use insecure password authentication. To secure access, create a SOCKS5 proxy via SSH on your local computer. This encrypts the traffic and requires an SSH key for access.

    Steps:

    1. Create the SOCKS5 proxy on your computer.
    2. Configure your browser (e.g., Firefox) to use a manual proxy configuration with localhost as the SOCKS5 Host and port 8123.
    3. Optionally, use a firewall (iptables) on the node to block outbound ports for these interfaces to force the use of the tunnel.
    # Create SOCKS5 proxy on port 8123
    ssh -D 8123 -f -C -q -N umbrel@umbrel.local
  8. Methods to acquire inbound liquidity

    There are several ways to increase inbound liquidity to enable receiving payments:

    1. Passive Acquisition: Make payments to others, buy from merchants, or donate to projects. This moves sats from your local side to the remote side, naturally balancing the channel.
    2. External Opening: Pay a service or peer to open a channel towards you.
    3. Balanced Opening: Use tools to open a channel with sats on both sides from the start.
    4. Submarine/Atomic Swaps: Send local LN sats to a provider in exchange for on-chain sats without closing the channel.
    5. Third-party Wallets: Send local LN sats to a hosted wallet or exchange that allows withdrawals to an on-chain address.
  9. Identify cryptocurrency exchanges with Lightning Network support

    The following exchanges have confirmed support for the Bitcoin Lightning Network. Note that KYC requirements and minimum channel capacities vary by provider.
    ExchangeLightning SupportKYC RequiredMin. Chan Capacity (BTC)Node URI
    BinanceYes (Jul 2023)UnknownUnknownLink
    CoinbaseYes (Apr 2024)YesUnknownn.a.
    SimpleSwapYes (Jul 2024)NoUnknownn.a.
    KrakenYes (Apr 2022)YesUnknownLink
    BitfinexYes (Sep 2020)Yes0.04ln.bitfinex.com
    BitstampYes (Jul 2019)Yes0.0002ln.bitstamp.net
    OKExYes (Apr 2021)Yes0.04Link
    OKcoinYes (Mar 2021)Yes0.04Link
    NiceHashYes (Q3 2020)n.a.0.005ln.nicehash.com
    CoinCornerYes (Q1 2021)UnknownUnknownUnknown
    BitMexYes (Aug 2018)YesUnknownLink
    BudaYes (Q3 2018)YesUnknownUnknown
    StrikeYesYesUnknownLink
    Mt PelerinYes (Jan 2023)NoUnknownln.mtpelerin.com
  10. Understand and prevent one-way liquidity drains in Lightning Network nodes

    Liquidity drains occur when sats move from your node to a peer (remote) and do not return. This typically happens when you provide a low-fee path to a popular destination (e.g., ACINQ, BFX, or LOOP) while lacking an equivalent cheap path in the opposite direction. Because popular nodes are often directly connected to most wallet providers, they have little incentive to route traffic back through your node unless their own direct channels are exhausted.

    To manage liquidity flow and prevent your local reservoir from being emptied, follow these strategies:

    1. Avoid Default Low Fees: Do not start channels with default low fees (e.g., Base Fee = 1 Sat, Fee Rate = 1 ppm), as this makes your node a cheap transit point for consumers.
    2. Start High and Scale Down: Set high fees upon channel creation. Gradually lower them (e.g., 10% per day) until you observe routing traffic. This helps you find a balance between generating traffic and recouping rebalancing costs.
    3. Encourage Two-Way Traffic: Analyze where your traffic originates and attempt to open low-fee paths in the opposite direction to encourage sats to flow back to your node.
  11. Ensure node stability with a Static IP Address

    To prevent connectivity loss caused by routers dynamically reassigning IP addresses, configure a static IP for your node. In your router settings, look for options labeled as manually-assigned IP, reserved IP, or disable automatic IP assignment (often found in advanced settings). This ensures the node retains the same IP address after reboots or router table refreshes.
  12. Reserve funds for LND Anchor Channels on Umbrel

    LND requires a reserve for commitment fees (10K sats per channel, max 100K sats). To prevent issues where a single UTXO cannot be spent for opening channels, it is recommended to maintain at least one 100K sat UTXO in your on-chain wallet. On Umbrel, you can create this specific UTXO by depositing to a new address and then immediately withdrawing 100,000 sats back to that same address.
    1. Umbrel Dashboard -> Bitcoin Wallet -> Deposit (Copy the new address).
    2. Umbrel Dashboard -> Bitcoin Wallet -> Withdraw -> Paste the address from step 1 -> Amount: 100,000 Sats.
    3. Set fees via mempool.space and send.