Skip to main content
The RGB Lightning Node (RLN) is an RGB-enabled Lightning Network daemon built on top of LDK. It lets you open payment channels that carry RGB assets and route RGB-denominated payments across the network with the same user experience and security model as standard Bitcoin Lightning payments.
RLN is early beta software. Run it on regtest or testnet first. The maintainers take no responsibility for loss of funds.

Prerequisites

Before starting, make sure you have the following available:

Installation

Build from Source

Clone the repository with its submodules:
Install the rgb-lightning-node binary:

Docker Image

Build the Docker image locally:

Running the Node

Each RLN daemon is started with rgb-lightning-node and requires the following arguments:

Regtest (Local Development)

Start the required Docker services (bitcoind, electrs, proxy):
Launch three nodes in separate shells:
Regtest unlock parameters:

Regtest Helper Commands

Regtest with Docker

To run a node inside Docker while using the shared regtest network:
Data is persisted in the RLNdata1 volume. To start fresh:
When unlocking a node in this mode use:

Testnet3

No local Docker services needed — the node uses public infrastructure:
Testnet3 unlock parameters:

Testnet4

Same as testnet3, with the following differences:

Authentication

RLN uses Biscuit tokens for API authentication. For production deployments never use --disable-authentication.

One-Time Setup

Install the Biscuit CLI and generate a root keypair:
Store your private key in a secret manager (e.g. HashiCorp Vault, AWS Secrets Manager). Anyone with the private key can mint valid tokens.
Start the node with the public key:

Minting Tokens

Three built-in roles are available: Admin (full access):
Read-only (GET endpoints only):
Custom (specific endpoints only):
Add an expiry date to any token:

Using Tokens

Pass the token in the Authorization header:
In the Swagger UI click the Authorize (lock) button, paste the token, and click Authorize.

Revoking Tokens

To revoke a token before its expiry:

Using the REST API

Once a daemon is running, interact with it via its REST API. Example — issue an RGB asset:

Key Endpoints

The complete list of endpoints with request/response schemas is available in the interactive Swagger UI at https://utexo-protocol.github.io/rgb-lightning-node.

Running a Local Swagger UI

You can also expose the OpenAPI spec locally:
Open http://localhost:8246 in your browser. If a daemon is running on one of the example ports you can call the APIs directly from the UI.

Running Tests

Integration tests use the same regtest services as regtest.sh (they cannot run simultaneously):

Production Checklist

1

Secure your private key

Store the Biscuit issuer private key in a dedicated secret manager. Never commit it to version control.
2

Enable authentication

Remove --disable-authentication and pass --root-public-key when starting the daemon.
3

Restrict network access

Expose only the daemon REST port (default 3001) to trusted clients. Firewall the LN peer port (9735) as appropriate.
4

Persist data

Mount the node data directory on durable storage (e.g. a named Docker volume or a cloud disk) to survive container restarts.
5

Monitor the daemon

Poll GET /nodeinfo and GET /networkinfo periodically to verify the node is reachable and in sync.
6

Backup regularly

Call POST /backup on a schedule and store the encrypted backup off-node.
7

Rotate tokens

Issue short-lived tokens with expiry dates and rotate them regularly. Revoke compromised tokens immediately via POST /revoketoken.

References