</a>
Backend wallets
LNbits is modular: You can switch the funding source (backend wallet) without changing anything else in your setup. Keep your extensions, apps, users, and config as-is — just point LNbits to a different backend via environment variables.
What stays the same when you switch backends
- Your LNbits setup and extensions
- Your API keys and endpoints
- Your server and deployment setup
A backend wallet is selected and configured entirely through LNbits environment variables. See the options and variables below, and compare them here: Funding-Source-Table.md
[!NOTE] Terminology: “Backend Wallet” and “Funding Source” mean the same thing — the wallet or service that funds your LNbits.
Funding Sources
Funding Sources
CLNRest (using runes)
Core Lightning REST API docs
Should also work with the Rust version of CLNRest
Environment variables
LNBITS_BACKEND_WALLET_CLASS:CLNRestWalletCLNREST_URL:https://127.0.0.1:3010CLNREST_CA:/home/lightningd/.lightning/bitcoin/ca.pem(or the content of the file)CLNREST_CERT:/home/lightningd/.lightning/bitcoin/server.pem(or the content of the file)CLNREST_LAST_PAY_INDEX:lightning-cli listinvoices | jq -r '.invoices | map(.created_index) | max'CLNREST_NODEID:lightning-cli getinfo | jq -r .id(only required for v23.08)
Create runes (copy/paste)
# Read-only: funds, pays, invoices, info, summary, and invoice listener
lightning-cli createrune \
restrictions='[["method=listfunds","method=listpays","method=listinvoices","method=getinfo","method=summary","method=waitanyinvoice"]]' \
| jq -r .rune
# Invoice: max 1,000,001 msat, label must start with "LNbits", 60 req/min
lightning-cli createrune \
restrictions='[["method=invoice"], ["pnameamount_msat<1000001"], ["pnamelabel^LNbits"], ["rate=60"]]' \
| jq -r .rune
# Pay: bolt11 amount < 1001 (msat), label must start with "LNbits", 1 req/min
lightning-cli createrune \
restrictions='[["method=pay"], ["pinvbolt11_amount<1001"], ["pnamelabel^LNbits"], ["rate=1"]]' \
| jq -r .rune
# Renepay: invstring amount < 1001 (msat), label must start with "LNbits", 1 req/min
lightning-cli createrune \
restrictions='[["method=renepay"], ["pinvinvstring_amount<1001"], ["pnamelabel^LNbits"], ["rate=1"]]' \
| jq -r .rune
Set the resulting values into:
CLNREST_READONLY_RUNECLNREST_INVOICE_RUNECLNREST_PAY_RUNECLNREST_RENEPAY_RUNE
CoreLightning
Required env vars
LNBITS_BACKEND_WALLET_CLASS:CoreLightningWalletCORELIGHTNING_RPC:/file/path/lightning-rpc
CoreLightning REST
Old REST interface using RTL c-lightning-REST
Required env vars
LNBITS_BACKEND_WALLET_CLASS:CoreLightningRestWalletCORELIGHTNING_REST_URL:http://127.0.0.1:8185/CORELIGHTNING_REST_MACAROON:/file/path/admin.macaroonor Base64/HexCORELIGHTNING_REST_CERT:/home/lightning/clnrest/tls.cert
Spark (Core Lightning)
Required env vars
LNBITS_BACKEND_WALLET_CLASS:SparkWalletSPARK_URL:http://10.147.17.230:9737/rpcSPARK_TOKEN:secret_access_key
LND (REST)
Required env vars
LNBITS_BACKEND_WALLET_CLASS:LndRestWalletLND_REST_ENDPOINT:http://10.147.17.230:8080/LND_REST_CERT:/file/path/tls.certLND_REST_MACAROON:/file/path/admin.macaroonor Base64/Hex
or:
LND_REST_MACAROON_ENCRYPTED:eNcRyPtEdMaCaRoOn
LND (gRPC)
Required env vars
LNBITS_BACKEND_WALLET_CLASS:LndWalletLND_GRPC_ENDPOINT:ip_addressLND_GRPC_PORT:portLND_GRPC_CERT:/file/path/tls.certLND_GRPC_MACAROON:/file/path/admin.macaroonor Base64/Hex
You can also use an AES-encrypted macaroon instead:
LND_GRPC_MACAROON_ENCRYPTED:eNcRyPtEdMaCaRoOn
To encrypt your macaroon:
uv run lnbits-cli encrypt macaroon
LNbits
Required env vars
LNBITS_BACKEND_WALLET_CLASS:LNbitsWalletLNBITS_ENDPOINT: for examplehttps://lnbits.comLNBITS_KEY:lnbitsAdminKey
LNPay
For the invoice listener to work you must have a publicly accessible URL in your LNbits and set up LNPay webhooks pointing to <your LNbits host>/wallet/webhook with the event Wallet Receive and no secret. Example: https://mylnbits/wallet/webhook.
Required env vars
LNBITS_BACKEND_WALLET_CLASS:LNPayWalletLNPAY_API_ENDPOINT:https://api.lnpay.co/v1/LNPAY_API_KEY:sak_apiKeyLNPAY_WALLET_KEY:waka_apiKey
OpenNode
For the invoice to work you must have a publicly accessible URL in your LNbits. No manual webhook configuration required.
Required env vars
LNBITS_BACKEND_WALLET_CLASS:OpenNodeWalletOPENNODE_API_ENDPOINT:https://api.opennode.com/OPENNODE_KEY:opennodeAdminApiKey
Blink
For the invoice to work you must have a publicly accessible URL in your LNbits. No manual webhook configuration required.
You can generate a Blink API key at https://dashboard.blink.sv. More info: https://dev.blink.sv/api/auth#create-an-api-key
Required env vars
LNBITS_BACKEND_WALLET_CLASS:BlinkWalletBLINK_API_ENDPOINT:https://api.blink.sv/graphqlBLINK_WS_ENDPOINT:wss://ws.blink.sv/graphqlBLINK_TOKEN:BlinkToken
Alby
For the invoice to work you must have a publicly accessible URL in your LNbits. No manual webhook configuration required.
Generate an Alby access token here: https://getalby.com/developer/access_tokens/new
Required env vars
LNBITS_BACKEND_WALLET_CLASS:AlbyWalletALBY_API_ENDPOINT:https://api.getalby.com/ALBY_ACCESS_TOKEN:AlbyAccessToken
Boltz
This connects to a running boltz-client and handles Lightning payments through submarine swaps on the Liquid network.
You can run the daemon in standalone mode via standalone = True in the config or boltzd --standalone. Create a Liquid wallet with:
boltzcli wallet create lnbits lbtc
Required env vars
LNBITS_BACKEND_WALLET_CLASS:BoltzWalletBOLTZ_CLIENT_ENDPOINT:127.0.0.1:9002BOLTZ_CLIENT_MACAROON:/home/bob/.boltz/macaroons/admin.macaroonor Base64/HexBOLTZ_CLIENT_CERT:/home/bob/.boltz/tls.certor Base64/HexBOLTZ_CLIENT_WALLET:lnbits
ZBD
For the invoice to work you must have a publicly accessible URL in your LNbits. No manual webhook configuration required.
Generate a ZBD API key here: https://zbd.dev/docs/dashboard/projects/api
Required env vars
LNBITS_BACKEND_WALLET_CLASS:ZBDWalletZBD_API_ENDPOINT:https://api.zebedee.io/v0/ZBD_API_KEY:ZBDApiKey
Phoenixd
For the invoice to work you must have a publicly accessible URL in your LNbits.
You can get a phoenixd API key from ~/.phoenix/phoenix.conf. See the phoenixd documentation for details.
Required env vars
LNBITS_BACKEND_WALLET_CLASS:PhoenixdWalletPHOENIXD_API_ENDPOINT:http://localhost:9740/PHOENIXD_API_PASSWORD:PhoenixdApiPassword
Eclair (ACINQ)
Connect to an existing Eclair node so your backend handles invoices and payments.
Required env vars
LNBITS_BACKEND_WALLET_CLASS:EclairWalletECLAIR_URL:http://127.0.0.1:8283ECLAIR_PASSWORD:eclairpw
Fake Wallet
A testing-only backend that mints accounting units inside LNbits accounting (no real sats).
Required env vars
LNBITS_BACKEND_WALLET_CLASS:FakeWalletFAKE_SECRET:ToTheMoon1FAKE_UNIT:sats
LN.tips
As the initinal LN.tips bot is no longer active the code still exists and is widly used. Connect one of custodial services as your backend to create and pay Lightning invoices through their API or selfhost this service and run it as funding source. Resources: https://github.com/massmux/SatsMobiBot
Required env vars
LNBITS_BACKEND_WALLET_CLASS:LNTipsWalletLNTIPS_API_ENDPOINT:https://ln.tipsLNTIPS_API_KEY:LNTIPS_ADMIN_KEY
Breez SDK
A Greenlight invite code or Greenlight partner certificate/key can register a new node with Greenlight. If the Greenlight node already exists, neither is required.
Required env vars
LNBITS_BACKEND_WALLET_CLASS:BreezSdkWalletBREEZ_API_KEY:...BREEZ_GREENLIGHT_SEED:...BREEZ_GREENLIGHT_INVITE_CODE:...BREEZ_GREENLIGHT_DEVICE_KEY:/path/to/breezsdk/device.pemor Base64/HexBREEZ_GREENLIGHT_DEVICE_CERT:/path/to/breezsdk/device.crtor Base64/Hex
Breez Liquid SDK
This uses the Breez SDK - Liquid to manage Lightning payments via submarine swaps on the Liquid network. Provide a mnemonic seed phrase (for example, generate one with a Liquid wallet like Blockstream Green) and set it in the environment or admin UI.
Required env vars
LNBITS_BACKEND_WALLET_CLASS:BreezLiquidSdkWalletBREEZ_LIQUID_SEED:...
Fees apply for each submarine swap. You may need to increase the reserve fee under Settings → Funding or via:
LNBITS_RESERVE_FEE_MIN:...LNBITS_RESERVE_FEE_PERCENT:...
Cliche Wallet
Required env vars
CLICHE_ENDPOINT:ws://127.0.0.1:12000
Nostr Wallet Connect (NWC)
To use NWC as a funding source you need a pairing URL (pairing secret) from an NWC provider. See providers here: https://github.com/getAlby/awesome-nwc?tab=readme-ov-file#nwc-wallets
Configure in the admin UI or via env vars:
LNBITS_BACKEND_WALLET_CLASS:NWCWalletNWC_PAIRING_URL:nostr+walletconnect://...your...pairing...secret...
Strike (alpha)
Custodial provider integrated via Strike OAuth Connect (OAuth 2.0 / OIDC). Authenticate a Strike user in your app, then call Strike APIs on the user’s behalf once scopes are granted. Requires a Strike business account, registered OAuth client, minimal scopes, and login/logout redirect URLs.
Get more info here https://docs.strike.me/strike-oauth-connect/
Integration endpoints
STRIKE_API_ENDPOINT:https://api.strike.me/v1STRIKE_API_KEY:YOUR_STRIKE_API_KEY
Additional Guides
- Admin UI — Manage server settings via a clean UI (avoid editing
.envby hand). - User Roles — Quick Overview of existing Roles in LNBits.
- Funding sources — What’s available and how to enable/configure each.
Powered by LNbits
LNbits empowers everyone with modular, open-source tools for building Bitcoin-based systems — fast, free, and extendable.
If you like this project, send some tip love or visit our Shop
