2020-05-04 15:20:36 +00:00
---
layout: default
title: Backend wallets
2020-09-03 17:53:22 +00:00
nav_order: 3
2020-05-04 15:20:36 +00:00
---
Backend wallets
===============
2022-08-03 08:03:01 +00:00
LNbits can run on top of many lightning-network funding sources. Currently there is support for CoreLightning, LND, LNbits, LNPay, lntxbot and OpenNode, with more being added regularly.
2020-05-04 15:20:36 +00:00
A backend wallet can be configured using the following LNbits environment variables:
2022-08-01 14:41:50 +00:00
### CoreLightning
2020-05-04 15:20:36 +00:00
2022-08-01 14:41:50 +00:00
- `LNBITS_BACKEND_WALLET_CLASS` : **CoreLightningWallet**
- `CORELIGHTNING_RPC` : /file/path/lightning-rpc
2020-05-04 15:20:36 +00:00
2020-08-29 15:23:01 +00:00
### Spark (c-lightning)
- `LNBITS_BACKEND_WALLET_CLASS` : **SparkWallet**
- `SPARK_URL` : http://10.147.17.230:9737/rpc
- `SPARK_TOKEN` : secret_access_key
2020-05-04 15:20:36 +00:00
### LND (REST)
- `LNBITS_BACKEND_WALLET_CLASS` : **LndRestWallet**
2022-04-13 15:20:24 +00:00
- `LND_REST_ENDPOINT` : http://10.147.17.230:8080/
2020-10-09 00:51:40 +00:00
- `LND_REST_CERT` : /file/path/tls.cert
2022-02-14 16:54:05 +00:00
- `LND_REST_MACAROON` : /file/path/admin.macaroon or Bech64/Hex
or
2020-05-04 15:20:36 +00:00
2022-02-14 16:54:05 +00:00
- `LND_REST_MACAROON_ENCRYPTED` : eNcRyPtEdMaCaRoOn
2020-05-04 15:20:36 +00:00
2022-08-09 09:49:39 +00:00
### LND (gRPC)
- `LNBITS_BACKEND_WALLET_CLASS` : **LndWallet**
- `LND_GRPC_ENDPOINT` : ip_address
- `LND_GRPC_PORT` : port
- `LND_GRPC_CERT` : /file/path/tls.cert
- `LND_GRPC_MACAROON` : /file/path/admin.macaroon or Bech64/Hex
You can also use an AES-encrypted macaroon (more info) instead by using
- `LND_GRPC_MACAROON_ENCRYPTED` : eNcRyPtEdMaCaRoOn
To encrypt your macaroon, run `./venv/bin/python lnbits/wallets/macaroon/macaroon.py` .
2020-05-04 15:20:36 +00:00
### LNbits
- `LNBITS_BACKEND_WALLET_CLASS` : **LNbitsWallet**
2020-09-03 17:53:22 +00:00
- `LNBITS_ENDPOINT` : e.g. https://lnbits.com
2020-10-09 00:51:40 +00:00
- `LNBITS_KEY` : lnbitsAdminKey
2020-05-04 15:20:36 +00:00
### LNPay
2021-06-09 13:18:50 +00:00
For the invoice listener to work you have a publicly accessible URL in your LNbits and must set up [LNPay webhooks ](https://dashboard.lnpay.co/webhook/ ) pointing to `<your LNbits host>/wallet/webhook` with the "Wallet Receive" event and no secret. For example, `https://mylnbits/wallet/webhook` will be the Endpoint Url that gets notified about the payment.
2020-10-09 23:55:58 +00:00
2020-05-04 15:20:36 +00:00
- `LNBITS_BACKEND_WALLET_CLASS` : **LNPayWallet**
2021-04-11 20:05:21 +00:00
- `LNPAY_API_ENDPOINT` : https://api.lnpay.co/v1/
2020-10-09 00:51:40 +00:00
- `LNPAY_API_KEY` : sak_apiKey
- `LNPAY_WALLET_KEY` : waka_apiKey
2020-05-04 15:20:36 +00:00
### lntxbot
- `LNBITS_BACKEND_WALLET_CLASS` : **LntxbotWallet**
2021-11-12 06:05:59 +00:00
- `LNTXBOT_API_ENDPOINT` : https://lntxbot.com/
2020-10-09 00:51:40 +00:00
- `LNTXBOT_KEY` : lntxbotAdminApiKey
2020-05-04 15:20:36 +00:00
### OpenNode
2020-10-09 23:55:58 +00:00
For the invoice to work you must have a publicly accessible URL in your LNbits. No manual webhook setting is necessary.
2020-05-04 15:20:36 +00:00
- `LNBITS_BACKEND_WALLET_CLASS` : **OpenNodeWallet**
2020-09-03 17:53:22 +00:00
- `OPENNODE_API_ENDPOINT` : https://api.opennode.com/
2020-10-09 00:51:40 +00:00
- `OPENNODE_KEY` : opennodeAdminApiKey
2022-10-24 09:46:32 +00:00
### Cliche Wallet
- `CLICHE_ENDPOINT` : ws://127.0.0.1:12000