docs: update admin ui readme.md (#3402)
Co-authored-by: Dein Name <deine.email@example.com> Co-authored-by: Arc <33088785+arcbtc@users.noreply.github.com>
This commit is contained in:
parent
2b1b5cadaa
commit
25c8dd18e0
7 changed files with 1165 additions and 397 deletions
61
README.md
61
README.md
|
|
@ -1,39 +1,46 @@
|
||||||
<picture >
|
<a href="https://lnbits.com" target="_blank" rel="noopener noreferrer">
|
||||||
<source media="(prefers-color-scheme: dark)" srcset="https://i.imgur.com/QE6SIrs.png" style="width:300px">
|
<picture>
|
||||||
<img src="https://i.imgur.com/fyKPgVT.png" style="width:300px">
|
<source media="(prefers-color-scheme: dark)" srcset="https://i.imgur.com/QE6SIrs.png">
|
||||||
</picture>
|
<img src="https://i.imgur.com/fyKPgVT.png" alt="LNbits" style="width:300px">
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
|
||||||
 [![license-badge]](LICENSE) [![docs-badge]][docs]  [<img src="https://img.shields.io/badge/community_chat-Telegram-24A1DE">](https://t.me/lnbits) [<img src="https://img.shields.io/badge/supported_by-%3E__OpenSats-f97316">](https://opensats.org)
|
 [![license-badge]](LICENSE) [![docs-badge]][docs]  [](https://extensions.lnbits.com/) [](https://shop.lnbits.com/) [<img src="https://img.shields.io/badge/community_chat-Telegram-24A1DE">](https://t.me/lnbits) [<img src="https://img.shields.io/badge/supported_by-%3E__OpenSats-f97316">](https://opensats.org)
|
||||||

|
<img width="2000" height="203" alt="lnbits_head" src="https://github.com/user-attachments/assets/77669718-ac10-43c7-ae95-6ce236c77401" />
|
||||||
|
|
||||||
# The world's most powerful suite of bitcoin tools.
|
# LNbits — The most powerful Bitcoin & Lightning toolkit
|
||||||
|
|
||||||
## Run for yourself, for others, or as part of a stack.
|
> Run it for yourself, for your community, or as part of a larger stack.
|
||||||
|
|
||||||
LNbits is beta, for responsible disclosure of any concerns please contact an admin in the community chat.
|
## What is LNbits?
|
||||||
|
|
||||||
LNbits is a Python server that sits on top of any funding source. It can be used as:
|
LNbits is a lightweight Python server that sits on top of your Lightning funding source. It gives you safe, isolated wallets, a clean API, and an extension system for rapidly adding features - without locking you into a single node implementation. The Inspiration for LNBits came from ideas pioneered by **OpenNode** and **LNPay** — both today work as funding sources for LNbits.
|
||||||
|
|
||||||
- Accounts system to mitigate the risk of exposing applications to your full balance via unique API keys for each wallet
|
## What you can do with LNbits
|
||||||
- Extendable platform for exploring Lightning network functionality via the LNbits extension framework
|
|
||||||
- Part of a development stack via LNbits API
|
|
||||||
- Fallback wallet for the LNURL scheme
|
|
||||||
- Instant wallet for LN demonstrations
|
|
||||||
|
|
||||||
LNbits can run on top of almost all Lightning funding sources.
|
- **Harden app security:** Create per-wallet API keys so individual apps never touch your full balance.
|
||||||
|
- **Extend functionality fast:** Install extensions to explore and ship Lightning features with minimal code.
|
||||||
|
- **Build into your stack:** Use the LNbits HTTP API to integrate payments, wallets, and accounting.
|
||||||
|
- **Cover LNURL flows:** Use LNbits as a reliable fallback wallet for LNURL.
|
||||||
|
- **Demo in minutes:** Spin up instant wallets for workshops, proofs-of-concept, and user testing.
|
||||||
|
|
||||||
See [LNbits manual](https://docs.lnbits.org/guide/wallets.html) for more detailed documentation about each funding source.
|
## Funding sources
|
||||||
|
|
||||||
Checkout the LNbits [YouTube](https://www.youtube.com/playlist?list=PLPj3KCksGbSYG0ciIQUWJru1dWstPHshe) video series.
|
LNbits runs on top of most Lightning backends. Choose the one you already operate - or swap later without changing your app architecture.
|
||||||
|
|
||||||
LNbits is inspired by all the great work of [opennode.com](https://www.opennode.com/), and in particular [lnpay.co](https://lnpay.co/). Both work as funding sources for LNbits.
|
- Read the [funding source guide](https://docs.lnbits.org/guide/wallets.html)
|
||||||
|
|
||||||
|
## Learn more
|
||||||
|
|
||||||
|
- Video series on [Youtube](https://www.youtube.com/@lnbits)
|
||||||
|
- Introduction Video [LNBits V1](https://www.youtube.com/watch?v=PFAHKxvgI9Y&t=19s)
|
||||||
|
|
||||||
## Running LNbits
|
## Running LNbits
|
||||||
|
|
||||||
Test on our demo server [demo.lnbits.com](https://demo.lnbits.com), or on [lnbits.com](https://lnbits.com) software as a service, where you can spin up an LNbits instance for 21sats per hr.
|
|
||||||
|
|
||||||
See the [install guide](https://github.com/lnbits/lnbits/blob/main/docs/guide/installation.md) for details on installation and setup.
|
See the [install guide](https://github.com/lnbits/lnbits/blob/main/docs/guide/installation.md) for details on installation and setup.
|
||||||
|
|
||||||
|
Get yourself familiar and test on our demo server [demo.lnbits.com](https://demo.lnbits.com), or on [lnbits.com](https://lnbits.com) software as a service, where you can spin up an LNbits instance for 21sats per hr.
|
||||||
|
|
||||||
## LNbits account system
|
## LNbits account system
|
||||||
|
|
||||||
LNbits is packaged with tools to help manage funds, such as a table of transactions, line chart of spending, export to csv. Each wallet also comes with its own API keys, to help partition the exposure of your funding source.
|
LNbits is packaged with tools to help manage funds, such as a table of transactions, line chart of spending, export to csv. Each wallet also comes with its own API keys, to help partition the exposure of your funding source.
|
||||||
|
|
@ -66,9 +73,17 @@ As well as working great in a browser, LNbits has native IoS and Android apps as
|
||||||
|
|
||||||
<img src="https://i.imgur.com/J96EbRf.png" style="width:800px">
|
<img src="https://i.imgur.com/J96EbRf.png" style="width:800px">
|
||||||
|
|
||||||
## Tip us
|
## Powered by LNbits
|
||||||
|
|
||||||
If you like this project [send some tip love](https://demo.lnbits.com/lnurlp/link/fH59GD)!
|
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](https://demo.lnbits.com/tipjar/DwaUiE4kBX6mUW6pj3X5Kg) or visit our [Shop](https://shop.lnbits.de)
|
||||||
|
|
||||||
|
[](https://shop.lnbits.com/)
|
||||||
|
[](https://shop.lnbits.com/)
|
||||||
|
[](https://my.lnbits.com/login)
|
||||||
|
[](https://news.lnbits.com/)
|
||||||
|
[](https://extensions.lnbits.com/)
|
||||||
|
|
||||||
[docs]: https://github.com/lnbits/lnbits/wiki
|
[docs]: https://github.com/lnbits/lnbits/wiki
|
||||||
[docs-badge]: https://img.shields.io/badge/docs-lnbits.org-673ab7.svg
|
[docs-badge]: https://img.shields.io/badge/docs-lnbits.org-673ab7.svg
|
||||||
|
|
|
||||||
|
|
@ -1,78 +1,122 @@
|
||||||
---
|
<a href="https://lnbits.com" target="_blank" rel="noopener noreferrer">
|
||||||
layout: default
|
<picture>
|
||||||
title: Admin UI
|
<source media="(prefers-color-scheme: dark)" srcset="https://i.imgur.com/QE6SIrs.png">
|
||||||
nav_order: 4
|
<img src="https://i.imgur.com/fyKPgVT.png" alt="LNbits" style="width:300px">
|
||||||
---
|
</picture>
|
||||||
|
</a>
|
||||||
|
|
||||||
# Admin UI
|

|
||||||
|

|
||||||
|
[<img src="https://img.shields.io/badge/community_chat-Telegram-24A1DE">](https://t.me/lnbits)
|
||||||
|
[<img src="https://img.shields.io/badge/supported_by-%3E__OpenSats-f97316">](https://opensats.org)
|
||||||
|
|
||||||
The LNbits Admin UI lets you change LNbits settings via the LNbits frontend.
|
# LNBits Admin UI
|
||||||
It is disabled by default and the first time you set the environment variable `LNBITS_ADMIN_UI=true`
|
|
||||||
the settings are initialized and saved to the database and will be used from there as long the UI is enabled.
|
|
||||||
From there on the settings from the database are used.
|
|
||||||
|
|
||||||
# Super User
|
We introduced the Admin UI as the new default to make setup simpler and more straightforward. Instead of hand editing the `.env` file, you configure key server settings directly in the frontend with clear labels and guardrails.
|
||||||
|
|
||||||
With the Admin UI we introduced the super user, it is created with the initialisation of the Admin UI and will be shown with a success message in the server logs.
|
<ins>On a fresh install the Admin UI is enabled by default</ins>, and at first launch you are prompted to create **Super User** credentials so that sensitive operations, such as switching funding sources, remain in trusted hands. When the Admin UI is enabled, configuration is written to and read from the database; for all settings managed by the UI, the parameters in `.env` are largely no longer used. If you disable the Admin UI, the `.env` file becomes the single source of truth again.
|
||||||
The super user has access to the server and can change settings that may crash the server and make it unresponsive via the frontend and api, like changing funding sources.
|
|
||||||
|
|
||||||
Also only the super user can brrrr satoshis to different wallets.
|
For privileged actions and role details see **[Super User](./super_user.md)** & [User Roles](./user_roles.md)
|
||||||
|
For a complete reference of legacy variables consult **[.env.example](../../.env.example)**.
|
||||||
|
|
||||||
The super user is only stored inside the settings table of the database and after the settings are "reset to defaults" and a restart happened,
|
<img width="900" height="640" alt="grafik" src="https://github.com/user-attachments/assets/d8852b4b-21be-446f-a1e7-d3eb794d3505" />
|
||||||
a new super user is created.
|
|
||||||
|
|
||||||
The super user is never sent over the api and the frontend only receives a bool if you are super user or not.
|
> [!WARNING]
|
||||||
|
> Some settings remain `.env` only. Use **[.env.example](../../.env.example#L3-L87)** as the authoritative reference for those variables.
|
||||||
|
|
||||||
We also added a decorator for the API routes to check for super user.
|
## What you can do with the Admin UI
|
||||||
|
|
||||||
There is also the possibility of posting the super user via webhook to another service when it is created. you can look it up here https://github.com/lnbits/lnbits/blob/main/lnbits/settings.py `class SaaSSettings`
|
- Switch funding sources and other server level settings
|
||||||
|
- Manage who can access LNbits (**[Allowed Users](#allowed-users)**)
|
||||||
|
- Promote or demote Admin Users
|
||||||
|
- Gate extensions to Admins only or disable them globally
|
||||||
|
- Adjust balances with credit or debit
|
||||||
|
- Adjust site customization
|
||||||
|
|
||||||
# Admin Users
|
> [!NOTE]
|
||||||
|
> See **[Super User](./super_user.md)** for the role and permission differences compared to Admin Users.
|
||||||
|
|
||||||
environment variable: `LNBITS_ADMIN_USERS`, comma-separated list of user ids
|
## Enabling or disabling the Admin UI
|
||||||
Admin Users can change settings in the admin ui as well, with the exception of funding source settings, because they require e server restart and could potentially make the server inaccessible. Also they have access to all the extension defined in `LNBITS_ADMIN_EXTENSIONS`.
|
|
||||||
|
|
||||||
# Allowed Users
|
The Admin UI is enabled by default on new installs. To change the state:
|
||||||
|
|
||||||
environment variable: `LNBITS_ALLOWED_USERS`, comma-separated list of user ids
|
1. Stop LNbits
|
||||||
By defining this users, LNbits will no longer be usable by the public, only defined users and admins can then access the LNbits frontend.
|
|
||||||
|
|
||||||
Setting this environment variable also disables account creation.
|
```bash
|
||||||
Account creation can be also disabled by setting `LNBITS_ALLOW_NEW_ACCOUNTS=false`
|
sudo systemctl stop lnbits.service
|
||||||
|
```
|
||||||
|
|
||||||
# How to activate
|
2. Edit your `.env`
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo systemctl stop lnbits.service
|
cd ~/lnbits
|
||||||
$ cd ~/lnbits
|
sudo nano .env
|
||||||
$ sudo nano .env
|
```
|
||||||
```
|
|
||||||
|
|
||||||
-> set: `LNBITS_ADMIN_UI=true`
|
3. Set one of
|
||||||
|
|
||||||
Now start LNbits once in the terminal window
|
```
|
||||||
|
# Enable Admin UI
|
||||||
|
LNBITS_ADMIN_UI=true
|
||||||
|
|
||||||
```
|
# Disable Admin UI
|
||||||
$ uv run lnbits
|
LNBITS_ADMIN_UI=false
|
||||||
```
|
```
|
||||||
|
|
||||||
You can now `cat` the Super User ID:
|
4. Start LNbits
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cat data/.super_user
|
sudo systemctl start lnbits.service
|
||||||
|
```
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> With the Admin UI enabled, config is DB-backed and UI-managed settings ignore .env. Disable it to revert to [.env](../../.env.example) as the single source of truth.
|
||||||
|
|
||||||
|
## Reset to defaults
|
||||||
|
|
||||||
|
Using `Reset to defaults` in the Admin UI wipes stored settings. After a restart, a new `Super User` is created and the old one is no longer valid.
|
||||||
|
|
||||||
|
## First run and Super User ID
|
||||||
|
|
||||||
|
On first start with the Admin UI enabled you will be prompted to generate a Super User. If you need to read it from disk later:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cat /lnbits/data/.super_user
|
||||||
|
# example
|
||||||
123de4bfdddddbbeb48c8bc8382fe123
|
123de4bfdddddbbeb48c8bc8382fe123
|
||||||
```
|
```
|
||||||
|
|
||||||
You can access your super user account at `/wallet?usr=super_user_id`. You just have to append it to your normal LNbits web domain.
|
> [!WARNING]
|
||||||
|
> For security reasons, Super Users and Admin users must authenticate with credentials (username and password).
|
||||||
|
|
||||||
After that you will find the **`Admin` / `Manage Server`** between `Wallets` and `Extensions`
|
After login you will see **Settings** and **Users** in the sidebar between **Wallets** and **Extensions**, plus a role badge in the top left.
|
||||||
|
|
||||||
Here you can design the interface, it has credit/debit to change wallets balances and you can restrict access rights to extensions only for admins or generally deactivated for everyone. You can make users admins or set up Allowed Users if you want to restrict access. And of course the classic settings of the .env file, e.g. to change the funding source wallet or set a charge fee.
|
<img width="1353" height="914" alt="grafik" src="https://github.com/user-attachments/assets/06bb4f36-a23a-4058-87ec-60440d322c25" />
|
||||||
|
|
||||||
Do not forget
|
## Allowed Users
|
||||||
|
|
||||||
```
|
When set **at least one**, LNbits becomes private: only the listed users and Admins can access the frontend. Account creation is disabled automatically. You can also disable account creation explicitly.
|
||||||
sudo systemctl start lnbits.service
|
|
||||||
```
|
|
||||||
|
|
||||||
A little hint, if you set `RESET TO DEFAULTS`, then a new Super User Account will also be created. The old one is then no longer valid.
|
<img width="1889" height="870" alt="grafik" src="https://github.com/user-attachments/assets/89011b75-a267-44ea-971a-1517968b7af5" />
|
||||||
|
|
||||||
|
> [!WARNING]
|
||||||
|
> Assign your own account first when enabling **Allowed Users** to avoid locking yourself out. If you do get locked out, use your Super User to recover access.
|
||||||
|
|
||||||
|
## Additional Guides
|
||||||
|
|
||||||
|
- **[Backend Wallets](./wallets.md)** — Explore options to fund your LNbits instance.
|
||||||
|
- **[User Roles](./User_Roles.md)** — Overview of existing roles in LNbits.
|
||||||
|
- **[Funding sources](./funding-sources_table.md)** — What is available and how to configure each.
|
||||||
|
- **[Install LNBits](./installation.md)** — Choose your prefared way to install LNBits.
|
||||||
|
|
||||||
|
## 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](https://demo.lnbits.com/tipjar/DwaUiE4kBX6mUW6pj3X5Kg) or visit our [Shop](https://shop.lnbits.de)
|
||||||
|
|
||||||
|
[](https://shop.lnbits.com/)
|
||||||
|
[](https://shop.lnbits.com/)
|
||||||
|
[](https://my.lnbits.com/login)
|
||||||
|
[](https://news.lnbits.com/)
|
||||||
|
[](https://extensions.lnbits.com/)
|
||||||
|
|
|
||||||
|
|
@ -1,30 +1,79 @@
|
||||||
# LNbits Funding Sources Comparison Table
|
<a href="https://lnbits.com" target="_blank" rel="noopener noreferrer">
|
||||||
|
<picture>
|
||||||
|
<source media="(prefers-color-scheme: dark)" srcset="https://i.imgur.com/QE6SIrs.png">
|
||||||
|
<img src="https://i.imgur.com/fyKPgVT.png" alt="LNbits" style="width:300px">
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
|
||||||
LNbits can use a number of different Lightning Network funding source.
|

|
||||||
|

|
||||||
|
[<img src="https://img.shields.io/badge/community_chat-Telegram-24A1DE">](https://t.me/lnbits)
|
||||||
|
[<img src="https://img.shields.io/badge/supported_by-%3E__OpenSats-f97316">](https://opensats.org)
|
||||||
|
|
||||||
There may be trade-offs between the funding sources used, for example funding LNbits using Strike requires the user to KYC themselves and has some
|
# Backend Wallet Comparison Table
|
||||||
privacy compromises versus running your own LND node. However the technical barrier to entry of using Strike is lower than using LND.
|
|
||||||
|
|
||||||
The table below offers a comparison of the different Lightning Network funding sources that can be used with LNbits.
|
LNbits lets you choose **how your wallets are funded** — from fully self-custodial nodes to simple hosted services. You can switch the funding source **without touching your apps, users, or extensions**. That means you can start fast, learn, and later upgrade to more control and privacy when you are ready.
|
||||||
|
|
||||||
|
**Why this matters**
|
||||||
|
|
||||||
|
- **Flexibility:** Pick the backend that fits your skills and constraints today, change it later with minimal friction.
|
||||||
|
- **Speed to ship:** Use a hosted option to get live quickly; move to a node when you need more control.
|
||||||
|
- **Scalability:** Match cost and maintenance to your stage — from hobby to production.
|
||||||
|
- **Privacy and compliance:** Choose between self-custody and provider-managed options depending on your requirements.
|
||||||
|
|
||||||
|
Below is a side-by-side comparison of Lightning funding sources you can use with LNbits.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> “Backend Wallet” and “Funding Source” mean the same thing — the wallet or service that funds your LNbits.
|
||||||
|
|
||||||
## LNbits Lightning Network Funding Sources Comparison Table
|
## LNbits Lightning Network Funding Sources Comparison Table
|
||||||
|
|
||||||
| **Funding Source** | **Custodial Type** | **KYC Required** | **Technical Knowledge Needed** | **Node Hosting Required** | **Privacy Level** | **Liquidity Management** | **Ease of Setup** | **Maintenance Effort** | **Cost Implications** | **Scalability** | **Notes** |
|
| **Funding Source** | **Custodial Type** | **KYC Required** | **Technical Knowledge Needed** | **Node Hosting Required** | **Privacy Level** | **Liquidity Management** | **Ease of Setup** | **Maintenance Effort** | **Cost Implications** | **Scalability** | **Notes** |
|
||||||
| -------------------------- | ------------------ | ------------------- | ------------------------------ | ------------------------- | ----------------- | ------------------------ | ----------------- | ---------------------- | -------------------------------------------- | --------------- | ---------------------------------------------------------------- |
|
| ------------------------------ | ------------------------ | ------------------- | ------------------------------ | ------------------------- | ----------------- | ------------------------ | ----------------- | ---------------------- | -------------------------------------------- | --------------- | ------------------------------------------------------------------------------------------ |
|
||||||
| LND (gRPC) | Self-custodial | ❌ | Higher | ✅ | High | Manual | Moderate | High | Infrastructure cost and channel opening fees | High | gRPC interface for LND; suitable for advanced integrations. |
|
| **LND (gRPC)** | Self-custodial | ❌ | Higher | ✅ | High | Manual | Moderate | High | Infrastructure cost and channel opening fees | High | gRPC interface for LND; suitable for advanced integrations. |
|
||||||
| CoreLightning (CLN) | Self-custodial | ❌ | Higher | ✅ | High | Manual | Moderate | High | Infrastructure cost and channel opening fees | High | Requires setting up and managing your own CLN node. |
|
| **CoreLightning (CLN)** | Self-custodial | ❌ | Higher | ✅ | High | Manual | Moderate | High | Infrastructure cost and channel opening fees | High | Requires setting up and managing your own CLN node. |
|
||||||
| Phoenixd | Self-custodial | ❌ | Medium | ❌ | Medium | Automatic | Moderate | Low | Minimal fees | Medium | Mobile wallet backend; suitable for mobile integrations. |
|
| **Phoenixd** | Self-custodial | ❌ | Medium | ❌ | Medium | Automatic | Moderate | Low | Minimal fees | Medium | Mobile wallet backend; suitable for mobile integrations. |
|
||||||
| Nostr Wallet Connect (NWC) | Custodial | Depends on provider | Low | ❌ | Variable | Provider-managed | Easy | Low | May incur fees | Medium | Connects via Nostr protocol; depends on provider's policies. |
|
| **Nostr Wallet Connect (NWC)** | Custodial | Depends on provider | Low | ❌ | Variable | Provider-managed | Easy | Low | May incur fees | Medium | Connects via Nostr protocol; depends on provider's policies. |
|
||||||
| Boltz | Self-custodial | ❌ | Medium | ❌ | Medium | Provider-managed | Moderate | Moderate | Minimal fees | Medium | Uses submarine swaps; connects to Boltz client. |
|
| **Boltz** | Self-custodial | ❌ | Medium | ❌ | Medium | Provider-managed | Moderate | Moderate | Minimal fees | Medium | Uses submarine swaps; connects to Boltz client. |
|
||||||
| LND (REST) | Self-custodial | ❌ | Higher | ✅ | High | Manual | Moderate | High | Infrastructure cost and channel opening fees | High | REST interface for LND; suitable for web integrations. |
|
| **LND (REST)** | Self-custodial | ❌ | Higher | ✅ | High | Manual | Moderate | High | Infrastructure cost and channel opening fees | High | REST interface for LND; suitable for web integrations. |
|
||||||
| CoreLightning REST | Self-custodial | ❌ | Higher | ✅ | High | Manual | Moderate | High | Infrastructure cost and channel opening fees | High | REST interface for CLN; suitable for web integrations. |
|
| **CoreLightning REST** | Self-custodial | ❌ | Higher | ✅ | High | Manual | Moderate | High | Infrastructure cost and channel opening fees | High | REST interface for CLN; suitable for web integrations. |
|
||||||
| LNbits (another instance) | Custodial | Depends on host | Low | ❌ | Variable | Provider-managed | Easy | Low | May incur hosting fees | Medium | Connects to another LNbits instance; depends on host's policies. |
|
| **LNbits (another instance)** | Custodial | Depends on host | Low | ❌ | Variable | Provider-managed | Easy | Low | May incur hosting fees | Medium | Connects to another LNbits instance; depends on host's policies. |
|
||||||
| Alby | Custodial | ✅ | Low | ❌ | Low | Provider-managed | Easy | Low | Transaction fees apply | Medium | Browser extension wallet; suitable for web users. |
|
| **Alby** | Custodial | ✅ | Low | ❌ | Low | Provider-managed | Easy | Low | Transaction fees apply | Medium | Browser extension wallet; suitable for web users. |
|
||||||
| Breez SDK | Self-custodial | ❌ | Medium | ❌ | High | Automatic | Moderate | Low | Minimal fees | Medium | SDK for integrating Breez wallet functionalities. |
|
| **Breez SDK** | Self-custodial | ❌ | Medium | ❌ | High | Automatic | Moderate | Low | Minimal fees | Medium | SDK for integrating Breez wallet functionalities. |
|
||||||
| OpenNode | Custodial | ✅ | Low | ❌ | Low | Provider-managed | Easy | Low | Transaction fees apply | Medium | Third-party service; suitable for merchants. |
|
| **OpenNode** | Custodial | ✅ | Low | ❌ | Low | Provider-managed | Easy | Low | Transaction fees apply | Medium | Third-party service; suitable for merchants. |
|
||||||
| Blink | Custodial | ✅ | Low | ❌ | Low | Provider-managed | Easy | Low | Transaction fees apply | Medium | Third-party service; focuses on mobile integrations. |
|
| **Blink** | Custodial | ✅ | Low | ❌ | Low | Provider-managed | Easy | Low | Transaction fees apply | Medium | Third-party service; focuses on mobile integrations. |
|
||||||
| ZBD | Custodial | ✅ | Low | ❌ | Low | Provider-managed | Easy | Low | Transaction fees apply | Medium | Gaming-focused payment platform. |
|
| **ZBD** | Custodial | ✅ | Low | ❌ | Low | Provider-managed | Easy | Low | Transaction fees apply | Medium | Gaming-focused payment platform. |
|
||||||
| Spark (CLN) | Self-custodial | ❌ | Higher | ✅ | High | Manual | Moderate | High | Infrastructure cost and channel opening fees | High | Web interface for CLN; requires Spark server setup. |
|
| **Spark (CLN)** | Self-custodial | ❌ | Higher | ✅ | High | Manual | Moderate | High | Infrastructure cost and channel opening fees | High | Web interface for CLN; requires Spark server setup. |
|
||||||
| Cliche Wallet | Self-custodial | ❌ | Medium | ❌ | Medium | Manual | Moderate | Moderate | Minimal fees | Medium | Lightweight wallet; suitable for embedded systems. |
|
| **Cliche Wallet** | Self-custodial | ❌ | Medium | ❌ | Medium | Manual | Moderate | Moderate | Minimal fees | Medium | Lightweight wallet; suitable for embedded systems. |
|
||||||
| Strike | Custodial | ✅ | Low | ❌ | Low | Provider-managed | Easy | Low | Transaction fees apply | Medium | Third-party service; suitable for quick setups. |
|
| **Strike** | Custodial | ✅ | Low | ❌ | Low | Provider-managed | Easy | Low | Transaction fees apply | Medium | Third-party service; suitable for quick setups. |
|
||||||
| LNPay | Custodial | ✅ | Low | ❌ | Low | Provider-managed | Easy | Low | Transaction fees apply | Medium | Third-party service; suitable for quick setups. |
|
| **LNPay** | Custodial | ✅ | Low | ❌ | Low | Provider-managed | Easy | Low | Transaction fees apply | Medium | Third-party service; suitable for quick setups. |
|
||||||
|
| **Eclair (ACINQ)** | Self-custodial | ❌ | Higher | ✅ | High | Manual | Moderate | High | Infrastructure cost and channel opening fees | High | Connects via API; you run and manage your Eclair node. |
|
||||||
|
| **LN.tips** | Custodial/Self-Custodial | Depends on provider | Medium | ❌ | Low | Provider-managed | Moderate | Low | Transaction fees may apply | Medium | Simple hosted service; use LN.tips API as your backend. |
|
||||||
|
| **Fake Wallet** | Testing (simulated) | ❌ | Low | ❌ | N/A | N/A | Easy | Low | None (test only) | N/A | For testing only; mints accounting units in LNbits (no real sats, unit name configurable). |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Notes for readers
|
||||||
|
|
||||||
|
- These are typical characteristics; your exact experience may vary by configuration and provider policy.
|
||||||
|
- Pick based on your constraints: compliance (KYC), privacy, ops effort, and time-to-ship.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Additional Guides
|
||||||
|
|
||||||
|
- **[Admin UI](./admin_ui.md)** — Manage server settings via a clean UI (avoid editing `.env` by hand).
|
||||||
|
- **[User Roles](./User_Roles.md)** — Quick Overview of existing Roles in LNBits.
|
||||||
|
- **[Funding sources](./funding-sources_table.md)** — 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](https://demo.lnbits.com/tipjar/DwaUiE4kBX6mUW6pj3X5Kg) or visit our [Shop](https://shop.lnbits.de)
|
||||||
|
|
||||||
|
[](https://shop.lnbits.com/)
|
||||||
|
[](https://shop.lnbits.com/)
|
||||||
|
[](https://my.lnbits.com/login)
|
||||||
|
[](https://news.lnbits.com/)
|
||||||
|
[](https://extensions.lnbits.com/)
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,45 @@
|
||||||
---
|
<a href="https://lnbits.com" target="_blank" rel="noopener noreferrer">
|
||||||
layout: default
|
<picture>
|
||||||
title: Basic installation
|
<source media="(prefers-color-scheme: dark)" srcset="https://i.imgur.com/QE6SIrs.png">
|
||||||
nav_order: 2
|
<img src="https://i.imgur.com/fyKPgVT.png" alt="LNbits" style="width:300px">
|
||||||
---
|
</picture>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
   [](https://extensions.lnbits.com/) [<img src="https://img.shields.io/badge/community_chat-Telegram-24A1DE">](https://t.me/lnbits) <img src="https://img.shields.io/badge/supported_by-%3E__OpenSats-f97316">
|
||||||
|
|
||||||
# Basic installation
|
# Basic installation
|
||||||
|
|
||||||
Note that by default LNbits uses SQLite as its database, which is simple and effective but you can configure it to use PostgreSQL instead which is also described in a section below.
|
> [!NOTE]
|
||||||
|
> **Default DB:** LNbits uses SQLite by default (simple & effective). You can switch to PostgreSQL — see the section below.
|
||||||
|
|
||||||
## Option 1: AppImage (LInux)
|
## Table of contents
|
||||||
|
|
||||||
### AppImage (Linux)
|
- [Option 1: AppImage (Linux)](#option-1-appimage-linux)
|
||||||
|
- [Option 2: UV (recommended for developers)](#option-2-uv-recommended-for-developers)
|
||||||
|
- [Option 2a (Legacy): Poetry — Replaced by UV](#option-2a-legacy-poetry--replaced-by-uv)
|
||||||
|
- [Option 3: Install script (Debian/Ubuntu)](#option-3-install-script-debianubuntu)
|
||||||
|
- [Option 4: Nix](#option-4-nix)
|
||||||
|
- [Option 5: Docker](#option-5-docker)
|
||||||
|
- [Option 6: Fly.io](#option-6-flyio)
|
||||||
|
- [Troubleshooting](#troubleshooting)
|
||||||
|
- [Optional: PostgreSQL database](#optional-postgresql-database)
|
||||||
|
- [Using LNbits](#using-lnbits)
|
||||||
|
- [Additional guides](#additional-guides)
|
||||||
|
- [Update LNbits (all methods)](#update-lnbits-all-methods)
|
||||||
|
- [SQLite → PostgreSQL migration](#sqlite--postgresql-migration)
|
||||||
|
- [LNbits as a systemd service](#lnbits-as-a-systemd-service)
|
||||||
|
- [Reverse proxy with automatic HTTPS (Caddy)](#reverse-proxy-with-automatic-https-caddy)
|
||||||
|
- [Apache2 reverse proxy over HTTPS](#apache2-reverse-proxy-over-https)
|
||||||
|
- [Nginx reverse proxy over HTTPS](#nginx-reverse-proxy-over-https)
|
||||||
|
- [HTTPS without a reverse proxy (self-signed)](#https-without-a-reverse-proxy-self-signed)
|
||||||
|
- [LNbits on Umbrel behind Tor](#lnbits-on-umbrel-behind-tor)
|
||||||
|
- [FreeBSD notes](#freebsd-notes)
|
||||||
|
|
||||||
Go to [releases](https://github.com/lnbits/lnbits/releases) and pull latest AppImage, or:
|
## Option 1: AppImage (Linux)
|
||||||
|
|
||||||
|
**Quickstart**
|
||||||
|
|
||||||
|
1. Download latest AppImage from [releases](https://github.com/lnbits/lnbits/releases) **or** run:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo apt-get install jq libfuse2
|
sudo apt-get install jq libfuse2
|
||||||
|
|
@ -21,19 +48,19 @@ chmod +x LNbits-latest.AppImage
|
||||||
LNBITS_ADMIN_UI=true HOST=0.0.0.0 PORT=5000 ./LNbits-latest.AppImage # most system settings are now in the admin UI, but pass additional .env variables here
|
LNBITS_ADMIN_UI=true HOST=0.0.0.0 PORT=5000 ./LNbits-latest.AppImage # most system settings are now in the admin UI, but pass additional .env variables here
|
||||||
```
|
```
|
||||||
|
|
||||||
LNbits will create a folder for db and extension files in the folder the AppImage runs from.
|
- LNbits will create a folder for DB and extension files **in the same directory** as the AppImage.
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> **Next steps**
|
||||||
|
> Install complete → **[Running LNbits](#run-the-server)**
|
||||||
|
> Update LNBits → **[Update LNbits (all methods)](#update-lnbits-all-methods)**
|
||||||
|
|
||||||
## Option 2: UV (recommended for developers)
|
## Option 2: UV (recommended for developers)
|
||||||
|
|
||||||
It is recommended to use the latest version of UV. Make sure you have Python version `3.12` installed.
|
> [!IMPORTANT]
|
||||||
|
> **It is recommended to use the latest version of UV & Make sure you have Python version 3.12 installed.**
|
||||||
|
|
||||||
### Install Python 3.12
|
### Verify Python
|
||||||
|
|
||||||
## Option 2 (recommended): UV
|
|
||||||
|
|
||||||
It is recommended to use the latest version of UV. Make sure you have Python version 3.10 or higher installed.
|
|
||||||
|
|
||||||
### Verify Python version
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
python3 --version
|
python3 --version
|
||||||
|
|
@ -46,15 +73,7 @@ curl -LsSf https://astral.sh/uv/install.sh | sh
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
```
|
```
|
||||||
|
|
||||||
### (old) Install Poetry
|
### Install LNbits
|
||||||
|
|
||||||
```sh
|
|
||||||
# If path 'export PATH="$HOME/.local/bin:$PATH"' fails, use the path echoed by the install
|
|
||||||
curl -sSL https://install.python-poetry.org | python3 -
|
|
||||||
export PATH="$HOME/.local/bin:$PATH"
|
|
||||||
```
|
|
||||||
|
|
||||||
### install LNbits
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone https://github.com/lnbits/lnbits.git
|
git clone https://github.com/lnbits/lnbits.git
|
||||||
|
|
@ -62,10 +81,78 @@ cd lnbits
|
||||||
git checkout main
|
git checkout main
|
||||||
uv sync --all-extras
|
uv sync --all-extras
|
||||||
|
|
||||||
# or poetry
|
cp .env.example .env
|
||||||
# poetry env use 3.12
|
# Optional: set funding source and other options in .env (e.g., `nano .env`)
|
||||||
# poetry install --only main
|
```
|
||||||
|
|
||||||
|
### Run the server
|
||||||
|
|
||||||
|
```sh
|
||||||
|
uv run lnbits
|
||||||
|
# To change port/host: uv run lnbits --port 9000 --host 0.0.0.0
|
||||||
|
# Add --debug to the command above and set DEBUG=true in .env for verbose output
|
||||||
|
```
|
||||||
|
|
||||||
|
### LNbits CLI
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# Useful for superuser ID, updating extensions, etc.
|
||||||
|
uv run lnbits-cli --help
|
||||||
|
```
|
||||||
|
|
||||||
|
### Update LNbits
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd lnbits
|
||||||
|
# Stop LNbits with Ctrl + X or your service manager
|
||||||
|
# sudo systemctl stop lnbits
|
||||||
|
|
||||||
|
# Update code
|
||||||
|
git pull --rebase
|
||||||
|
|
||||||
|
uv sync --all-extras
|
||||||
|
uv run lnbits
|
||||||
|
```
|
||||||
|
|
||||||
|
#### Use Admin UI → Extensions → "Update All" to bring extensions up to the proper level
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> **Next steps**
|
||||||
|
> Install complete → **[Running LNbits](#run-the-server)**
|
||||||
|
> Update LNBits → **[Update LNbits (all methods)](#update-lnbits-all-methods)**
|
||||||
|
|
||||||
|
## Option 2a (Legacy): Poetry — _Replaced by UV_
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>Poetry install and update (legacy workflow)</summary>
|
||||||
|
|
||||||
|
This legacy section is preserved for older environments.
|
||||||
|
**UV is the recommended (and faster) tool** for new installs. Use Poetry only if you have personal preferences or must support an older workflow.
|
||||||
|
|
||||||
|
> 
|
||||||
|
> **It is recommended to use the latest version of Poetry & Make sure you have Python version 3.12 installed.**
|
||||||
|
|
||||||
|
### Verify Python version
|
||||||
|
|
||||||
|
```sh
|
||||||
|
python3 --version
|
||||||
|
```
|
||||||
|
|
||||||
|
### Install Poetry
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# If path 'export PATH="$HOME/.local/bin:$PATH"' fails, use the path echoed by the install
|
||||||
|
curl -sSL https://install.python-poetry.org | python3 - && export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Install LNbits
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/lnbits/lnbits.git
|
||||||
|
cd lnbits
|
||||||
|
poetry env use 3.12
|
||||||
|
git checkout main
|
||||||
|
poetry install --only main
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
# Optional: to set funding source amongst other options via the env `nano .env`
|
# Optional: to set funding source amongst other options via the env `nano .env`
|
||||||
```
|
```
|
||||||
|
|
@ -73,50 +160,53 @@ cp .env.example .env
|
||||||
#### Running the server
|
#### Running the server
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
uv run lnbits
|
poetry run lnbits
|
||||||
# To change port/host pass 'uv run lnbits --port 9000 --host 0.0.0.0'
|
# To change port/host: poetry run lnbits --port 9000 --host 0.0.0.0
|
||||||
|
# Add --debug to help troubleshooting (also set DEBUG=true in .env)
|
||||||
# or poetry
|
|
||||||
# poetry run lnbits
|
|
||||||
# adding --debug in the start-up command above to help your troubleshooting and generate a more verbose output
|
|
||||||
# Note that you have to add the line DEBUG=true in your .env file, too.
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### LNbits-cli
|
#### LNbits CLI
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# A very useful terminal client for getting the supersuer ID, updating extensions, etc
|
# A very useful terminal client for getting the superuser ID, updating extensions, etc.
|
||||||
uv run lnbits-cli --help
|
poetry run lnbits-cli --help
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Updating the server
|
#### Updating the server
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd lnbits
|
cd lnbits
|
||||||
# Stop LNbits with `ctrl + x` or with service manager
|
# Stop LNbits with Ctrl + X or with your service manager
|
||||||
# sudo systemctl stop lnbits
|
# sudo systemctl stop lnbits
|
||||||
|
|
||||||
# Update LNbits
|
# Update LNbits
|
||||||
git pull --rebase
|
git pull --rebase
|
||||||
|
|
||||||
# Check your poetry version with
|
# Check your Poetry Python version
|
||||||
# poetry env list
|
poetry env list
|
||||||
# If version is less 3.12, update it by running
|
# If version is less than 3.12, update it:
|
||||||
# poetry env use python3.12
|
poetry env use python3.12
|
||||||
# poetry env remove python3.9
|
poetry env remove python3.X
|
||||||
# poetry env list
|
poetry env list
|
||||||
|
|
||||||
# Run install and start LNbits with
|
# Reinstall and start
|
||||||
# poetry install --only main
|
poetry install --only main
|
||||||
# poetry run lnbits
|
poetry run lnbits
|
||||||
|
|
||||||
uv sync --all-extras
|
|
||||||
uv run lnbits
|
|
||||||
|
|
||||||
# use LNbits admin UI Extensions page function "Update All" do get extensions onto proper level
|
|
||||||
```
|
```
|
||||||
|
|
||||||
## Option 2: Install script (on Debian/Ubuntu)
|
#### Use Admin UI → Extensions → "Update All" to bring extensions up to the proper level
|
||||||
|
|
||||||
|
> 
|
||||||
|
> **Next steps**
|
||||||
|
> Install complete → **[Running LNbits](#run-the-server)**
|
||||||
|
> Update LNBits → **[Update LNbits (all methods)](#update-lnbits-all-methods)**
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Option 3: Install script (Debian/Ubuntu)
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>Show install script</strong> (one-line setup)</summary>
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
wget https://raw.githubusercontent.com/lnbits/lnbits/main/lnbits.sh &&
|
wget https://raw.githubusercontent.com/lnbits/lnbits/main/lnbits.sh &&
|
||||||
|
|
@ -124,11 +214,19 @@ chmod +x lnbits.sh &&
|
||||||
./lnbits.sh
|
./lnbits.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
Now visit `0.0.0.0:5000` to make a super-user account.
|
- You can use `./lnbits.sh` to run, but for more control: `cd lnbits` and use `uv run lnbits` (see Option 2).
|
||||||
|
|
||||||
`./lnbits.sh` can be used to run, but for more control `cd lnbits` and use `uv run lnbits` (see previous option).
|
> 
|
||||||
|
> **Next steps**
|
||||||
|
> Install complete → **[Running LNbits](#run-the-server)**
|
||||||
|
> Update LNBits → **[Update LNbits (all methods)](#update-lnbits-all-methods)**
|
||||||
|
|
||||||
## Option 3: Nix
|
</details>
|
||||||
|
|
||||||
|
## Option 4: Nix
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>Show Nix instructions</strong> (flakes, cachix, run)</summary>
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Install nix. If you have installed via another manager, remove and use this install (from https://nixos.org/download)
|
# Install nix. If you have installed via another manager, remove and use this install (from https://nixos.org/download)
|
||||||
|
|
@ -187,26 +285,36 @@ LNBITS_ADMIN_UI=true ./result/bin/lnbits --port 9000 --host 0.0.0.0
|
||||||
SUPER_USER=be54db7f245346c8833eaa430e1e0405 LNBITS_ADMIN_UI=true ./result/bin/lnbits --port 9000
|
SUPER_USER=be54db7f245346c8833eaa430e1e0405 LNBITS_ADMIN_UI=true ./result/bin/lnbits --port 9000
|
||||||
```
|
```
|
||||||
|
|
||||||
## Option 4: Docker
|
> 
|
||||||
|
> **Next steps**
|
||||||
|
> Update LNBits → **[Update LNbits (all methods)](#update-lnbits-all-methods)**
|
||||||
|
|
||||||
Use latest version from Docker Hub.
|
</details>
|
||||||
|
|
||||||
|
## Option 5: Docker
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>Show Docker instructions</strong> (official image, volumes, extensions)</summary>
|
||||||
|
|
||||||
|
**Use latest image**
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker pull lnbits/lnbits
|
docker pull lnbits/lnbits
|
||||||
wget https://raw.githubusercontent.com/lnbits/lnbits/main/.env.example -O .env
|
wget https://raw.githubusercontent.com/lnbits/lnbits/main/.env.example -O .env
|
||||||
mkdir data
|
mkdir data
|
||||||
docker run --detach --publish 5000:5000 --name lnbits --volume ${PWD}/.env:/app/.env --volume ${PWD}/data/:/app/data lnbits/lnbits
|
docker run --detach --publish 5000:5000 --name lnbits \
|
||||||
|
--volume ${PWD}/.env:/app/.env \
|
||||||
|
--volume ${PWD}/data/:/app/data \
|
||||||
|
lnbits/lnbits
|
||||||
```
|
```
|
||||||
|
|
||||||
The LNbits Docker image comes with no extensions installed. User-installed extensions will be stored by default in a container directory.
|
- The LNbits Docker image ships **without any extensions**; by default, any extensions you install are stored **inside the container** and will be **lost** when the container is removed, so you should set `LNBITS_EXTENSIONS_PATH` to a directory that’s **mapped to a persistent host volume** so extensions **survive rebuilds/recreates**—for example:
|
||||||
It is recommended to point the `LNBITS_EXTENSIONS_PATH` environment variable to a directory that is mapped to a Docker volume. This way, the extensions will not be reinstalled when the container is destroyed.
|
|
||||||
Example:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker run ... -e "LNBITS_EXTENSIONS_PATH='/app/data/extensions'" --volume ${PWD}/data/:/app/data ...
|
docker run ... -e "LNBITS_EXTENSIONS_PATH='/app/data/extensions'" --volume ${PWD}/data/:/app/data ...
|
||||||
```
|
```
|
||||||
|
|
||||||
Build the image yourself.
|
**Build image yourself**
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
git clone https://github.com/lnbits/lnbits.git
|
git clone https://github.com/lnbits/lnbits.git
|
||||||
|
|
@ -214,24 +322,39 @@ cd lnbits
|
||||||
docker build -t lnbits/lnbits .
|
docker build -t lnbits/lnbits .
|
||||||
cp .env.example .env
|
cp .env.example .env
|
||||||
mkdir data
|
mkdir data
|
||||||
docker run --detach --publish 5000:5000 --name lnbits --volume ${PWD}/.env:/app/.env --volume ${PWD}/data/:/app/data lnbits/lnbits
|
docker run --detach --publish 5000:5000 --name lnbits \
|
||||||
|
--volume ${PWD}/.env:/app/.env \
|
||||||
|
--volume ${PWD}/data/:/app/data \
|
||||||
|
lnbits/lnbits
|
||||||
```
|
```
|
||||||
|
|
||||||
You can optionally override the arguments that are passed to `poetry install` during the build process by setting the Docker build argument named `POETRY_INSTALL_ARGS`. For example, to enable the Breez funding source, build the Docker image with the command:
|
You can optionally override the install extras for both **Poetry** and **UV** to include optional features during build or setup:
|
||||||
|
|
||||||
|
- with Poetry, pass extras via the `POETRY_INSTALL_ARGS` Docker build-arg (e.g., to enable the **Breez** funding source: `docker build --build-arg POETRY_INSTALL_ARGS="-E breez" -t lnbits/lnbits .`);
|
||||||
|
- with UV, enable extras during environment sync (e.g., locally run `uv sync --extra breez` or `uv sync --all-extras`), and—**if your Dockerfile supports it**—you can mirror the same at build time via a build-arg such as `UV_SYNC_ARGS` (example pattern: `docker build --build-arg UV_SYNC_ARGS="--extra breez" -t lnbits/lnbits .`).
|
||||||
|
|
||||||
|
**Enable Breez funding source at build**
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker build --build-arg POETRY_INSTALL_ARGS="-E breez" -t lnbits/lnbits .
|
docker build --build-arg POETRY_INSTALL_ARGS="-E breez" -t lnbits/lnbits .
|
||||||
```
|
```
|
||||||
|
|
||||||
## Option 5: Fly.io
|
> 
|
||||||
|
> **Next steps**
|
||||||
|
> Install complete → **[Running LNbits](#run-the-server)**
|
||||||
|
> Update LNBits → **[Update LNbits (all methods)](#update-lnbits-all-methods)**
|
||||||
|
|
||||||
Fly.io is a docker container hosting platform that has a generous free tier. You can host LNbits for free on Fly.io for personal use.
|
</details>
|
||||||
|
|
||||||
First, sign up for an account at [Fly.io](https://fly.io) (no credit card required).
|
## Option 6: Fly.io
|
||||||
|
|
||||||
Then, install the Fly.io CLI onto your device [here](https://fly.io/docs/getting-started/installing-flyctl/).
|
<details>
|
||||||
|
<summary><strong>Deploy LNbits on Fly.io (free tier friendly)</summary>
|
||||||
|
|
||||||
After install is complete, the command will output a command you should copy/paste/run to get `fly` into your `$PATH`. Something like:
|
**Fly.io is a docker container hosting platform that has a generous free tier. You can host LNbits for free on Fly.io for personal use.**
|
||||||
|
|
||||||
|
1. Create an account at [Fly.io](https://fly.io).
|
||||||
|
2. Install the Fly.io CLI ([guide](https://fly.io/docs/getting-started/installing-flyctl/)).
|
||||||
|
|
||||||
```
|
```
|
||||||
flyctl was installed successfully to /home/ubuntu/.fly/bin/flyctl
|
flyctl was installed successfully to /home/ubuntu/.fly/bin/flyctl
|
||||||
|
|
@ -240,9 +363,9 @@ Manually add the directory to your $HOME/.bash_profile (or similar)
|
||||||
export PATH="$FLYCTL_INSTALL/bin:$PATH"
|
export PATH="$FLYCTL_INSTALL/bin:$PATH"
|
||||||
```
|
```
|
||||||
|
|
||||||
You can either run those commands, then `source ~/.bash_profile` or, if you don't, you'll have to call Fly from `~/.fly/bin/flyctl`.
|
3. You can either run those commands, then `source ~/.bash_profile` or, if you don't, you'll have to call Fly from `~/.fly/bin/flyctl`.
|
||||||
|
|
||||||
Once installed, run the following commands.
|
- Once installed, run the following commands.
|
||||||
|
|
||||||
```
|
```
|
||||||
git clone https://github.com/lnbits/lnbits.git
|
git clone https://github.com/lnbits/lnbits.git
|
||||||
|
|
@ -256,9 +379,16 @@ You'll be prompted to enter an app name, region, postgres (choose no), deploy no
|
||||||
|
|
||||||
You'll now find a file in the directory called `fly.toml`. Open that file and modify/add the following settings.
|
You'll now find a file in the directory called `fly.toml`. Open that file and modify/add the following settings.
|
||||||
|
|
||||||
Note: Be sure to replace `${PUT_YOUR_LNBITS_ENV_VARS_HERE}` with all relevant environment variables in `.env` or `.env.example`. Environment variable strings should be quoted here, so if in `.env` you have `LNBITS_ENDPOINT=https://demo.lnbits.com` in `fly.toml` you should have `LNBITS_ENDPOINT="https://demo.lnbits.com"`.
|
> 
|
||||||
|
> Be sure to replace `${PUT_YOUR_LNBITS_ENV_VARS_HERE}` with all relevant environment variables in `.env` or `.env.example`.
|
||||||
|
> Environment variable strings should be quoted here. For example, if `.env` has
|
||||||
|
> `LNBITS_ENDPOINT=https://demo.lnbits.com`, then in `fly.toml` use
|
||||||
|
> `LNBITS_ENDPOINT="https://demo.lnbits.com"`.
|
||||||
|
|
||||||
Note: Don't enter secret environment variables here. Fly.io offers secrets (via the `fly secrets` command) that are exposed as environment variables in your runtime. So, for example, if using the LND_REST funding source, you can run `fly secrets set LND_REST_MACAROON=<hex_macaroon_data>`.
|
> 
|
||||||
|
> Don't enter secret environment variables here. Fly.io offers **secrets** (via `fly secrets`) that are exposed as env vars at runtime.
|
||||||
|
> Example (LND REST funding source):
|
||||||
|
> `fly secrets set LND_REST_MACAROON=<hex_macaroon_data>`
|
||||||
|
|
||||||
```
|
```
|
||||||
...
|
...
|
||||||
|
|
@ -313,26 +443,49 @@ sudo apt install python3.10-dev gcc build-essential
|
||||||
poetry add setuptools wheel
|
poetry add setuptools wheel
|
||||||
```
|
```
|
||||||
|
|
||||||
### Optional: PostgreSQL database
|
> 
|
||||||
|
>
|
||||||
|
> **Next steps**
|
||||||
|
> Install complete → **[Running LNbits](#run-the-server)**
|
||||||
|
> Update LNbits → **[Update LNbits (all methods)](#update-lnbits-all-methods)**
|
||||||
|
|
||||||
If you want to use LNbits at scale, we recommend using PostgreSQL as the backend database. Install Postgres and setup a database for LNbits:
|
## Troubleshooting
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# on debian/ubuntu 'sudo apt-get -y install postgresql'
|
sudo apt install pkg-config libffi-dev libpq-dev
|
||||||
# or follow instructions at https://www.postgresql.org/download/linux/
|
|
||||||
|
|
||||||
# Postgres doesn't have a default password, so we'll create one.
|
# build essentials (Debian/Ubuntu)
|
||||||
|
sudo apt install python3.10-dev gcc build-essential
|
||||||
|
|
||||||
|
# if secp256k1 build fails and you used poetry
|
||||||
|
poetry add setuptools wheel
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## Optional: PostgreSQL database
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> If you want to use LNbits at scale, we recommend using PostgreSQL as the backend database. Install Postgres and set up a database for LNbits.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# Debian/Ubuntu: sudo apt-get -y install postgresql
|
||||||
|
# or see https://www.postgresql.org/download/linux/
|
||||||
|
|
||||||
|
# Create a password for the postgres user
|
||||||
sudo -i -u postgres
|
sudo -i -u postgres
|
||||||
psql
|
psql
|
||||||
# on psql
|
# in psql
|
||||||
ALTER USER postgres PASSWORD 'myPassword'; # choose whatever password you want
|
ALTER USER postgres PASSWORD 'myPassword';
|
||||||
\q
|
\q
|
||||||
# on postgres user
|
# back as postgres user
|
||||||
createdb lnbits
|
createdb lnbits
|
||||||
exit
|
exit
|
||||||
```
|
```
|
||||||
|
|
||||||
You need to edit the `.env` file.
|
**Configure LNbits**
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# add the database connection string to .env 'nano .env' LNBITS_DATABASE_URL=
|
# add the database connection string to .env 'nano .env' LNBITS_DATABASE_URL=
|
||||||
|
|
@ -343,44 +496,189 @@ LNBITS_DATABASE_URL="postgres://postgres:postgres@localhost:5432/lnbits"
|
||||||
|
|
||||||
# Using LNbits
|
# Using LNbits
|
||||||
|
|
||||||
Now you can visit your LNbits at http://localhost:5000/.
|
Visit **[http://localhost:5000/](http://localhost:5000/)** (or `0.0.0.0:5000`).
|
||||||
|
|
||||||
Now modify the `.env` file with any settings you prefer and add a proper [funding source](./wallets.md) by modifying the value of `LNBITS_BACKEND_WALLET_CLASS` and providing the extra information and credentials related to the chosen funding source.
|
### Option A — First-run setup in the Browser (UI)
|
||||||
|
|
||||||
Then you can restart it and it will be using the new settings.
|
1. On the **first start**, LNbits will **prompt you to Setup a SuperUser**.
|
||||||
|
2. After creating it, you’ll be **redirected to the Admin UI as SuperUser**.
|
||||||
|
3. In the Admin UI, **set your funding source** (backend wallet) and other preferences.
|
||||||
|
4. **Restart LNbits** if prompted or after changing critical settings.
|
||||||
|
|
||||||
You might also need to install additional packages or perform additional setup steps, depending on the chosen backend. See [the short guide](./wallets.md) on each different funding source.
|
> [!IMPORTANT]
|
||||||
|
> Use the **SuperUser only** for initial setup and instance settings (funding source, configuration, Topup).
|
||||||
|
> For maintenance, create a separate **Admin** account. For everyday usage (payments, wallets, etc.), **do not use the SuperUser** — use admin or regular user accounts instead. Its a bad behaviour.
|
||||||
|
> Read more about [SuperUser](./super_user.md) and [Admin UI](./admin_ui.md)
|
||||||
|
|
||||||
Take a look at [Polar](https://lightningpolar.com/) for an excellent way of spinning up a Lightning Network dev environment.
|
### Option B — Configure via `.env`
|
||||||
|
|
||||||
|
1. Edit your `.env` with preferred settings (funding, base URL, etc.).
|
||||||
|
2. Set a funding source by configuring:
|
||||||
|
- `LNBITS_BACKEND_WALLET_CLASS`
|
||||||
|
- plus the required credentials for your chosen backend (see **[wallets.md](./wallets.md)**).
|
||||||
|
|
||||||
|
3. **Restart LNbits** to apply changes.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> **Paths overview**
|
||||||
|
>
|
||||||
|
> - **SuperUser file:** `<lnbits_root>/data/.super_user`
|
||||||
|
> Example: `~/lnbits/data/.super_user` • View: `cat ~/lnbits/data/.super_user`
|
||||||
|
> - **Environment file:** `<lnbits_root>/.env` (for bare-metal installs)
|
||||||
|
> - **Docker:** bind a host directory to `/app/data`.
|
||||||
|
> On the host the SuperUser file is at `<host_data_dir>/.super_user`.
|
||||||
|
> The container reads `/app/.env` (usually bind-mounted from your project root).
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> **Local Lightning test network**
|
||||||
|
> Use **Polar** to spin up a safe local Lightning environment and test LNbits without touching your live setup.
|
||||||
|
> https://lightningpolar.com/
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> **API comparison before updates**
|
||||||
|
> Use **TableTown** to diff your LNbits instance against another (dev vs prod) or the upstream dev branch. Spot endpoint changes before updating.
|
||||||
|
> Crafted by [Arbadacarbayk](https://github.com/arbadacarbaYK) - a standout contribution that makes pre-release reviews fast and reliable.
|
||||||
|
> https://arbadacarbayk.github.io/LNbits_TableTown/
|
||||||
|
|
||||||
# Additional guides
|
# Additional guides
|
||||||
|
|
||||||
## SQLite to PostgreSQL migration
|
## Update LNbits (all methods)
|
||||||
|
|
||||||
If you already have LNbits installed and running, on an SQLite database, we **highly** recommend you migrate to postgres if you are planning to run LNbits on scale.
|
> After updating, open **Admin UI → Extensions → “Update All”** to make sure extensions match the core version.
|
||||||
|
|
||||||
There's a script included that can do the migration easy. You should have Postgres already installed and there should be a password for the user (see Postgres install guide above). Additionally, your LNbits instance should run once on postgres to implement the database schema before the migration works:
|
<details>
|
||||||
|
<summary><strong>UV (recommended)</strong></summary>
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd lnbits
|
||||||
|
git pull --rebase
|
||||||
|
uv sync --all-extras
|
||||||
|
# restart (dev)
|
||||||
|
uv run lnbits
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>Poetry (legacy)</strong></summary>
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd lnbits
|
||||||
|
git pull --rebase
|
||||||
|
# Optional: ensure Python 3.12
|
||||||
|
poetry env list
|
||||||
|
poetry env use python3.12
|
||||||
|
poetry install --only main
|
||||||
|
# restart (dev)
|
||||||
|
poetry run lnbits
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>AppImage</strong></summary>
|
||||||
|
|
||||||
|
Download the latest AppImage from Releases and replace your old file **in the same directory** to keep the `./data` folder (DB, extensions).
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>Install script (Debian/Ubuntu)</strong></summary>
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# If you installed via lnbits.sh:
|
||||||
|
cd lnbits
|
||||||
|
git pull --rebase
|
||||||
|
# then use your chosen runner (UV recommended)
|
||||||
|
uv sync --all-extras
|
||||||
|
uv run lnbits
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>Nix</strong></summary>
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd lnbits
|
||||||
|
git pull --rebase
|
||||||
|
nix build
|
||||||
|
# restart
|
||||||
|
nix run
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>Docker (official image)</strong></summary>
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker pull lnbits/lnbits
|
||||||
|
docker stop lnbits && docker rm lnbits
|
||||||
|
docker run --detach --publish 5000:5000 --name lnbits \
|
||||||
|
--volume ${PWD}/.env:/app/.env \
|
||||||
|
--volume ${PWD}/data/:/app/data \
|
||||||
|
lnbits/lnbits
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>Docker (build yourself)</strong></summary>
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd lnbits
|
||||||
|
git pull --rebase
|
||||||
|
docker build -t lnbits/lnbits .
|
||||||
|
docker stop lnbits && docker rm lnbits
|
||||||
|
docker run --detach --publish 5000:5000 --name lnbits \
|
||||||
|
--volume ${PWD}/.env:/app/.env \
|
||||||
|
--volume ${PWD}/data/:/app/data \
|
||||||
|
lnbits/lnbits
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>Fly.io</strong></summary>
|
||||||
|
|
||||||
|
```sh
|
||||||
|
# If using Dockerfile in repo (recommended)
|
||||||
|
cd lnbits
|
||||||
|
git pull --rebase
|
||||||
|
fly deploy
|
||||||
|
# Logs & shell if needed
|
||||||
|
fly logs
|
||||||
|
fly ssh console
|
||||||
|
```
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## SQLite → PostgreSQL migration
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> If you run on SQLite and plan to scale, migrate to Postgres.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# STOP LNbits
|
# STOP LNbits
|
||||||
|
|
||||||
# add the database connection string to .env 'nano .env' LNBITS_DATABASE_URL=
|
# Edit .env with Postgres URL
|
||||||
# postgres://<user>:<password>@<host>/<database> - alter line bellow with your user, password and db name
|
|
||||||
LNBITS_DATABASE_URL="postgres://postgres:postgres@localhost/lnbits"
|
LNBITS_DATABASE_URL="postgres://postgres:postgres@localhost/lnbits"
|
||||||
# save and exit
|
# save and exit
|
||||||
|
|
||||||
# START LNbits
|
# START then STOP LNbits once to apply schema
|
||||||
# STOP LNbits
|
|
||||||
uv run python tools/conv.py
|
uv run python tools/conv.py
|
||||||
# or
|
# or
|
||||||
make migration
|
make migration
|
||||||
```
|
```
|
||||||
|
|
||||||
Hopefully, everything works and get migrated... Launch LNbits again and check if everything is working properly.
|
- Launch LNbits again and verify.
|
||||||
|
|
||||||
## LNbits as a systemd service
|
## LNbits as a systemd service
|
||||||
|
|
||||||
Systemd is great for taking care of your LNbits instance. It will start it on boot and restart it in case it crashes. If you want to run LNbits as a systemd service on your Debian/Ubuntu/Raspbian server, create a file at `/etc/systemd/system/lnbits.service` with the following content:
|
Create `/etc/systemd/system/lnbits.service`:
|
||||||
|
|
||||||
```
|
```
|
||||||
# Systemd unit for lnbits
|
# Systemd unit for lnbits
|
||||||
|
|
@ -388,17 +686,14 @@ Systemd is great for taking care of your LNbits instance. It will start it on bo
|
||||||
|
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=LNbits
|
Description=LNbits
|
||||||
# you can uncomment these lines if you know what you're doing
|
# Optional: start after your backend
|
||||||
# it will make sure that lnbits starts after lnd (replace with your own backend service)
|
|
||||||
#Wants=lnd.service
|
#Wants=lnd.service
|
||||||
#After=lnd.service
|
#After=lnd.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
# replace with the absolute path of your lnbits installation
|
|
||||||
WorkingDirectory=/home/lnbits/lnbits
|
WorkingDirectory=/home/lnbits/lnbits
|
||||||
# same here. run `which uv` if you can't find the poetry binary
|
# Find uv path via `which uv`
|
||||||
ExecStart=/home/lnbits/.local/bin/uv run lnbits
|
ExecStart=/home/lnbits/.local/bin/uv run lnbits
|
||||||
# replace with the user that you're running lnbits on
|
|
||||||
User=lnbits
|
User=lnbits
|
||||||
Restart=always
|
Restart=always
|
||||||
TimeoutSec=120
|
TimeoutSec=120
|
||||||
|
|
@ -409,33 +704,23 @@ Environment=PYTHONUNBUFFERED=1
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
```
|
```
|
||||||
|
|
||||||
Save the file and run the following commands:
|
Enable & start:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo systemctl enable lnbits.service
|
sudo systemctl enable lnbits.service
|
||||||
sudo systemctl start lnbits.service
|
sudo systemctl start lnbits.service
|
||||||
```
|
```
|
||||||
|
|
||||||
## Reverse proxy with automatic HTTPS using Caddy
|
## Reverse proxy with automatic HTTPS (Caddy)
|
||||||
|
|
||||||
Use Caddy to make your LNbits install accessible over clearnet with a domain and https cert.
|
Point your domain A-record to your server IP. Install Caddy: [Caddy install guide](https://caddyserver.com/docs/install#debian-ubuntu-raspbian)
|
||||||
|
|
||||||
Point your domain at the IP of the server you're running LNbits on, by making an `A` record.
|
```sh
|
||||||
|
|
||||||
Install Caddy on the server
|
|
||||||
https://caddyserver.com/docs/install#debian-ubuntu-raspbian
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo caddy stop
|
sudo caddy stop
|
||||||
```
|
|
||||||
|
|
||||||
Create a Caddyfile
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo nano Caddyfile
|
sudo nano Caddyfile
|
||||||
```
|
```
|
||||||
|
|
||||||
Assuming your LNbits is running on port `5000` add:
|
Add:
|
||||||
|
|
||||||
```
|
```
|
||||||
yourdomain.com {
|
yourdomain.com {
|
||||||
|
|
@ -445,28 +730,21 @@ yourdomain.com {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Save and exit `CTRL + x`
|
Save (Ctrl+X) and start:
|
||||||
|
|
||||||
```
|
```sh
|
||||||
sudo caddy start
|
sudo caddy start
|
||||||
```
|
```
|
||||||
|
|
||||||
## Running behind an Apache2 reverse proxy over HTTPS
|
## Apache2 reverse proxy over HTTPS
|
||||||
|
|
||||||
Install Apache2 and enable Apache2 mods:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
apt-get install apache2 certbot
|
apt-get install apache2 certbot
|
||||||
a2enmod headers ssl proxy proxy_http
|
a2enmod headers ssl proxy proxy_http
|
||||||
```
|
|
||||||
|
|
||||||
Create a SSL certificate with LetsEncrypt:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
certbot certonly --webroot --agree-tos --non-interactive --webroot-path /var/www/html -d lnbits.org
|
certbot certonly --webroot --agree-tos --non-interactive --webroot-path /var/www/html -d lnbits.org
|
||||||
```
|
```
|
||||||
|
|
||||||
Create an Apache2 vhost at: `/etc/apache2/sites-enabled/lnbits.conf`:
|
Create `/etc/apache2/sites-enabled/lnbits.conf`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cat <<EOF > /etc/apache2/sites-enabled/lnbits.conf
|
cat <<EOF > /etc/apache2/sites-enabled/lnbits.conf
|
||||||
|
|
@ -493,27 +771,20 @@ cat <<EOF > /etc/apache2/sites-enabled/lnbits.conf
|
||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
Restart Apache2:
|
Restart:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
service apache2 restart
|
service apache2 restart
|
||||||
```
|
```
|
||||||
|
|
||||||
## Running behind an Nginx reverse proxy over HTTPS
|
## Nginx reverse proxy over HTTPS
|
||||||
|
|
||||||
Install nginx:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
apt-get install nginx certbot
|
apt-get install nginx certbot
|
||||||
```
|
|
||||||
|
|
||||||
Create a SSL certificate with LetsEncrypt:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
certbot certonly --nginx --agree-tos -d lnbits.org
|
certbot certonly --nginx --agree-tos -d lnbits.org
|
||||||
```
|
```
|
||||||
|
|
||||||
Create an nginx vhost at `/etc/nginx/sites-enabled/lnbits.org`:
|
Create `/etc/nginx/sites-enabled/lnbits.org`:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
cat <<EOF > /etc/nginx/sites-enabled/lnbits.org
|
cat <<EOF > /etc/nginx/sites-enabled/lnbits.org
|
||||||
|
|
@ -547,23 +818,22 @@ server {
|
||||||
EOF
|
EOF
|
||||||
```
|
```
|
||||||
|
|
||||||
Restart nginx:
|
Restart:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
service nginx restart
|
service nginx restart
|
||||||
```
|
```
|
||||||
|
|
||||||
## Using https without reverse proxy
|
---
|
||||||
|
|
||||||
The most common way of using LNbits via https is to use a reverse proxy such as Caddy, nginx, or ngriok. However, you can also run LNbits via https without additional software. This is useful for development purposes or if you want to use LNbits in your local network.
|
## HTTPS without a reverse proxy (self-signed)
|
||||||
|
|
||||||
We have to create a self-signed certificate using `mkcert`. Note that this certificate is not "trusted" by most browsers but that's fine (since you know that you have created it) and encryption is always better than clear text.
|
Create a self-signed cert (useful for local/dev). Browsers won’t trust it by default.
|
||||||
|
|
||||||
#### Install mkcert
|
### Install mkcert
|
||||||
|
|
||||||
You can find the install instructions for `mkcert` [here](https://github.com/FiloSottile/mkcert).
|
- Install instructions: [mkcert README](https://github.com/FiloSottile/mkcert)
|
||||||
|
- Ubuntu example:
|
||||||
Install mkcert on Ubuntu:
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
sudo apt install libnss3-tools
|
sudo apt install libnss3-tools
|
||||||
|
|
@ -572,70 +842,47 @@ chmod +x mkcert-v*-linux-amd64
|
||||||
sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert
|
sudo cp mkcert-v*-linux-amd64 /usr/local/bin/mkcert
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Create certificate
|
### Create certificate
|
||||||
|
|
||||||
To create a certificate, first `cd` into your LNbits folder and execute the following command on Linux:
|
**OpenSSL**
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
openssl req -new -newkey rsa:4096 -x509 -sha256 -days 3650 -nodes -out cert.pem -keyout key.pem
|
openssl req -new -newkey rsa:4096 -x509 -sha256 -days 3650 -nodes -out cert.pem -keyout key.pem
|
||||||
```
|
```
|
||||||
|
|
||||||
This will create two new files (`key.pem` and `cert.pem `).
|
**mkcert** (alternative)
|
||||||
|
|
||||||
Alternatively, you can use mkcert ([more info](https://kifarunix.com/how-to-create-self-signed-ssl-certificate-with-mkcert-on-ubuntu-18-04/)):
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# add your local IP (192.x.x.x) as well if you want to use it in your local network
|
# include your local IP (e.g., 192.x.x.x) if needed
|
||||||
mkcert localhost 127.0.0.1 ::1
|
mkcert localhost 127.0.0.1 ::1
|
||||||
```
|
```
|
||||||
|
|
||||||
You can then pass the certificate files to uvicorn when you start LNbits:
|
**Run with certs**
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
poetry run uvicorn lnbits.__main__:app --host 0.0.0.0 --port 5000 --ssl-keyfile ./key.pem --ssl-certfile ./cert.pem
|
poetry run uvicorn lnbits.__main__:app --host 0.0.0.0 --port 5000 --ssl-keyfile ./key.pem --ssl-certfile ./cert.pem
|
||||||
```
|
```
|
||||||
|
|
||||||
## LNbits running on Umbrel behind Tor
|
## LNbits on Umbrel behind Tor
|
||||||
|
|
||||||
If you want to run LNbits on your Umbrel but want it to be reached through clearnet, _Uxellodunum_ made an extensive [guide](https://community.getumbrel.com/t/guide-lnbits-without-tor/604) on how to do it.
|
See this community [guide](https://community.getumbrel.com/t/guide-lnbits-without-tor/604).
|
||||||
|
|
||||||
## Docker installation
|
## FreeBSD notes
|
||||||
|
|
||||||
To install using docker you first need to build the docker image as:
|
Issue with secp256k1 0.14.0 on FreeBSD (thanks @GitKalle):
|
||||||
|
|
||||||
```
|
1. Install `py311-secp256k1` with `pkg install py311-secp256k1`.
|
||||||
git clone https://github.com/lnbits/lnbits.git
|
2. Change version in `pyproject.toml` from `0.14.0` to `0.13.2`.
|
||||||
cd lnbits
|
3. Rewrite `poetry.lock` with `poetry lock`.
|
||||||
docker build -t lnbits/lnbits .
|
4. Follow install instructions with Poetry.
|
||||||
```
|
|
||||||
|
|
||||||
You can launch the docker in a different directory, but make sure to copy `.env.example` from lnbits there
|
---
|
||||||
|
|
||||||
```
|
## Powered by LNbits
|
||||||
cp <lnbits_repo>/.env.example .env
|
|
||||||
```
|
|
||||||
|
|
||||||
and change the configuration in `.env` as required.
|
LNbits empowers everyone with modular, open-source tools for building Bitcoin-based systems — fast, free, and extendable.
|
||||||
|
|
||||||
Then create the data directory
|
If you like this project [send some tip love](https://demo.lnbits.com/tipjar/DwaUiE4kBX6mUW6pj3X5Kg) or visiting our [Shop](https://shop.lnbits.com)
|
||||||
|
|
||||||
```
|
[](https://shop.lnbits.com/)
|
||||||
mkdir data
|
[](https://shop.lnbits.com/) [](https://my.lnbits.com/login) [](https://news.lnbits.com/) [](https://extensions.lnbits.com/)
|
||||||
```
|
|
||||||
|
|
||||||
Then the image can be run as:
|
|
||||||
|
|
||||||
```
|
|
||||||
docker run --detach --publish 5000:5000 --name lnbits -e "LNBITS_BACKEND_WALLET_CLASS='FakeWallet'" --volume ${PWD}/.env:/app/.env --volume ${PWD}/data/:/app/data lnbits
|
|
||||||
```
|
|
||||||
|
|
||||||
Finally you can access your lnbits on your machine at port 5000.
|
|
||||||
|
|
||||||
### FreeBSD notes
|
|
||||||
|
|
||||||
Currently there is an issue with secp256k1 0.14.0 on FreeBSD. Thanks to @GitKalle
|
|
||||||
|
|
||||||
1. Install package `py311-secp256k1` with `pkg install py311-secp256k1`
|
|
||||||
2. Change version in `pyproject.toml` from 0.14.0 to 0.13.2
|
|
||||||
3. Rewrite `poetry.lock` file with command `poetry lock`
|
|
||||||
4. Follow install instruction with Poetry
|
|
||||||
|
|
|
||||||
127
docs/guide/super_user.md
Normal file
127
docs/guide/super_user.md
Normal file
|
|
@ -0,0 +1,127 @@
|
||||||
|
<a href="https://lnbits.com" target="_blank" rel="noopener noreferrer">
|
||||||
|
<picture>
|
||||||
|
<source media="(prefers-color-scheme: dark)" srcset="https://i.imgur.com/QE6SIrs.png">
|
||||||
|
<img src="https://i.imgur.com/fyKPgVT.png" alt="LNbits" style="width:300px">
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
[<img src="https://img.shields.io/badge/community_chat-Telegram-24A1DE">](https://t.me/lnbits)
|
||||||
|
[<img src="https://img.shields.io/badge/supported_by-%3E__OpenSats-f97316">](https://opensats.org)
|
||||||
|
|
||||||
|
# LNbits Super User (SU)
|
||||||
|
|
||||||
|
**Table of Contents**
|
||||||
|
|
||||||
|
- [What is the Super User?](#what-is-the-super-user)
|
||||||
|
- [When is the Super User created?](#when-is-the-super-user-created)
|
||||||
|
- [Disabeling the Admin UI](#disabeling-the-admin-ui)
|
||||||
|
- [Super User identity and storage](#super-user-identity-and-storage)
|
||||||
|
- [Security model since v1](#security-model-since-v1)
|
||||||
|
- [Admin vs Super User](#admin-vs-super-user)
|
||||||
|
- [Operational guidance](#operational-guidance)
|
||||||
|
- [Additional guides](#additional-guides)
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>TLDR</strong></summary>
|
||||||
|
|
||||||
|
- **No Admin UI → No Super User.** The Super User (SU) exists only when `LNBITS_ADMIN_UI=true`.
|
||||||
|
- **Why SU exists:** SU can do a few high impact actions regular admins cannot, like **changing the funding source**, **restarting the server from the UI**, and **crediting or debiting accounts**.
|
||||||
|
- **Login changes since v1:** Logging in by **user ID** for SU and admins is **disabled**. On first visit after enabling the Admin UI you will be prompted to set a **username and password** for the SU.
|
||||||
|
- **Trust model:** Admins and the SU share about **99 percent of the same powers**, but the SU is the one trusted with funding source control and cannot be demoted by regular admins.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
## What is the Super User?
|
||||||
|
|
||||||
|
The **Super User** is the owner-operator account of an LNbits instance. Think of it as your “break glass” operator with a few capabilities that are intentionally reserved for the person ultimately responsible for the server and the funding rails.
|
||||||
|
|
||||||
|
The SU is created alongside the [Admin UI](./admin_ui.md) and is meant to keep enviroment operations pleasant in the UI while keeping the most sensitive knobs in trusted hands.
|
||||||
|
|
||||||
|
**Key SU capabilities**
|
||||||
|
|
||||||
|
- **Change the funding source** for the instance
|
||||||
|
- **Restart the LNbits server** from the web UI
|
||||||
|
- **Credit or debit accounts** for operational corrections
|
||||||
|
|
||||||
|
> Note
|
||||||
|
> These are separated from regular admin tasks on purpose. It helps maintain least privilege and reduces the chance of accidental or malicious changes.
|
||||||
|
|
||||||
|
## Admin vs Super User
|
||||||
|
|
||||||
|
| Capability | Admin | Super User |
|
||||||
|
| ------------------------ | ---------- | ---------- |
|
||||||
|
| View Admin UI | If enabled | If enabled |
|
||||||
|
| Change funding source | — | ✓ |
|
||||||
|
| Credit or debit accounts | — | ✓ |
|
||||||
|
| Restart server from UI | — | ✓ |
|
||||||
|
| Manage users and wallets | ✓ | ✓ |
|
||||||
|
| Instance-level settings | ✓ | ✓ |
|
||||||
|
| Manage notifications | ✓ | ✓ |
|
||||||
|
| Exchange rates | ✓ | ✓ |
|
||||||
|
| View all Payments | ✓ | ✓ |
|
||||||
|
|
||||||
|
**Why both roles?**
|
||||||
|
In many teams the person running the server prefers to **delegate day-to-day admin work** while keeping funding and final authority safe. Admins can do almost everything; the SU retains the last few high risk powers.
|
||||||
|
|
||||||
|
## When is the Super User created?
|
||||||
|
|
||||||
|
- The SU is created **only** when you enable the Admin UI: `LNBITS_ADMIN_UI=true`.
|
||||||
|
- If the Admin UI is **disabled**, there is **no SU** and all SU-only UI is hidden.
|
||||||
|
|
||||||
|
## Disabeling the Admin UI
|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> Read the [Admin UI guide](./admin_ui.md) before Disabeling. You are turning on a management surface; do it deliberately.
|
||||||
|
|
||||||
|
Set the environment variable in your deployment:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# .env
|
||||||
|
LNBITS_ADMIN_UI=false
|
||||||
|
```
|
||||||
|
|
||||||
|
## Super User identity and storage
|
||||||
|
|
||||||
|
LNbits stores the **Super User ID** at:
|
||||||
|
|
||||||
|
```
|
||||||
|
/lnbits/data/.super_user
|
||||||
|
```
|
||||||
|
|
||||||
|
- Back this up along with the rest of `/lnbits/data` as part of your secure backup routine.
|
||||||
|
- **Changing who is the SU** can only be done by someone with **CLI access to the host OS** where LNbits runs. **Regular admins cannot revoke or replace the SU in the Admin UI.**
|
||||||
|
|
||||||
|
## Security model since v1
|
||||||
|
|
||||||
|
- **User-ID logins are disabled** for SU and admin roles.
|
||||||
|
- **Credentialed login is required:** set a **username and password** for the SU at first run of the Admin UI.
|
||||||
|
- **SU secrecy:** Regular users and admins **cannot discover the SU user ID** through normal UI flows.
|
||||||
|
|
||||||
|
## Operational guidance
|
||||||
|
|
||||||
|
These are practical tips for running a safe and friendly instance.
|
||||||
|
|
||||||
|
- It is normal to **delegate admin** duties to trusted people. Admins have about **99 percent** of SU powers for day-to-day work.
|
||||||
|
- Keep the **SU** reserved for the person legally or operationally responsible for the **funding source**.
|
||||||
|
- Use admin roles for regular day-to-day management and keep the SU for reserved SU tasks only.
|
||||||
|
|
||||||
|
## Additional guides
|
||||||
|
|
||||||
|
- **[Admin UI](./admin_ui.md)** — Manage server settings in the browser instead of editing `.env` or using the CLI for routine tasks.
|
||||||
|
- **[User Roles](./User_Roles.md)** — Overview of roles and what they can do.
|
||||||
|
- **[Funding sources](./funding-sources_table.md)** — Available options and how to enable and configure them.
|
||||||
|
- **[Install LNBits](./installation.md)** — Choose your prefared way to install LNBits.
|
||||||
|
|
||||||
|
## 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](https://demo.lnbits.com/tipjar/DwaUiE4kBX6mUW6pj3X5Kg) or visit our [Shop](https://shop.lnbits.de)
|
||||||
|
|
||||||
|
[](https://shop.lnbits.com/)
|
||||||
|
[](https://shop.lnbits.com/)
|
||||||
|
[](https://my.lnbits.com/login)
|
||||||
|
[](https://news.lnbits.com/)
|
||||||
|
[](https://extensions.lnbits.com/)
|
||||||
96
docs/guide/user_roles.md
Normal file
96
docs/guide/user_roles.md
Normal file
|
|
@ -0,0 +1,96 @@
|
||||||
|
<a href="https://lnbits.com" target="_blank" rel="noopener noreferrer">
|
||||||
|
<picture>
|
||||||
|
<source media="(prefers-color-scheme: dark)" srcset="https://i.imgur.com/QE6SIrs.png">
|
||||||
|
<img src="https://i.imgur.com/fyKPgVT.png" alt="LNbits" style="width:300px">
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
[<img src="https://img.shields.io/badge/community_chat-Telegram-24A1DE">](https://t.me/lnbits)
|
||||||
|
[<img src="https://img.shields.io/badge/supported_by-%3E__OpenSats-f97316">](https://opensats.org)
|
||||||
|
|
||||||
|
# LNbits Roles: A Quick Overview
|
||||||
|
|
||||||
|
### Understand **who can do what** in seconds: `Super User`, `Admin`, and `Regular User`.
|
||||||
|
|
||||||
|
**Jump to:**
|
||||||
|
[Roles at a Glance](#roles-at-a-glance) •
|
||||||
|
[Super User](#super-user--master-control) •
|
||||||
|
[Admin](#admin--day-to-day-manager) •
|
||||||
|
[Regular User](#regular-user--everyday-use) •
|
||||||
|
[Best Practices](#best-practices) •
|
||||||
|
[Additional Guides](#additional-guides)
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Roles at a Glance
|
||||||
|
|
||||||
|
| Capability | **Super User** (owner) | **Admin** (manager) | **Regular User** (end user) |
|
||||||
|
| -------------------------------- | :--------------------: | :-----------------: | :-------------------------: |
|
||||||
|
| Change **funding source** | ✅ | ❌ | ❌ |
|
||||||
|
| Credit/Debit any wallet | ✅ | ❌ | ❌ |
|
||||||
|
| Manage Admins & Users | ✅ | ✅ | ❌ |
|
||||||
|
| Enable/disable extensions | ✅ | ✅ | ❌ |
|
||||||
|
| Use wallets & allowed extensions | ✅ | ✅ | ✅ |
|
||||||
|
|
||||||
|
> **Plain talk:** **Super User** = Owner • **Admin** = Trusted manager • **Regular User** = End user
|
||||||
|
|
||||||
|
## Role Snapshots
|
||||||
|
|
||||||
|
### Super User — Master Control
|
||||||
|
|
||||||
|
For initial setup and rare, high-impact changes.
|
||||||
|
|
||||||
|
- Configure **server-level settings** (e.g., funding source).
|
||||||
|
- **Credit/Debit** any wallet.
|
||||||
|
- Create and manage initial **Admin(s)**.
|
||||||
|
|
||||||
|
> **Sign-in:** username + password (v1+). The old query-string login is retired.
|
||||||
|
|
||||||
|
### Admin — Day-to-Day Manager
|
||||||
|
|
||||||
|
For running the service without touching the most sensitive knobs.
|
||||||
|
|
||||||
|
- Manage **Users**, **Admins**, and **Extensions** in the Admin UI.
|
||||||
|
- Adjust security-related settings (e.g., `rate_limiter`, `ip_blocker`).
|
||||||
|
- Handle operations settings (e.g., `service_fee`, `invoice_expiry`).
|
||||||
|
- Build brand design in **Site Customization**.
|
||||||
|
- Update user accounts.
|
||||||
|
|
||||||
|
**Typical tasks:** onboarding users, enabling extensions, tidying wallets, reviewing activity.
|
||||||
|
|
||||||
|
> **Sign-in:** username + password (v1+). The old query-string login is retired.
|
||||||
|
|
||||||
|
### Regular User — Everyday Use
|
||||||
|
|
||||||
|
For using LNbits, not administering it.
|
||||||
|
|
||||||
|
- Access **personal wallets** and **allowed extensions**.
|
||||||
|
- No server/admin privileges.
|
||||||
|
|
||||||
|
**Typical tasks:** receive and send payments, use enabled extensions.
|
||||||
|
|
||||||
|
## Best Practices
|
||||||
|
|
||||||
|
- **Minimize risk:** Reserve **Super User** for rare, sensitive actions (funding source, debit/credit). Use **Admin** for daily operations.
|
||||||
|
- **Keep access tidy:** Review your Admin list occasionally; remove unused accounts.
|
||||||
|
- **Change management:** Test risky changes (like funding) in a staging setup first.
|
||||||
|
|
||||||
|
## Additional Guides
|
||||||
|
|
||||||
|
- **[Admin UI](./admin_ui.md)** — Manage server settings via a clean UI (avoid editing `.env` by hand).
|
||||||
|
- **[Super User](./super_user.md)** — Deep dive on responsibilities and safe usage patterns.
|
||||||
|
- **[Funding sources](./funding-sources_table.md)** — 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](https://demo.lnbits.com/tipjar/DwaUiE4kBX6mUW6pj3X5Kg) or visit our [Shop](https://shop.lnbits.de)
|
||||||
|
|
||||||
|
[](https://shop.lnbits.com/)
|
||||||
|
[](https://shop.lnbits.com/)
|
||||||
|
[](https://my.lnbits.com/login)
|
||||||
|
[](https://news.lnbits.com/)
|
||||||
|
[](https://extensions.lnbits.com/)
|
||||||
|
|
@ -4,177 +4,367 @@ title: Backend wallets
|
||||||
nav_order: 3
|
nav_order: 3
|
||||||
---
|
---
|
||||||
|
|
||||||
|
<a href="https://lnbits.com" target="_blank" rel="noopener noreferrer">
|
||||||
|
<picture>
|
||||||
|
<source media="(prefers-color-scheme: dark)" srcset="https://i.imgur.com/QE6SIrs.png">
|
||||||
|
<img src="https://i.imgur.com/fyKPgVT.png" alt="LNbits" style="width:300px">
|
||||||
|
</picture>
|
||||||
|
</a>
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
[<img src="https://img.shields.io/badge/community_chat-Telegram-24A1DE">](https://t.me/lnbits)
|
||||||
|
[<img src="https://img.shields.io/badge/supported_by-%3E__OpenSats-f97316">](https://opensats.org)
|
||||||
|
|
||||||
# Backend wallets
|
# Backend wallets
|
||||||
|
|
||||||
LNbits can run on top of many Lightning Network funding sources with more being added regularly.
|
**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.
|
||||||
|
|
||||||
A backend wallet can be configured using the following LNbits environment variables:
|
**What stays the same when you switch backends**
|
||||||
|
|
||||||
You can [compare the LNbits compatible Lightning Network funding sources here](wallets.md).
|
- 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](funding-sources-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 (runes)](#clnrest-runes) | [LND (REST)](#lnd-rest) | [OpenNode](#opennode) |
|
||||||
|
| [CoreLightning](#corelightning) | [LND (gRPC)](#lnd-grpc) | [Blink](#blink) |
|
||||||
|
| [CoreLightning REST](#corelightning-rest) | [LNbits](#lnbits) | [Alby](#alby) |
|
||||||
|
| [Spark (Core Lightning)](#spark-core-lightning) | [LNPay](#lnpay) | [Boltz](#boltz) |
|
||||||
|
| [Cliche Wallet](#cliche-wallet) | [ZBD](#zbd) | [Phoenixd](#phoenixd) |
|
||||||
|
| [Breez SDK](#breez-sdk) | [Breez Liquid SDK](#breez-liquid-sdk) | [Nostr Wallet Connect](#nostr-wallet-connect-nwc) |
|
||||||
|
| [Strike](#strike) | [Eclair (ACINQ)](#eclair-acinq) | [LN.tips](#lntips) |
|
||||||
|
| [Fake Wallet](#fake-wallet) | | |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<a id="clnrest-runes"></a>
|
||||||
|
|
||||||
### CLNRest (using [runes](https://docs.corelightning.org/reference/lightning-createrune))
|
### CLNRest (using [runes](https://docs.corelightning.org/reference/lightning-createrune))
|
||||||
|
|
||||||
[Core lightning Rest API docs](https://docs.corelightning.org/docs/rest)
|
[Core Lightning REST API docs](https://docs.corelightning.org/docs/rest)
|
||||||
|
|
||||||
Should also work with the [Rust version of CLNRest](https://github.com/daywalker90/clnrest-rs)
|
Should also work with the [Rust version of CLNRest](https://github.com/daywalker90/clnrest-rs)
|
||||||
|
|
||||||
- `LNBITS_BACKEND_WALLET_CLASS`: **CLNRestWallet**
|
**Environment variables**
|
||||||
|
|
||||||
|
- `LNBITS_BACKEND_WALLET_CLASS`: `CLNRestWallet`
|
||||||
- `CLNREST_URL`: `https://127.0.0.1:3010`
|
- `CLNREST_URL`: `https://127.0.0.1:3010`
|
||||||
- `CLNREST_CA`: `/home/lightningd/.lightning/bitcoin/ca.pem` (or the content of the `ca.pem` file)
|
- `CLNREST_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 `server.pem` file)
|
- `CLNREST_CERT`: `/home/lightningd/.lightning/bitcoin/server.pem` (or the content of the file)
|
||||||
- `CLNREST_READONLY_RUNE`: `lightning-cli createrune restrictions='[["method=listfunds", "method=listpays", "method=listinvoices", "method=getinfo", "method=summary", "method=waitanyinvoice"]]' | jq -r .rune`
|
- `CLNREST_LAST_PAY_INDEX`: `lightning-cli listinvoices | jq -r '.invoices | map(.created_index) | max'`
|
||||||
- `CLNREST_INVOICE_RUNE`: `lightning-cli createrune restrictions='[["method=invoice"], ["pnameamount_msat<1000001"], ["pnamelabel^LNbits"], ["rate=60"]]' | jq -r .rune`
|
|
||||||
- `CLNREST_PAY_RUNE`: `lightning-cli createrune restrictions='[["method=pay"], ["pinvbolt11_amount<1001"], ["pnamelabel^LNbits"], ["rate=1"]]' | jq -r .rune`
|
|
||||||
- `CLNREST_RENEPAY_RUNE`: `lightning-cli createrune restrictions='[["method=renepay"], ["pinvinvstring_amount<1001"], ["pnamelabel^LNbits"], ["rate=1"]]' | jq -r .rune`
|
|
||||||
- `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)
|
- `CLNREST_NODEID`: `lightning-cli getinfo | jq -r .id` (only required for v23.08)
|
||||||
|
|
||||||
### CoreLightning
|
**Create runes (copy/paste)**
|
||||||
|
|
||||||
- `LNBITS_BACKEND_WALLET_CLASS`: **CoreLightningWallet**
|
```bash
|
||||||
- `CORELIGHTNING_RPC`: /file/path/lightning-rpc
|
# 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
|
||||||
|
```
|
||||||
|
|
||||||
### CoreLightning REST
|
```bash
|
||||||
|
# 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
|
||||||
|
```
|
||||||
|
|
||||||
This is the old REST interface that uses [Ride The Lightning/c-lightning-REST](https://github.com/Ride-The-Lightning/c-lightning-REST)
|
```bash
|
||||||
|
# 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
|
||||||
|
```
|
||||||
|
|
||||||
- `LNBITS_BACKEND_WALLET_CLASS`: **CoreLightningRestWallet**
|
```bash
|
||||||
- `CORELIGHTNING_REST_URL`: http://127.0.0.1:8185/
|
# Renepay: invstring amount < 1001 (msat), label must start with "LNbits", 1 req/min
|
||||||
- `CORELIGHTNING_REST_MACAROON`: /file/path/admin.macaroon or Base64/Hex
|
lightning-cli createrune \
|
||||||
- `CORELIGHTNING_REST_CERT`: /home/lightning/clnrest/tls.cert
|
restrictions='[["method=renepay"], ["pinvinvstring_amount<1001"], ["pnamelabel^LNbits"], ["rate=1"]]' \
|
||||||
|
| jq -r .rune
|
||||||
|
```
|
||||||
|
|
||||||
### Spark (Core Lightning)
|
Set the resulting values into:
|
||||||
|
|
||||||
- `LNBITS_BACKEND_WALLET_CLASS`: **SparkWallet**
|
- `CLNREST_READONLY_RUNE`
|
||||||
- `SPARK_URL`: http://10.147.17.230:9737/rpc
|
- `CLNREST_INVOICE_RUNE`
|
||||||
- `SPARK_TOKEN`: secret_access_key
|
- `CLNREST_PAY_RUNE`
|
||||||
|
- `CLNREST_RENEPAY_RUNE`
|
||||||
|
|
||||||
### LND (REST)
|
## CoreLightning
|
||||||
|
|
||||||
- `LNBITS_BACKEND_WALLET_CLASS`: **LndRestWallet**
|
**Required env vars**
|
||||||
- `LND_REST_ENDPOINT`: http://10.147.17.230:8080/
|
|
||||||
- `LND_REST_CERT`: /file/path/tls.cert
|
|
||||||
- `LND_REST_MACAROON`: /file/path/admin.macaroon or Base64/Hex
|
|
||||||
|
|
||||||
or
|
- `LNBITS_BACKEND_WALLET_CLASS`: `CoreLightningWallet`
|
||||||
|
- `CORELIGHTNING_RPC`: `/file/path/lightning-rpc`
|
||||||
|
|
||||||
- `LND_REST_MACAROON_ENCRYPTED`: eNcRyPtEdMaCaRoOn
|
## CoreLightning REST
|
||||||
|
|
||||||
### LND (gRPC)
|
Old REST interface using [RTL c-lightning-REST](https://github.com/Ride-The-Lightning/c-lightning-REST)
|
||||||
|
|
||||||
- `LNBITS_BACKEND_WALLET_CLASS`: **LndWallet**
|
**Required env vars**
|
||||||
- `LND_GRPC_ENDPOINT`: ip_address
|
|
||||||
- `LND_GRPC_PORT`: port
|
|
||||||
- `LND_GRPC_CERT`: /file/path/tls.cert
|
|
||||||
- `LND_GRPC_MACAROON`: /file/path/admin.macaroon or Base64/Hex
|
|
||||||
|
|
||||||
You can also use an AES-encrypted macaroon (more info) instead by using
|
- `LNBITS_BACKEND_WALLET_CLASS`: `CoreLightningRestWallet`
|
||||||
|
- `CORELIGHTNING_REST_URL`: `http://127.0.0.1:8185/`
|
||||||
|
- `CORELIGHTNING_REST_MACAROON`: `/file/path/admin.macaroon` or Base64/Hex
|
||||||
|
- `CORELIGHTNING_REST_CERT`: `/home/lightning/clnrest/tls.cert`
|
||||||
|
|
||||||
- `LND_GRPC_MACAROON_ENCRYPTED`: eNcRyPtEdMaCaRoOn
|
## Spark (Core Lightning)
|
||||||
|
|
||||||
To encrypt your macaroon, run `uv run lnbits-cli encrypt macaroon`.
|
**Required env vars**
|
||||||
|
|
||||||
### LNbits
|
- `LNBITS_BACKEND_WALLET_CLASS`: `SparkWallet`
|
||||||
|
- `SPARK_URL`: `http://10.147.17.230:9737/rpc`
|
||||||
|
- `SPARK_TOKEN`: `secret_access_key`
|
||||||
|
|
||||||
- `LNBITS_BACKEND_WALLET_CLASS`: **LNbitsWallet**
|
## LND (REST)
|
||||||
- `LNBITS_ENDPOINT`: e.g. https://lnbits.com
|
|
||||||
- `LNBITS_KEY`: lnbitsAdminKey
|
|
||||||
|
|
||||||
### LNPay
|
**Required env vars**
|
||||||
|
|
||||||
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.
|
- `LNBITS_BACKEND_WALLET_CLASS`: `LndRestWallet`
|
||||||
|
- `LND_REST_ENDPOINT`: `http://10.147.17.230:8080/`
|
||||||
|
- `LND_REST_CERT`: `/file/path/tls.cert`
|
||||||
|
- `LND_REST_MACAROON`: `/file/path/admin.macaroon` or Base64/Hex
|
||||||
|
|
||||||
- `LNBITS_BACKEND_WALLET_CLASS`: **LNPayWallet**
|
or:
|
||||||
- `LNPAY_API_ENDPOINT`: https://api.lnpay.co/v1/
|
|
||||||
- `LNPAY_API_KEY`: sak_apiKey
|
|
||||||
- `LNPAY_WALLET_KEY`: waka_apiKey
|
|
||||||
|
|
||||||
### OpenNode
|
- `LND_REST_MACAROON_ENCRYPTED`: `eNcRyPtEdMaCaRoOn`
|
||||||
|
|
||||||
For the invoice to work you must have a publicly accessible URL in your LNbits. No manual webhook setting is necessary.
|
## LND (gRPC)
|
||||||
|
|
||||||
- `LNBITS_BACKEND_WALLET_CLASS`: **OpenNodeWallet**
|
**Required env vars**
|
||||||
- `OPENNODE_API_ENDPOINT`: https://api.opennode.com/
|
|
||||||
- `OPENNODE_KEY`: opennodeAdminApiKey
|
|
||||||
|
|
||||||
### Blink
|
- `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 Base64/Hex
|
||||||
|
|
||||||
For the invoice to work you must have a publicly accessible URL in your LNbits. No manual webhook setting is necessary. You can generate a Blink API key after logging in or creating a new Blink account at: https://dashboard.blink.sv. For more info visit: https://dev.blink.sv/api/auth#create-an-api-key```
|
You can also use an AES-encrypted macaroon instead:
|
||||||
|
|
||||||
- `LNBITS_BACKEND_WALLET_CLASS`: **BlinkWallet**
|
- `LND_GRPC_MACAROON_ENCRYPTED`: `eNcRyPtEdMaCaRoOn`
|
||||||
- `BLINK_API_ENDPOINT`: https://api.blink.sv/graphql
|
|
||||||
- `BLINK_WS_ENDPOINT`: wss://ws.blink.sv/graphql
|
|
||||||
- `BLINK_TOKEN`: BlinkToken
|
|
||||||
|
|
||||||
### Alby
|
To encrypt your macaroon:
|
||||||
|
|
||||||
For the invoice to work you must have a publicly accessible URL in your LNbits. No manual webhook setting is necessary. You can generate an alby access token here: https://getalby.com/developer/access_tokens/new
|
```bash
|
||||||
|
uv run lnbits-cli encrypt macaroon
|
||||||
|
```
|
||||||
|
|
||||||
- `LNBITS_BACKEND_WALLET_CLASS`: **AlbyWallet**
|
## LNbits
|
||||||
- `ALBY_API_ENDPOINT`: https://api.getalby.com/
|
|
||||||
- `ALBY_ACCESS_TOKEN`: AlbyAccessToken
|
|
||||||
|
|
||||||
### Boltz
|
**Required env vars**
|
||||||
|
|
||||||
This funding source connects to a running [boltz-client](https://docs.boltz.exchange/v/boltz-client) and handles all lightning payments through submarine swaps on the liquid network.
|
- `LNBITS_BACKEND_WALLET_CLASS`: `LNbitsWallet`
|
||||||
You can configure the daemon to run in standalone mode by `standalone = True` in the config file or using the cli flag (`boltzd --standalone`).
|
- `LNBITS_ENDPOINT`: for example `https://lnbits.com`
|
||||||
Once running, you can create a liquid wallet using `boltzcli wallet create lnbits lbtc`.
|
- `LNBITS_KEY`: `lnbitsAdminKey`
|
||||||
|
|
||||||
- `LNBITS_BACKEND_WALLET_CLASS`: **BoltzWallet**
|
## LNPay
|
||||||
- `BOLTZ_CLIENT_ENDPOINT`: 127.0.0.1:9002
|
|
||||||
- `BOLTZ_CLIENT_MACAROON`: /home/bob/.boltz/macaroons/admin.macaroon or Base64/Hex
|
|
||||||
- `BOLTZ_CLIENT_CERT`: /home/bob/.boltz/tls.cert or Base64/Hex
|
|
||||||
- `BOLTZ_CLIENT_WALLET`: lnbits
|
|
||||||
|
|
||||||
### ZBD
|
For the invoice listener to work you must have a publicly accessible URL in your LNbits and set up [LNPay webhooks](https://dashboard.lnpay.co/webhook/) pointing to `<your LNbits host>/wallet/webhook` with the event **Wallet Receive** and no secret. Example: [https://mylnbits/wallet/webhook](`https://mylnbits/wallet/webhook).
|
||||||
|
|
||||||
For the invoice to work you must have a publicly accessible URL in your LNbits. No manual webhook setting is necessary. You can generate an ZBD API Key here: https://zbd.dev/docs/dashboard/projects/api
|
**Required env vars**
|
||||||
|
|
||||||
- `LNBITS_BACKEND_WALLET_CLASS`: **ZBDWallet**
|
- `LNBITS_BACKEND_WALLET_CLASS`: `LNPayWallet`
|
||||||
- `ZBD_API_ENDPOINT`: https://api.zebedee.io/v0/
|
- `LNPAY_API_ENDPOINT`: `https://api.lnpay.co/v1/`
|
||||||
- `ZBD_API_KEY`: ZBDApiKey
|
- `LNPAY_API_KEY`: `sak_apiKey`
|
||||||
|
- `LNPAY_WALLET_KEY`: `waka_apiKey`
|
||||||
|
|
||||||
### Phoenixd
|
## OpenNode
|
||||||
|
|
||||||
For the invoice to work you must have a publicly accessible URL in your LNbits. You can get a phoenixd API key from the install
|
For the invoice to work you must have a publicly accessible URL in your LNbits. No manual webhook configuration required.
|
||||||
~/.phoenix/phoenix.conf, also see the documentation for phoenixd.
|
|
||||||
|
|
||||||
- `LNBITS_BACKEND_WALLET_CLASS`: **PhoenixdWallet**
|
**Required env vars**
|
||||||
- `PHOENIXD_API_ENDPOINT`: http://localhost:9740/
|
|
||||||
- `PHOENIXD_API_PASSWORD`: PhoenixdApiPassword
|
|
||||||
|
|
||||||
### Breez SDK
|
- `LNBITS_BACKEND_WALLET_CLASS`: `OpenNodeWallet`
|
||||||
|
- `OPENNODE_API_ENDPOINT`: `https://api.opennode.com/`
|
||||||
|
- `OPENNODE_KEY`: `opennodeAdminApiKey`
|
||||||
|
|
||||||
A Greenlight invite code or Greenlight partner certificate/key can be used to register a new node with Greenlight. If the Greenlight node already exists, neither are required.
|
## Blink
|
||||||
|
|
||||||
- `LNBITS_BACKEND_WALLET_CLASS`: **BreezSdkWallet**
|
For the invoice to work you must have a publicly accessible URL in your LNbits. No manual webhook configuration required.
|
||||||
- `BREEZ_API_KEY`: ...
|
|
||||||
- `BREEZ_GREENLIGHT_SEED`: ...
|
|
||||||
- `BREEZ_GREENLIGHT_INVITE_CODE`: ...
|
|
||||||
- `BREEZ_GREENLIGHT_DEVICE_KEY`: /path/to/breezsdk/device.pem or Base64/Hex
|
|
||||||
- `BREEZ_GREENLIGHT_DEVICE_CERT`: /path/to/breezsdk/device.crt or Base64/Hex
|
|
||||||
|
|
||||||
### Breez Liquid SDK
|
You can generate a Blink API key at [https://dashboard.blink.sv](https://dashboard.blink.sv). More info: [https://dev.blink.sv/api/auth#create-an-api-key](https://dev.blink.sv/api/auth#create-an-api-key)
|
||||||
|
|
||||||
This funding source leverages the [Breez SDK - Liquid](https://sdk-doc-liquid.breez.technology/) to manage all Lightning payments via submarine swaps on the Liquid network. To get started, simply provide a mnemonic seed phrase. The easiest way to generate one is by using a liquid wallet, such as [Blockstream Green](https://blockstream.com/green/). Once generated, you can copy the seed to your environment variable or enter it in the admin UI.
|
**Required env vars**
|
||||||
|
|
||||||
- `LNBITS_BACKEND_WALLET_CLASS`: **BreezLiquidSdkWallet**
|
- `LNBITS_BACKEND_WALLET_CLASS`: `BlinkWallet`
|
||||||
- `BREEZ_LIQUID_SEED`: ...
|
- `BLINK_API_ENDPOINT`: `https://api.blink.sv/graphql`
|
||||||
|
- `BLINK_WS_ENDPOINT`: `wss://ws.blink.sv/graphql`
|
||||||
|
- `BLINK_TOKEN`: `BlinkToken`
|
||||||
|
|
||||||
Each submarine swap incurs service and on-chain fees. To account for these, you may need to increase the reserve fee in the admin UI by navigating to **Settings -> Funding**, or by setting the following environment variables:
|
## Alby
|
||||||
|
|
||||||
- `LNBITS_RESERVE_FEE_MIN`: ...
|
For the invoice to work you must have a publicly accessible URL in your LNbits. No manual webhook configuration required.
|
||||||
- `LNBITS_RESERVE_FEE_PERCENT`: ...
|
|
||||||
|
|
||||||
### Cliche Wallet
|
Generate an Alby access token here: [https://getalby.com/developer/access_tokens/new](https://getalby.com/developer/access_tokens/new)
|
||||||
|
|
||||||
- `CLICHE_ENDPOINT`: ws://127.0.0.1:12000
|
**Required env vars**
|
||||||
|
|
||||||
### Nostr Wallet Connect (NWC)
|
- `LNBITS_BACKEND_WALLET_CLASS`: `AlbyWallet`
|
||||||
|
- `ALBY_API_ENDPOINT`: `https://api.getalby.com/`
|
||||||
|
- `ALBY_ACCESS_TOKEN`: `AlbyAccessToken`
|
||||||
|
|
||||||
To use NWC as funding source in LNbits you'll need a pairing URL (also known as pairing secret) from a NWC service provider. You can find a list of providers [here](https://github.com/getAlby/awesome-nwc?tab=readme-ov-file#nwc-wallets).
|
## Boltz
|
||||||
|
|
||||||
You can configure Nostr Wallet Connect in the admin ui or using the following environment variables:
|
This connects to a running [boltz-client](https://docs.boltz.exchange/v/boltz-client) and handles Lightning payments through submarine swaps on the Liquid network.
|
||||||
|
|
||||||
- `LNBITS_BACKEND_WALLET_CLASS`: **NWCWallet**
|
You can run the daemon in standalone mode via `standalone = True` in the config or `boltzd --standalone`. Create a Liquid wallet with:
|
||||||
- `NWC_PAIRING_URL`: **nostr+walletconnect://...your...pairing...secret...**
|
|
||||||
|
```bash
|
||||||
|
boltzcli wallet create lnbits lbtc
|
||||||
|
```
|
||||||
|
|
||||||
|
**Required env vars**
|
||||||
|
|
||||||
|
- `LNBITS_BACKEND_WALLET_CLASS`: `BoltzWallet`
|
||||||
|
- `BOLTZ_CLIENT_ENDPOINT`: `127.0.0.1:9002`
|
||||||
|
- `BOLTZ_CLIENT_MACAROON`: `/home/bob/.boltz/macaroons/admin.macaroon` or Base64/Hex
|
||||||
|
- `BOLTZ_CLIENT_CERT`: `/home/bob/.boltz/tls.cert` or Base64/Hex
|
||||||
|
- `BOLTZ_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](https://zbd.dev/docs/dashboard/projects/api)
|
||||||
|
|
||||||
|
**Required env vars**
|
||||||
|
|
||||||
|
- `LNBITS_BACKEND_WALLET_CLASS`: `ZBDWallet`
|
||||||
|
- `ZBD_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`: `PhoenixdWallet`
|
||||||
|
- `PHOENIXD_API_ENDPOINT`: `http://localhost:9740/`
|
||||||
|
- `PHOENIXD_API_PASSWORD`: `PhoenixdApiPassword`
|
||||||
|
|
||||||
|
## Eclair (ACINQ)
|
||||||
|
|
||||||
|
<a id="eclair-acinq"></a>
|
||||||
|
|
||||||
|
Connect to an existing Eclair node so your backend handles invoices and payments.
|
||||||
|
|
||||||
|
**Required env vars**
|
||||||
|
|
||||||
|
- `LNBITS_BACKEND_WALLET_CLASS`: `EclairWallet`
|
||||||
|
- `ECLAIR_URL`: `http://127.0.0.1:8283`
|
||||||
|
- `ECLAIR_PASSWORD`: `eclairpw`
|
||||||
|
|
||||||
|
## Fake Wallet
|
||||||
|
|
||||||
|
<a id="fake-wallet"></a>
|
||||||
|
|
||||||
|
A testing-only backend that mints accounting units inside LNbits accounting (no real sats).
|
||||||
|
|
||||||
|
**Required env vars**
|
||||||
|
|
||||||
|
- `LNBITS_BACKEND_WALLET_CLASS`: `FakeWallet`
|
||||||
|
- `FAKE_SECRET`: `ToTheMoon1`
|
||||||
|
- `FAKE_UNIT`: `sats`
|
||||||
|
|
||||||
|
## LN.tips
|
||||||
|
|
||||||
|
<a id="lntips"></a>
|
||||||
|
|
||||||
|
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`: `LNTipsWallet`
|
||||||
|
- `LNTIPS_API_ENDPOINT`: `https://ln.tips`
|
||||||
|
- `LNTIPS_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`: `BreezSdkWallet`
|
||||||
|
- `BREEZ_API_KEY`: `...`
|
||||||
|
- `BREEZ_GREENLIGHT_SEED`: `...`
|
||||||
|
- `BREEZ_GREENLIGHT_INVITE_CODE`: `...`
|
||||||
|
- `BREEZ_GREENLIGHT_DEVICE_KEY`: `/path/to/breezsdk/device.pem` or Base64/Hex
|
||||||
|
- `BREEZ_GREENLIGHT_DEVICE_CERT`: `/path/to/breezsdk/device.crt` or Base64/Hex
|
||||||
|
|
||||||
|
## Breez Liquid SDK
|
||||||
|
|
||||||
|
This uses the [Breez SDK - Liquid](https://sdk-doc-liquid.breez.technology/) 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](https://blockstream.com/green/)) and set it in the environment or admin UI.
|
||||||
|
|
||||||
|
**Required env vars**
|
||||||
|
|
||||||
|
- `LNBITS_BACKEND_WALLET_CLASS`: `BreezLiquidSdkWallet`
|
||||||
|
- `BREEZ_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](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`: `NWCWallet`
|
||||||
|
- `NWC_PAIRING_URL`: `nostr+walletconnect://...your...pairing...secret...`
|
||||||
|
|
||||||
|
<a id="strike"></a>
|
||||||
|
|
||||||
|
## 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/](https://docs.strike.me/strike-oauth-connect/)
|
||||||
|
|
||||||
|
**Integration endpoints**
|
||||||
|
|
||||||
|
- `STRIKE_API_ENDPOINT`: `https://api.strike.me/v1`
|
||||||
|
- `STRIKE_API_KEY`: `YOUR_STRIKE_API_KEY`
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Additional Guides
|
||||||
|
|
||||||
|
- **[Admin UI](./admin_ui.md)** — Manage server settings via a clean UI (avoid editing `.env` by hand).
|
||||||
|
- **[User Roles](./User_Roles.md)** — Quick Overview of existing Roles in LNBits.
|
||||||
|
- **[Funding sources](./funding-sources_table.md)** — 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](https://demo.lnbits.com/tipjar/DwaUiE4kBX6mUW6pj3X5Kg) or visit our [Shop](https://shop.lnbits.de)
|
||||||
|
|
||||||
|
[](https://shop.lnbits.com/)
|
||||||
|
[](https://shop.lnbits.com/)
|
||||||
|
[](https://my.lnbits.com/login)
|
||||||
|
[](https://news.lnbits.com/)
|
||||||
|
[](https://extensions.lnbits.com/)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue