PROVIDER - Self-Hosted Lightning Accounts

LNbits

LNbits is an open-source Lightning accounts system that splits one node into many wallets with extensions for checkout, tipping and ledgers, suited to self-hosted Bitcoin payments.

Crypto Payments & Digital Assets Czechia 2026.12.01 0 views
3.6pts
Advertisement

Service Overview

LNbits is an open-source Lightning Network accounts system: connected to a node or hosted gateway, it splits one balance into separate wallets, each with its own keys, API and limits, which suits collecting payments per project, store or client. An extension marketplace adds checkout pages, tipping, ledgers and automatic payouts as plugins.

The project is MIT licensed with roughly 1,200 stars on GitHub and a 1.7.x release line, written in Python and self-hostable as a container. Lightning transactions are broadcast by the node and pay routing fees, while LNbits itself only handles accounts and the API layer.

Key Strengths

  • One node splits into many wallets for per-project or per-store collection and reconciliation.
  • Extensions cover checkout pages, tipping, ledgers and automatic payouts.
  • A complete API with callbacks fits payment states into existing systems.
  • MIT licensing allows self-hosting, keeping accounts and keys on your own server.
  • Several funding sources are supported, so nodes and hosted gateways can be swapped.

Limitations

  • Self-hosting requires a working Lightning node and liquidity management, steeper than hosted checkout.
  • Extensions are community maintained, with uneven quality and maintenance cadence.
  • Built-in features centre on Lightning, so fiat conversion needs an external route.
  • Releases move quickly, and extensions may break across upgrades until checked.
  • Large single payments are capped by channel capacity and need planned liquidity.

Product Ecosystem

One funding source splits into several wallets, each with its own checkout and API Funding source Own node or gateway Wallet split Per project and store Checkout QR, links and API Credit Instant confirm, callback Extension points: checkout page · tipping · ledger · auto payout · vending and invoicing Funds land on the configured node or gateway while LNbits manages accounts and APIs (scope: official docs, 2026-12)
Figure 1: One funding source split into multiple wallets (scope: official documentation, 2026-12)

The structure is funding source, wallets and extensions: the source supplies liquidity and a settlement rail, wallets isolate balances per business line, and extensions decide what each wallet can do.

Funding Sources and Liquidity

A self-hosted node or a hosted gateway both work; the former keeps all keys but needs channel management, the latter removes operations but depends on a provider. Estimate average ticket size and daily volume before choosing, or failing payments follow.

Wallets and Accounts

Each wallet has its own keys and limits, and must be emptied before deletion. Multi-user instances can open registration with per-wallet caps to keep platform risk bounded.

Extensions and Checkout

The marketplace adds checkout pages, ledgers and auto payouts that appear on the instance once installed. Third-party extensions reach into account data, so review code and restrict permissions.

API and Reconciliation

The API creates invoices, reports status and fires callbacks, which suits e-commerce and finance systems. Callbacks should follow webhook signature verification with idempotent handling of duplicate notifications.

Use Cases

  • Good fit|Accepting small Bitcoin payments: Lightning confirms quickly at low fees.
  • Good fit|Teams splitting by project: several wallets under one instance reconcile separately.
  • Good fit|Organisations holding their own keys: a self-hosted node keeps funds with you.
  • Good fit|Developers adding payment flows: a clear API embeds into existing systems.
  • Evaluate first|Merchants needing fiat settlement: Lightning does not convert to fiat.
  • Evaluate first|Teams without node operations skills: channels and liquidity need an owner.
  • Evaluate first|Large single payments: channel capacity and routing success limit size.

Fee Structure & Revenue Share

Channel / Model Standard Fee or Share Access and Withdrawal Threshold Settlement and Extras
Self-hosted deployment Free software (MIT) A server with a container runtime No platform cut
Own Lightning node Routing cost only Node plus channel liquidity required Real time, routing fees typically under 0.1%
Hosted gateway Gateway rate card Hosted account with completed checks Follows the gateway settlement cycle
Extensions Free and open source Installed and maintained by the operator Third-party risk borne by the operator

LNbits takes no share of transactions; cost depends on the funding source's rate card and self-hosting effort.

FAQ

  • Who actually holds the money? The node or hosted gateway you configure. LNbits manages accounts, invoices and the API layer only. A self-hosted node keeps keys locally while a hosted gateway holds them, and switching sources does not migrate existing balances, so settle first.
  • Can a non-technical team use it? A hosted gateway lowers the operations burden, but the team still needs a grasp of wallets and keys. Running a node means owning channel management, liquidity and backups. Small teams are better off trialling a gateway before taking on node duties.
  • Why do payments fail? Usually insufficient channel capacity, no routing path or an offline node. Raise per-payment limits, add channels or fall back to a gateway. Failed invoices are not credited, so the front end should prompt a retry and log failure rates to reveal when capacity is the cause.
  • Do upgrades break extensions? Major versions can change extension interfaces, so validate key extensions on a test instance first. Pin versions in production and keep database backups. Where an extension is abandoned, a minimal replacement can be built on the API.

Integration and Code Examples

Creating an invoice and checking status

# Create an invoice with the wallet admin key
curl -X POST "https://lnbits.example.com/api/v1/payments" \
  -H "X-Api-Key: ${LNBITS_ADMIN_KEY}" \
  -H "Content-Type: application/json" \
  -d '{"out": false, "amount": 1000, "memo": "Order 2026-12-001"}'

# Check whether that invoice has been paid
curl -H "X-Api-Key: ${LNBITS_INVOICE_KEY}" \
  "https://lnbits.example.com/api/v1/payments/<payment_hash>"

Container deployment essentials

services:
  lnbits:
    image: lnbits/lnbits:latest
    environment:
      LNBITS_BACKEND_WALLET_CLASS: LndRestWallet
      LND_REST_ENDPOINT: https://lnd:8080
    volumes:
      - ./data:/app/data

Admin and invoice keys carry different powers, so only invoice keys belong in client code.

Community and Resources

Visit LNbits Website → https://lnbits.com/
Visit Website ↗