Remote control of Core Lightning Nodes in 2023
In this live we present the existing methods to remotly control CLN nodes and we showcase some applications/libraries built on top of Core Lightning and the methods they use to remotly control CLN nodes.
Remote control of CLN nodes in 1 table
| library/plugin/service | how | RPC methods | authentication / authorization | notes |
|------------------------+---------------+---------------+--------------------------------+------------------|
| commando | commando msg | all | Rune + node id | need BOLT #8 |
|------------------------+---------------+---------------+--------------------------------+------------------|
| lnsocket | commando msg | all | Rune + node id | need BOLT #8 |
| | | | | + maybe proxy or |
| | | | | TLS certificate |
| | | | | for websocket |
|------------------------+---------------+---------------+--------------------------------+------------------|
| lnmessage | commando msg | all | Rune + node id | need BOLT #8 |
| | | | | + maybe proxy or |
| | | | | TLS certificate |
| | | | | for websocket |
|------------------------+---------------+---------------+--------------------------------+------------------|
| clnrest | HTTP requests | all | Rune | |
|------------------------+---------------+---------------+--------------------------------+------------------|
| c-lightning-REST | HTTP requests | all | macaroon | |
|------------------------+---------------+---------------+--------------------------------+------------------|
| sparko | HTTP requests | all | ?? | |
|------------------------+---------------+---------------+--------------------------------+------------------|
| cln-grpc | gRPC | only those | mTLS certificates | not in browsers |
| | | in node.proto | | |
| | | file | | |
|------------------------+---------------+---------------+--------------------------------+------------------|
| Greenlight | ?? | only those | mTLS certificates | LaaS + VLS |
| | | in node.proto | | |
| | | file | | |
Commando plugin
commando: Commando is a direct-to-node plugin that ships natively with Core Lightning. It lets you set runes to create fine-grained access controls to a CLN node's RPC, and provides access to those same RPCs via Lightning-native network connections.
CLN nodes
CLN nodes can receive and send commando messages.
lnsocket
jb55/lnsocket: A minimal C & js library for sending messages to lightning nodes.
websocket proxy
jb55/ln-ws-proxy: A websockets to lightning proxy
Apps using lnsocket
jb55/lnlink: An iOS app for communicating with your clightning node over the lightning network.
Fonta1n3/Plasma: iOS Core Lightning Wallet powered by LNSocket.
jb55/cln-payment-links: Serverless payment links for Core-Lightning
https://sendsats.lol: Get a ⚡ address for your CLN node.
fiatjaf/makeinvoice: Makes a Lightning invoice.
jb55/lnurl-commando: An lnurl server that fetches invoices over the lightning network via lnsocket1 and commando.
jb55/base58-lnsocket-demo: A quick lnsocket demo I did for base58.
clightning4j/lnlambda: This is a monkey implementation of lnsocket lambda function selfhosted.
lnmessage
aaronbarnardsound/lnmessage: Talk to Lightning nodes from the Browser and NodeJS apps.
websocket proxy
clams-tech/ln-ws-proxy: A simple WebSocket server to proxy lnsocket frames to Core Lightning nodes over the Lightning Network
Apps using lnmessage
clams-tech/App: Browser UI for your Core Lightning node.
clams-tech/clams-app-docker: Docker resources for hosting Clams App easily.
aaronbarnardsound/create-coreln-app: Boilerplate for creating a CoreLN web app with Sveltekit.
johngribbin/lnplay-frontend: lnplay.live website code.
roygbiv.guide: roygbiv.guide is the first-of-its-kind (I think?) Value4Value multi-author blog based on BOLT12 Prisms. BOLT12 is pretty new and not widely adopted yet, but I wanted to build on top of BOLT12 since it's the hot new thing.
ElementsProject/cln-application: Core lightning application on Umbrel.
ShahanaFarooqui/ln-message-poc: LN Message Commando Client.
ShahanaFarooqui/CLN-Commando-Client: Core Lightning Commando Client.
HTTP requests
clnrest
clnrest: CLNRest is a lightweight Python-based core lightning plugin that transforms RPC calls into a REST service.
c-lightning-REST
Ride-The-Lightning/c-lightning-REST: REST APIs for Core Lightning written with node.js.
Apps using c-lightning-REST
:
Ride-The-Lightning/RTL: Ride The Lightning - A full function web browser app for LND, C-Lightning and Eclair.
ZeusLN/zeus: A mobile Bitcoin wallet fit for the gods.
Start9Labs/cln-startos: wrapper for building c-lightning.s9pk.
sparko
fiatjaf/sparko: c-lightning RPC over HTTP with fine-grained permissions, SSE and spark-wallet support
Apps using sparko
:
shesek/spark-wallet: A minimalistic wallet GUI for c-lightning, accessible over the web or through mobile and desktop apps.
ZeusLN/zeus: A mobile Bitcoin wallet fit for the gods.
remoteRPC
rsbondi/clightning-go-plugin: remoteRPC is plugin that allows you to access all RPC commands using HTTP instead of the default of unix socket
App using remoteRPC
:
rsbondi/clightning-mobile: A mobile client to access your clightning node.
others
fixone/moonlight-lite: Lightning Network c-lightning REST wrapper.
Start9Labs/c-lightning-http-plugin: About A plugin for c-lightning that proxies http rpc traffic to the unix domain socket.
hbasria/lightning-rest: Rest server for the lightningd RPC.
clightning4j/jrest: A Java plugin for c-lightning to expose the API over rest!
CLN notifications
| library/plugin | how | authentication / authorization |
|--------------------+-------------------------+--------------------------------|
| clnrest | websocket | Rune |
|--------------------+-------------------------+--------------------------------|
| c-lightning-events | websocket | ?? |
|--------------------+-------------------------+--------------------------------|
| sparko | Server-Sent Event (SSE) | ?? |
|--------------------+-------------------------+--------------------------------|
| lightningd-webhook | webhook | ?? |
clnrest: CLNRest is a lightweight Python-based core lightning plugin that transforms RPC calls into a REST service.
rbndg/c-lightning-events: Subscribe to C-Lightning events with websocket.
fiatjaf/sparko: c-lightning RPC over HTTP with fine-grained permissions, SSE and spark-wallet support.
fiatjaf/lightningd-webhook: A lightningd plugin that emits webhooks for each notification events.
gRPC
CLN gRPC APIs: The gRPC API is automatically generated from our existing JSON-RPC API, so it has the same low-level and high-level access that app devs are accustomed to but uses a more efficient binary encoding where possible and is secured via mutual TLS authentication.
Apps using CLN gRPC APIs or bindings:
lncapital/torq: Torq is an advanced node management software that helps lightning node operators analyze and automate their nodes. It is designed to handle large nodes with over 1000 channels, and it offers a range of features to simplify your node management tasks
bubelov/thunder: Core Lightning node manager for Android.
flitz-be/cln-grpc-go: Golang bindings for the CLN gRPC client.
ShahanaFarooqui/CLN-gRPC-Client: Core Lightning gRPC Client.
giovannizotta/cln-grpc-go-test: Simple TLS-encrypted Golang gRPC client for Core Lightning.
Greenlight / LaaS
Greenlight is a Blockstream service offering hosted, non-custodial, Lightning Network nodes to developers and end-users. We take care of the infrastructure, while you are in control of the keys.
Greenlight: Your personal Core Lightning node, without the technical fuss.
Greenlight Documentation: Greenlight is a Blockstream service offering hosted, non-custodial, Lightning Network nodes to developers and end-users. We take care of the infrastructure, while you are in control of the keys.
Blockstream/greenlight: This repository contains everything to get you started with Blockstream Greenlight, your self-sovereign Lightning node in the cloud.
breez/breez-sdk: The Breez SDK enables mobile developers to integrate Lightning and bitcoin payments into their apps with a very shallow learning curve. [...] Crucially, this SDK is an end-to-end, non-custodial, drop-in solution powered by Greenlight, a built-in LSP, on-chain interoperability, third-party fiat on-ramps, and other services users and operators need.
Validating Lightning Signer (VLS): Improve your Lightning node security by protecting your keys separately.
graphql
c-lightning-graphql: graphql api plugin for c-lightning.
Articles / Links
Tips on Remotely Controlling Your Node: I want to point out some things which make writing tools to control your node easier. [...]
Connecting to CLN: Schema showing how to connect to CLN nodes.
Core Lightning Commando Bootstrapping: The Commando plugin is an excellent tool for applications seeking to establish a secure connection with a Core Lightning Network (CLN) node. [...]
Core lightning: Calling RPC & Generating a Rune: In this blog post, I will share some methods for calling the
commando-rune
rpc. This command generates a rune for the node with the specified restrictions provided in parameters.Announcing the new CLN app on Start9!: The new Core Lightning app on Start9 is officially live!
Greenlight by Blockstream: Scalable, Non-Custodial Lightning Infrastructure Now Open to Developers: Just over two years ago, Blockstream conceived of Greenlight: a groundbreaking Lightning hosting infrastructure that scales your Lightning deployments without compromise or custody. The last year of testing with partners has proven Greenlight both stable and simple to use. Today, we are open-sourcing the client repository and opening sign-ups to interested parties for our developer preview!
Build On L2 supports VLS integration into Greenlight with $150,000 grant: Build On L2 (BOL2) is a community initiative that connects developers, entrepreneurs, and Bitcoiners from around the world to build on Core Lightning and the Liquid Network. Today, we're announcing our support for the Validating Lightning Signer project (VLS) through a $150,000 grant.
Lightning-as-a-Service (LaaS): Lightning-as-a-Service, or LaaS, is a specialized service model where third-party providers offer infrastructure and solutions related to Bitcoin's Lightning Network to businesses and developers.
lightning/bolts: BOLT: Basis of Lightning Technology (Lightning Network Specifications).
jb55/rune-workshop: A web UI for constructing CoreLN runes.
Videos / Podcasts
lnsocket
Base58 n' Coding: jb55 talks about lnsocket: In that live coding session jb55 presents his library
lnsocket
and how to use in web app connecting to a CLN node via websocket.
lnmessage
Diving Into The World Of clams.tech: Clams is a browser UI for your Core Lightning node. Walk through how to connect a regtest node, see some of the current features, and learn what's on the roadmap, and get an explanation of how a secure connection is made to a node with
lnmessage
.First Look: The CLN Umbrel App!: Get a first look at the upcoming Core Lightning Umbrel app 🔥 Follow along as Blockstream Frontend Engineer Shahana Farooqi and Head of Design Basak Haznedaroglu go through the Umbrel OS, project architecture, UX/UI, security features, application features, lnmessage, commando & runes!
gRPC
Introducing Torq: Enterprise Node Management software by LN Capital
Challenges of Operating Lightning Nodes & Torq with Henrik Skogstrøm (SLP474): Henrik Skogstrom, Founder and CEO of LN Capital joins me to talk about the lightning network:
c-lightning-REST
Ride The Lightning: Live Coding Session: Join front-end software engineer Shahana Farooqi as she works through this open issue on the Ride The Lightning GitHub repo.
Greenlight
Future Visions of Lightning, Greenlight & Breez SDK with Christian Decker and Roy Sheinfeld (SLP488)
Greenlight Fixes This ⚡️ with Adi Shankara: This week we're talking about the Lightning Network with Adi Shankara, senior product manager for Greenlight and Core Lightning at Blockstream.
Support Bitcoin Lightning with Greenlight with Christian Decker (SLP521)
LNROOM
Introduction to commando and commando-rune: In this live we see how to create runes (restrictions tokens) with
commando-rune
command and how to use them withcommando
command in order to run authorized (by the rune) methods on a directly-connected peer. Then we write a nodejs cli app which runs thegetinfo
method on a directly-connected peer usinglnmessage
library. Finally, we write a nodejs cli app which creates invoices by running theinvoice
method on a directly-connected peer usinglnmessage
library. This gives use the opportunity to see how to add restrictions to runes.Simple CLN bookkeeper web app powered by lnsocket & Golang - part 1: In this live we build a simple CLN bookkeeper web app which exposes the data we get from the commands
bkpr-listbalances
andbkpr-listincome
. We write it in Go usinglnsocket
library. All of this is made possible thanks tocommando
andbookkeeper
plugins. We finish building this app in the episode #20 of LNROOM.Overview of lnmessage implementation: In this live we look at the implementation of
lnmessage
JS library that let us sendcommando
messages to a CLN node. Specifically, we look atLnMessage.commando
andNoiseState.encryptMessage
methods. This give us the opportunity to talk about BOLT #8 and BOLT #1.Create invoices with a Node.JS cli using lnmessage and commando: In this video we write a Node.JS cli application that generates invoices by sending
commando
messages to a CLN node usinglnmessage
library.Getting started with CLNRest plugin: In this live we see how to start and use the new builtin plugin CLNRest that transforms RPC calls into a REST service. We learn how to use the Swagger interface to generate/send http requests. Then we connect to the websocket offered by CLNRest that sends lightningd notification. Finally, we take a look at CLNRest implementation to show how plugin developers can take advantage of the new JSON RPC method
checkrune
.Learn how to test libraries/apps that interact with CLN nodes: In this live we see how how to test lnsocket/go library using
pyln-testing
library.Get started with cln-grpc plugin: In this live we continue our tour about Core Lightning remote control with the builtin plugin
cln-grpc
. We write a Python application which generates invoices on our CLN node using the gRPC protocol.