Skip to main content
The RGB Lightning Node (RLN) is Utexo’s self-hosted runtime for both direct, on-chain RGB operations and RGB-enabled Lightning payments. A single RLN daemon and REST API provides both paths, so integrators do not need a second on-chain node service.
Utexo supports on-chain RGB operations on mainnet. Lightning functionality is beta and testnet-only for now. Test your deployment on regtest or testnet before handling mainnet funds. The maintainers take no responsibility for loss of funds.

One node, two execution paths

The --network option selects the Bitcoin network for the entire node. It does not change Utexo’s support policy: use a mainnet deployment for on-chain RGB operations only. On testnet, you can exercise both the on-chain and Lightning paths through the same integration.

Prerequisites

Before starting, make sure you have the following available:
The /unlock request selects one Lightning chain backend: provide all four bitcoind_rpc_* fields, or provide indexer_url without bitcoind fields to use Esplora or Electrum. When bitcoind is the chain backend, an optional Electrum indexer_url can still be forwarded to rgb-lib. Do not combine bitcoind fields with an Esplora URL; RLN rejects that configuration as ambiguous.

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:

On-chain RGB operations

The on-chain path uses the same RLN process and authentication model as the Lightning path. Use the following REST endpoints instead of integrating a separate on-chain service: RLN does not use xPub request headers or a client-side *begin/*end PSBT flow. Authenticate to RLN with Biscuit tokens as described below. If your custody model requires an external signer, see Remote Signer; support remains experimental and requires deployment-specific validation. For complete request and response schemas, see the RGB Lightning Node API.

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. Replace the timestamp with your own — the node rejects a token once its expiry has passed:
For short-lived tokens, generate the timestamp at issue time rather than hardcoding it — date -u -d '+30 days' +%Y-%m-%dT%H:%M:%SZ with GNU coreutils, or date -u -v+30d +%Y-%m-%dT%H:%M:%SZ on macOS.

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