No description
  • Python 77.2%
  • HTML 10.5%
  • JavaScript 7.9%
  • Shell 3.9%
  • Makefile 0.5%
Find a file
padreug 9c36689506
Some checks failed
lint.yml / Merge pull request 'fix: accept null optional params in make_invoice and list_transactions' (#1) from fix/null-optional-params into main (push) Failing after 0s
Tests / test (push) Has been cancelled
Merge pull request 'fix: accept null optional params in make_invoice and list_transactions' (#1) from fix/null-optional-params into main
Reviewed-on: #1
2026-09-14 20:35:05 +00:00
.devcontainer update dev env and delete stale yarnpkg repo (#33) 2026-03-25 17:04:57 +01:00
.github/workflows fix: make integration services fail fast 2026-08-26 20:47:25 +02:00
static Changes to more pages (#29) 2026-06-03 11:47:38 +02:00
templates/nwcprovider Revert "Revert "Improve configuration form for readability and UX"" (#11) 2026-01-12 11:16:37 +00:00
tests fix: accept null optional params in make_invoice and list_transactions 2026-09-14 22:25:35 +02:00
.gitignore fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
.prettierrc fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
__init__.py fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
config.json chore: bump version to 1.1.3-aio.1 2026-09-14 22:34:27 +02:00
crud.py fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
description.md Changes to more pages (#29) 2026-06-03 11:47:38 +02:00
execution_queue.py fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
LICENSE bell and whistles 2024-07-24 13:00:59 +00:00
Makefile fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
manifest.json Update manifest.json 2025-02-15 17:09:54 +00:00
migrations.py refactor: use pynostr/coincurve instead of secp256k1 (#18) 2025-12-02 21:04:55 +01:00
models.py fix budget refresh logic for "Never" 2026-05-19 15:22:45 +02:00
nwcp.py fix: dispatch NWC requests concurrently 2026-08-26 13:06:39 +02:00
package-lock.json update dev env and delete stale yarnpkg repo (#33) 2026-03-25 17:04:57 +01:00
package.json update dev env and delete stale yarnpkg repo (#33) 2026-03-25 17:04:57 +01:00
paranoia.py relax printable checks (#21) 2025-12-23 10:15:30 +01:00
permission.py code quality fixes and cleanup 2024-09-07 09:09:22 +00:00
poetry.lock refactor: use pynostr/coincurve instead of secp256k1 (#18) 2025-12-02 21:04:55 +01:00
pyproject.toml make linter happy 2026-05-19 14:36:13 +00:00
README.md fix(docs): correct NWC configuration page location (#36) 2026-06-17 13:56:32 +01:00
tasks.py fix: accept null optional params in make_invoice and list_transactions 2026-09-14 22:25:35 +02:00
toc.md Added description for extension preview 2024-11-19 14:07:04 +00:00
uv.lock fix: use lnbits linting, change to uv (#9) 2025-09-12 09:30:16 +02:00
views.py fix json bug, move js to own file 2025-02-15 17:49:25 +00:00
views_api.py refactor: use pynostr/coincurve instead of secp256k1 (#18) 2025-12-02 21:04:55 +01:00

LNbits

License: MIT Built for LNbits

NWC Service Provider Extension for LNbits

Easily connect your LNbits wallets via NWC.

Installation

Install the extension via the .env file or through the admin UI on your LNbits server. More details can be found here.

Configuration

The LNbits NWC Service Provider requires a one-time setup before it can be used.
It relies on a Nostr relay, which can be either:

  • The LNbits Nostrclient browser extension
  • A third-party Nostr relay of your choice

Relay Configuration

Before you can start using the extension, you need to configure a Nostr relay.

This is the easiest option for most users. It allows you to run LNbits on a private network while connecting to NWC apps through a public Nostr relay.

  1. Choose a Nostr relay that supports NWC connections.
  2. Navigate to the NWC Service Provider admin page at /nwcprovider/admin (requires LNbits admin privileges).
    1. Enter your chosen relay URL in the Nostr Relay URL field (e.g. wss://relay.nostrconnect.com).
    2. Click Save.

Option 2: Use the LNbits Nostrclient extension

Note: This option only works if your LNbits instance is publicly accessible on the internet. Refer to the nostrclient documentation for more information.

  1. Install the Nostrclient extension in your browser.
  2. Open the extension.
    1. Add at least one relay (e.g. wss://relay.nostrconnect.com is a good choice for NWC connections).
    2. Open Settings and enable Expose Public WebSocket.

Connecting a NWC App

  1. In the NWC Service Provider extension, select the wallet you want to connect.
  2. Click the + button to add a new connection.
  3. Enter a description, expiry date (optional), permissions, and limits.
  4. Click Connect to create the connection.
  5. Use the generated pairing URL or QR code to connect your chosen app.

Extension Configuration

The configuration page of the NWC Service Provider extension is available at /nwcprovider/admin and requires LNbits admin privileges.

Configuration Options:

Key Description Default
relay URL of the nostr relay for dispatching and receiving NWC events. Use public relays or a custom one. Specify nostrclient to connect to the nostrclient extension. nostrclient
provider_key Nostr secret key of the NWC Service Provider. Random key generated on install
relay_alias Relay URL to display in pairing URLs. Set if different from relay. Empty (uses the relay value)
handle_missed_events Number of seconds to look back for processing events missed while offline. Setting it to 0 disables this functionality. 0

Warning

Do not change handle_missed_events from its default value of 0 unless you fully understand its implications. While a non-zero value may improve service quality under unstable conditions (e.g., poor connectivity or unreliable power), it can also lead to unexpected behavior. For example, in shared or community lnbits instances, where users are unaware of this functionality, they might assume a payment has failed and attempt to pay a new invoice with a different wallet, only for the instance to come back online and process the original payment request, potentially leading to duplicate payments.

For this reason, unless you are trying to tackle this specific issue, it is recommended to leave this setting at 0.

Powered by LNbits

LNbits is a free and open-source lightning accounts system.

Visit LNbits Shop Try myLNbits SaaS