Skip to content

Add LNbits as Lightning Backend Option #514

@Forte11Cuba

Description

@Forte11Cuba

Currently, Mostro only supports LND as a Lightning backend. Adding LNbits as an alternative would expand deployment possibilities and make it easier for new operators to get started.

Lowering the Barrier of Entry

Not all users with technical knowledge have the economic means to maintain their own Lightning node. With LNbits, that responsibility falls on the LNbits service operator, which allows any user to set up their own Mostro without worrying about those costs or complexities.

Infrastructure Diversity and Interoperability

An LND node providing multiple services has limitations: for example, if it is used both as a backend for LNbits and for Mostro, users of wallets connected to that same LND would not be able to use Mostro because LND does not support circular payments or autopayments. However, if LNbits runs on top of that LND and services are mounted through LNbits, this restriction disappears.
A real case: in the Cuba Bitcoin community, we use the LNbits instance lachispa.me, which also runs a Cashu mint precisely to overcome the autopayments limitation that a direct deployment over LND would have.

Concrete Use Cases for Mostro with LNbits

A local Bitcoin community may need a Mostro service for P2P exchange, but its leaders might not have the economic resources to operate their own Lightning node. If they are connected to a trusted LNbits instance, they can deploy their own Mostro and use that LNbits to process payments, while focusing on managing the P2P service itself.

Flexible Configuration

The idea is to allow selecting the backend that best fits the operator’s needs:

  • Direct LND: for operators with robust infrastructure.
  • LNbits: for communities and small-scale operators.

Example configuration:

[lightning]
backend = "lnd"   # or "lnbits"

# Existing LND config (unchanged)
lnd_cert_file = "..."
lnd_macaroon_file = "..."
lnd_grpc_host = "..."

# New LNbits config
lnbits_endpoint = "https://lachispa.me"
lnbits_api_key = "..."

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions