Skip to main content

LNbits

Free and open-source Lightning wallet. Modular, extensible, and self-hostable.

Overview

LNbits is a Lightning Network wallet system that can run on top of any Lightning funding source. It provides a simple interface and powerful extensions for building Lightning-powered applications.

Key Features

Multi-Wallet System

┌─────────────────────────────────────────────────────────┐
│ LNbits │
├─────────────────────────────────────────────────────────┤
│ │
│ Funding Source (your node or custodial): │
│ └── Total: 1,000,000 sats │
│ │
│ Your Wallets: │
│ ├── 💼 Business 500,000 sats │
│ ├── 👤 Personal 300,000 sats │
│ └── 🎮 Gaming 200,000 sats │
│ │
│ Each wallet has its own API keys │
│ │
└─────────────────────────────────────────────────────────┘

Extension Marketplace

ExtensionPurpose
Bolt CardsNFC payment cards
LNURLpReceive payments
SatsPayPayment pages
Nostr MarketNIP-15 marketplace
TPoSPoint of sale
EventsTicketing
CashuEcash mints

Funding Sources

SourceType
LNDSelf-custodial
CLNSelf-custodial
AlbyCustodial
LNPayCustodial
OpenNodeCustodial

Self-Hosting

Docker

version: '3'
services:
lnbits:
image: lnbitsdocker/lnbits:latest
ports:
- "5000:5000"
environment:
LNBITS_BACKEND_WALLET_CLASS: LndWallet
LND_GRPC_ENDPOINT: lnd:10009
volumes:
- ./data:/app/data

Funding Source Config

# For LND
LNBITS_BACKEND_WALLET_CLASS=LndWallet
LND_GRPC_ENDPOINT=127.0.0.1:10009
LND_GRPC_CERT=/path/to/tls.cert
LND_GRPC_MACAROON=/path/to/admin.macaroon

API

# Get wallet balance
curl -H "X-Api-Key: your-admin-key" \
https://lnbits.example.com/api/v1/wallet

# Create invoice
curl -X POST \
-H "X-Api-Key: your-invoice-key" \
-d '{"amount": 1000, "memo": "test"}' \
https://lnbits.example.com/api/v1/payments

Nostr Integration

Extensions for Nostr:

  • Nostr Market — NIP-15 marketplace
  • Nostr Relay — Host a relay
  • NWC — Nostr Wallet Connect

See Also