2020-05-04 17:20:36 +02:00
---
layout: default
title: Backend wallets
2020-09-03 19:53:22 +02:00
nav_order: 3
2020-05-04 17:20:36 +02:00
---
Backend wallets
===============
LNbits can run on top of many lightning-network funding sources. Currently there is support for
CLightning, LND, LNbits, LNPay, lntxbot and OpenNode, with more being added regularily.
A backend wallet can be configured using the following LNbits environment variables:
### CLightning
Using this wallet requires the installation of the `pylightning` Python package.
- `LNBITS_BACKEND_WALLET_CLASS` : **CLightningWallet**
- `CLIGHTNING_RPC` : /file/path/lightning-rpc
2020-08-29 12:23:01 -03: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 17:20:36 +02:00
### LND (gRPC)
2020-10-04 00:22:37 -03:00
Using this wallet requires the installation of the `lndgrpc` and `purerpc` Python packages.
2020-05-04 17:20:36 +02:00
- `LNBITS_BACKEND_WALLET_CLASS` : **LndWallet**
- `LND_GRPC_ENDPOINT` : ip_address
- `LND_GRPC_PORT` : port
2020-10-08 21:51:40 -03:00
- `LND_GRPC_CERT` : /file/path/tls.cert
- `LND_GRPC_MACAROON` : /file/path/admin.macaroon
2020-05-04 17:20:36 +02:00
### LND (REST)
- `LNBITS_BACKEND_WALLET_CLASS` : **LndRestWallet**
- `LND_REST_ENDPOINT` : ip_address
2020-10-08 21:51:40 -03:00
- `LND_REST_CERT` : /file/path/tls.cert
- `LND_GRPC_MACAROON` : /file/path/admin.macaroon
2020-05-04 17:20:36 +02:00
### LNbits
- `LNBITS_BACKEND_WALLET_CLASS` : **LNbitsWallet**
2020-09-03 19:53:22 +02:00
- `LNBITS_ENDPOINT` : e.g. https://lnbits.com
2020-10-08 21:51:40 -03:00
- `LNBITS_KEY` : lnbitsAdminKey
2020-05-04 17:20:36 +02:00
### LNPay
2021-04-11 16:05:21 -04: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.
2020-10-09 20:55:58 -03:00
2020-05-04 17:20:36 +02:00
- `LNBITS_BACKEND_WALLET_CLASS` : **LNPayWallet**
2021-04-11 16:05:21 -04:00
- `LNPAY_API_ENDPOINT` : https://api.lnpay.co/v1/
2020-10-08 21:51:40 -03:00
- `LNPAY_API_KEY` : sak_apiKey
- `LNPAY_WALLET_KEY` : waka_apiKey
2020-05-04 17:20:36 +02:00
### lntxbot
- `LNBITS_BACKEND_WALLET_CLASS` : **LntxbotWallet**
2020-09-03 19:53:22 +02:00
- `LNTXBOT_API_ENDPOINT` : https://lntxbot.bigsun.xyz/
2020-10-08 21:51:40 -03:00
- `LNTXBOT_KEY` : lntxbotAdminApiKey
2020-05-04 17:20:36 +02:00
### OpenNode
2020-10-09 20:55:58 -03: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 17:20:36 +02:00
- `LNBITS_BACKEND_WALLET_CLASS` : **OpenNodeWallet**
2020-09-03 19:53:22 +02:00
- `OPENNODE_API_ENDPOINT` : https://api.opennode.com/
2020-10-08 21:51:40 -03:00
- `OPENNODE_KEY` : opennodeAdminApiKey