Lightning Network Self-Hosting

55 minutes Layer 2 Sovereignty

Introduction: Why Self-Host Lightning?

You've set up your Bitcoin node. You verify your own transactions. You control your own keys. But when it comes to Lightning payments, are you still trusting someone else's infrastructure?

The Lightning Network enables instant, low-fee Bitcoin payments by creating payment channels between nodes. But using custodial Lightning wallets—like Wallet of Satoshi or the default mode of many apps—means trusting a third party with your funds. Self-hosting your Lightning node is the final step to complete payment sovereignty.

Custodial vs. Self-Hosted Lightning

Custodial Lightning (e.g., Wallet of Satoshi):

  • Someone else holds your Bitcoin
  • They can see all your payments
  • They can freeze your funds
  • They can be hacked, go bankrupt, or exit scam
  • Convenient but not sovereign

Self-Hosted Lightning:

  • You control your funds (your keys, your channels)
  • Your payment history stays private
  • No one can freeze your funds
  • You choose who to connect with
  • Requires setup and maintenance, but maximizes sovereignty

What Self-Hosting Gives You

  • True custody: Your Bitcoin never leaves your control
  • Payment privacy: No third party sees your transactions
  • Censorship resistance: No one can block your payments
  • Routing revenue: Optionally earn sats by routing others' payments
  • Integration: Connect mobile wallets to your own node

Prerequisites

Before setting up a Lightning node, you should have:

  • A running Bitcoin full node (from Module 3 of Stage 2)
  • Some on-chain Bitcoin for opening channels (0.01-0.1+ BTC recommended)
  • Always-on hardware or willingness to run your node frequently
  • Basic command-line comfort (or use a GUI-based solution like Umbrel)

Lightning Requires Attention

Unlike cold storage, Lightning requires your node to be online to receive payments and monitor for cheating attempts (old channel states). If you go offline for extended periods without proper watchtower protection, you risk losing funds.

Start small. Begin with amounts you're comfortable experimenting with while you learn the system.

Lightning Node Implementations

There are several Lightning node implementations, each with different philosophies and features. All implement the same BOLT (Basis of Lightning Technology) specifications, so they can interoperate.

LND (Lightning Network Daemon)

Developed by Lightning Labs. The most popular implementation.

Pros:

  • Largest ecosystem of tools and integrations
  • Excellent documentation and community support
  • Used by most node packages (Umbrel, RaspiBlitz, etc.)
  • Strong mobile wallet support (Zeus, Zap, BlueWallet)
  • Active development with regular updates

Cons:

  • Slightly higher resource usage
  • Some advanced features require paid services (Loop, Pool)
  • Written in Go (harder to audit for some)

Best for:

Most users, especially beginners. The safest choice for broad compatibility.

Core Lightning (CLN, formerly c-lightning)

Developed by Blockstream. Focus on modularity and spec compliance.

Pros:

  • Lightweight and efficient (lower resource usage)
  • Highly modular plugin system
  • Written in C (easier to audit, very fast)
  • Strict spec compliance
  • Great for developers building custom solutions

Cons:

  • Smaller ecosystem of tools
  • Fewer GUI options
  • Less beginner-friendly documentation

Best for:

Advanced users, developers, or those who want maximum efficiency.

Eclair

Developed by ACINQ (creators of Phoenix Wallet). Written in Scala.

Pros:

  • Powers Phoenix, one of the best Lightning wallets
  • Strong focus on mobile-first experience
  • Implements latest features (splicing, etc.)

Cons:

  • Smaller community outside ACINQ ecosystem
  • Less commonly used for self-hosting
  • JVM-based (higher memory usage)

Best for:

Users who want to run infrastructure compatible with Phoenix wallet ecosystem.

Recommendation

For most sovereign users: Start with LND. It has the best ecosystem, documentation, and support. Most node packages (Umbrel, Start9, RaspiBlitz) use LND by default. You can always run CLN later if you want to experiment.

Setting Up Your Lightning Node

There are two main approaches to running a Lightning node: using a node package (easier) or manual installation (more control).

Option 1: Node Packages (Recommended for Most)

Node packages like Umbrel, Start9, RaspiBlitz, and MyNode bundle Bitcoin Core + LND (and other services) into an easy-to-use package.

Umbrel

Beautiful interface, one-click app installs, beginner-friendly.

  • Install on Raspberry Pi, old PC, or Umbrel Home hardware
  • Bitcoin + Lightning ready out of the box
  • App store for additional services (BTCPay, Mempool, etc.)
  • Web-based GUI for channel management

Setup time: 1-2 hours (plus sync time)

Start9

Privacy-focused, open-source, excellent for self-hosting multiple services.

  • Embassy OS provides a clean interface
  • Strong focus on sovereignty and privacy
  • Marketplace of self-hosted apps
  • Tor integration by default

Setup time: 2-3 hours (plus sync time)

RaspiBlitz

DIY-focused, educational, highly customizable.

  • LCD display shows node status
  • Script-based interface (SSH)
  • Great for learning the internals
  • Very active community

Setup time: 2-4 hours (plus sync time)

Option 2: Manual Installation

For maximum control, you can install LND or CLN directly on your Bitcoin node. This is more complex but gives you full configuration control.

Basic LND Setup (Linux)

# Download LND (check for latest version)

wget https://github.com/lightningnetwork/lnd/releases/download/v0.17.0-beta/lnd-linux-amd64-v0.17.0-beta.tar.gz

tar -xzf lnd-linux-amd64-v0.17.0-beta.tar.gz

sudo mv lnd-linux-amd64-v0.17.0-beta/lnd /usr/local/bin/

sudo mv lnd-linux-amd64-v0.17.0-beta/lncli /usr/local/bin/

 

# Create config directory

mkdir -p ~/.lnd

 

# Create basic config (lnd.conf)

cat > ~/.lnd/lnd.conf << EOF

[Application Options]

alias=YourNodeName

[Bitcoin]

bitcoin.active=1

bitcoin.mainnet=1

bitcoin.node=bitcoind

[Bitcoind]

bitcoind.rpcuser=yourrpcuser

bitcoind.rpcpass=yourrpcpass

EOF

Backup Your Seed and Static Channel Backup

When you first create your LND wallet, you'll get a 24-word seed phrase. Back this up immediately using the same security practices as your on-chain wallet.

Additionally, enable Static Channel Backups (SCB). This file allows you to recover channel funds if your node is destroyed. Back it up after every channel open/close.

Channel Management

Channels are the core of Lightning. Understanding how to open, manage, and close them is essential for a well-functioning node.

Opening Channels

When you open a channel, you commit on-chain Bitcoin to a 2-of-2 multisig with your channel partner. This Bitcoin can then move back and forth off-chain.

Key Considerations:

  • Channel size: Larger channels can route bigger payments. Start with 500K-2M sats per channel.
  • On-chain fees: Opening and closing channels requires on-chain transactions. Open during low-fee periods.
  • Partner selection: Connect to well-connected, reliable nodes. Check their uptime and channel capacity.
  • Balanced channels: For routing, you want channels with funds on both sides.

Who to Connect To

For a new node, consider opening channels to:

  • Large routing nodes: ACINQ, Wallet of Satoshi, Kraken, etc. Good connectivity to the network.
  • Merchants you use: Direct channels to places you pay save routing fees.
  • Friends' nodes: Build a web of trust and help each other.
  • LSPs (Lightning Service Providers): They can open channels back to you, providing inbound liquidity.

Inbound vs. Outbound Liquidity

This is the most confusing concept for new Lightning users:

  • Outbound liquidity: Bitcoin on YOUR side of channels. You can send this much.
  • Inbound liquidity: Bitcoin on the OTHER side of channels. Others can send you this much.

When you open a channel, all the funds are on your side (outbound). You can send but not receive until you spend some or get inbound liquidity.

Getting Inbound Liquidity:

  • Spend Bitcoin: Every payment you make moves funds to the other side
  • Request incoming channels: Ask others to open channels TO you
  • Use liquidity services: Loop Out, Magma, LN+, Lightning Pool
  • Dual-funded channels: Both sides contribute (if supported)

Closing Channels

There are three types of channel closes:

  • Cooperative close: Both parties agree, settles quickly with low fees. Best case.
  • Force close: One party closes unilaterally. Funds locked for days (time-lock). Higher fees.
  • Breach close: Your node catches a cheating attempt. You claim all funds. Requires being online.

Avoid Force Closes

Force closes are expensive and lock your funds for days. They happen when:

  • Your peer is offline for too long
  • Software bugs or crashes
  • Network issues prevent communication

Keep your node online and updated. If you need to close, always try cooperative first.

Routing and Earning Fees

One benefit of running a Lightning node is the potential to earn sats by routing payments for others. But this requires active management.

How Routing Works

When someone sends a payment that doesn't have a direct channel, the payment "hops" through intermediate nodes. Each hop can charge a small fee.

To route payments, you need:

  • Channels with liquidity on both sides (balanced channels)
  • Good connectivity (channels to well-connected nodes)
  • Competitive fees (not too high or payments route around you)
  • High uptime (offline nodes can't route)

Setting Fees

Lightning fees have two components:

  • Base fee: Fixed fee per payment (e.g., 1 sat)
  • Fee rate: Percentage of payment (e.g., 0.0001% = 1 ppm)

Start with default fees and adjust based on your channel balance. Raise fees on channels that are draining; lower fees on channels that are filling up.

Routing Reality Check

Routing income is typically very small—a few hundred to a few thousand sats per month for hobbyist nodes. Don't expect to get rich. The real benefits are:

  • Learning how Lightning works deeply
  • Contributing to network decentralization
  • Having great connectivity for your own payments
  • The satisfaction of self-hosting

Automated Channel Management

Several tools can help manage channels automatically:

  • Balance of Satoshis (BOS): CLI tool for channel management, rebalancing, accounting
  • Ride The Lightning (RTL): Web UI for managing LND or CLN
  • ThunderHub: Another excellent web UI with analytics
  • LNDg: Advanced analytics and automation for LND
  • Charge-lnd: Automatic fee adjustment based on channel balance

Connecting Mobile Wallets

One of the best features of self-hosting is connecting your mobile wallet to your own node. This gives you the convenience of mobile payments with the sovereignty of your own infrastructure.

Zeus Wallet

Zeus is the most popular wallet for connecting to your own LND or CLN node.

  • Supports LND, CLN, and Eclair
  • Connects over Tor (no port forwarding needed)
  • Full node control from your phone
  • Can also run embedded node (Zeus 0.8+)

Setup: Generate a connection string from your node (Umbrel makes this easy), scan QR code in Zeus.

Zap Wallet

Clean interface, good for basic LND management.

  • LND only
  • Desktop and mobile apps
  • Simple and beginner-friendly

BlueWallet (LNDHub)

BlueWallet can connect to your own LNDHub instance, which acts as an account layer on top of LND. Good for sharing your node with family.

Phoenix (ACINQ)

Phoenix is non-custodial but uses ACINQ's LSP. For true self-hosting, use Zeus or run your own Eclair node that Phoenix connects to.

Connecting Over Tor

Most node packages expose your Lightning node as a Tor hidden service. This means:

  • No port forwarding required
  • Your home IP stays private
  • Works from anywhere with internet

Connections are slower over Tor but the privacy benefits are worth it.

Security Best Practices

Backup Strategy

  • Seed phrase: Back up your 24-word seed. This recovers on-chain funds but NOT channel state.
  • Static Channel Backup (SCB): Back up after every channel change. Enables force-close recovery.
  • channel.db: The full channel database. Can restore exact state but is tricky (risk of broadcasting old state).

Never Restore channel.db to Multiple Nodes

If you restore an old channel.db and broadcast an old state, your peer can claim all your funds as a "breach." Only use channel.db restoration as a last resort, and ensure the backup is the most recent state.

Watchtowers

Watchtowers monitor the blockchain on your behalf and can punish cheating attempts even when your node is offline. Essential if you can't maintain high uptime.

  • LND has built-in watchtower support (client and server)
  • The Eye of Satoshi (TEOS) is a popular watchtower implementation
  • Some services offer free watchtower hosting

Updates and Maintenance

  • Keep your node software updated (security fixes)
  • Monitor channel health (inactive peers, low liquidity)
  • Close zombie channels (inactive for 2+ weeks)
  • Watch for unusual activity (failed payments, force closes)

Interactive: Lightning Network Simulator

Practice channel management, routing, and HTLC mechanics in a safe simulation. Understand how payments flow through the network.

Launch Lightning Network Demo →

Key Takeaways: Lightning Self-Hosting

  • Self-hosted Lightning = true payment sovereignty. No one can see your payments, freeze your funds, or censor your transactions.
  • LND is the safest choice for most users. Best ecosystem, documentation, and mobile wallet support. CLN for advanced users.
  • Node packages (Umbrel, Start9) make setup easy. One-click Lightning deployment with a beautiful interface.
  • Understand inbound vs. outbound liquidity. You need both to send AND receive. New nodes start with only outbound.
  • Channel selection matters. Connect to reliable, well-connected nodes. Start with 2-3 channels of 500K-2M sats each.
  • Backup your seed AND your SCB. The seed alone doesn't recover channel funds. SCB enables force-close recovery.
  • Use watchtowers if uptime is uncertain. They protect against cheating while you're offline.
  • Connect mobile wallets to your node. Zeus lets you manage your Lightning from anywhere, connected to your own infrastructure.
  • Routing income is small but real. The bigger benefits are learning, privacy, and sovereignty.

Next: PayJoin and PayNym

Now that you can send instant private payments with Lightning, the next module covers advanced privacy techniques for on-chain transactions: PayJoin (BIP78) for breaking common input heuristics, and PayNym (BIP47) for reusable payment codes that don't leak address information.

⚡ Apply This Knowledge

Practice on a real Bitcoin test network — free coins, zero risk.

⚡ Try It Now

Make Your First Lightning Payment

Open Mutiny Wallet in your browser, switch to signet, create a Lightning invoice, receive instant sats from the faucet. Experience sub-second settlement firsthand.

Signet (free) Mutiny Wallet (browser) 15 min