2023-04-22 17:21:44 +04:00
---
2025-11-12 14:32:54 -08:00
title: App Development
slug: app-development
content:
excerpt: Build a lightning application using Core Lightning APIs.
privacy:
view: public
2023-04-22 17:21:44 +04:00
---
2025-07-09 21:55:30 -07:00
## Interacting with CLN Node
2023-04-22 17:21:44 +04:00
There are several ways to connect and interact with a Core Lightning node in order to build a lightning app or integrate lightning in your application.
2023-09-12 15:20:02 +09:30
- Using * * [JSON-RPC commands ](doc:json-rpc )** if you're building an application in the same system as the CLN node.
- Using * * [REST APIs ](doc:rest )** if you're building an application in a remote client and want to connect to the CLN node over a secure network using REST interface.
- Using * * [gRPC APIs ](doc:grpc )** if you're building an application in a remote client and want to connect to the CLN node over a secure network using gRPC interface.
2025-06-25 18:52:28 -07:00
- Using * * [Commando Plugin ](doc:commando-plugin )** to connect to a CLN node over the lightning network and issue commands.
2024-04-15 20:35:23 -07:00
- Using * * [WSS Proxy ](doc:wss-proxy )** to connect to a CLN node over web secure socket proxy.
2023-09-12 15:20:02 +09:30
- Third-party libraries that offer * * [JSON over HTTPS ](doc:third-party-libraries#json-over-https )** or * * [GraphQL ](doc:third-party-libraries#graphql )** (deprecated) frameworks to connect to a CLN node remotely.
2023-04-22 17:21:44 +04:00
2025-07-09 21:55:30 -07:00
## CLN connection URIs
This section outlines the standard URI formats for connecting to Core Lightning (CLN) nodes via different protocols.
### Commando WebSocket Connection
```
commando+<protocol>://<cln-host>:<ws-port>?pubkey=<pubkey>&rune=<rune>&invoiceRune=<invoice-rune>&certs=<combined-base64-encoded-clientkey-clientcert-cacert>
```
#### Parameters:
2025-11-25 20:10:45 -08:00
2025-07-09 21:55:30 -07:00
- protocol: ws or wss (WebSocket or secure WebSocket)
- cln-host: Hostname or IP address of the CLN node
- ws-port: WebSocket port
- pubkey: Node's public key (hex encoded)
- rune: Authentication rune for general commands
- invoiceRune: Specific rune for invoice creation (optional)
2025-08-07 18:06:00 -07:00
- certs: A Base64-encoded sequence created by concatenating the client key, client certificate, and CA certificate, in that order.
2025-07-09 21:55:30 -07:00
#### Example:
```
commando+wss://cln.local:5001?pubkey=023456789abcdef&rune=8hJ6ZKFvRune&invoiceRune=5kJ3ZKFvInvRune&certs=LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0t
```
### REST API Connection
```
clnrest+<protocol>://<rest-host>:<rest-port>?rune=<rune>&certs=<combined-base64-encoded-clientkey-clientcert-cacert>
```
#### Parameters:
2025-11-25 20:10:45 -08:00
2025-07-09 21:55:30 -07:00
- protocol: http or https
- rest-host: Hostname or IP address of the REST interface
- rest-port: REST API port (typically 3010)
- rune: Authentication rune for REST API access
2025-08-07 18:06:00 -07:00
- certs: A Base64-encoded sequence created by concatenating the client key, client certificate, and CA certificate, in that order.
2025-07-09 21:55:30 -07:00
#### Example:
```
clnrest+https://cln.local:3010?rune=8hJ6ZKFvRune&certs=LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0t
```
2025-11-25 20:10:45 -08:00
### gRPC Connection
2025-07-09 21:55:30 -07:00
```
clngrpc://<grpc-host>:<grpc-port>?pubkey=<pubkey>&protoPath=<path-to-proto>&certs=<combined-base64-encoded-clientkey-clientcert-cacert>
```
#### Parameters:
2025-11-25 20:10:45 -08:00
2025-07-09 21:55:30 -07:00
- grpc-host: Hostname or IP address of the gRPC interface
- grpc-port: gRPC port (typically 9736)
- pubkey: Node's public key (hex encoded)
- protoPath: Path to protocol buffer definition file (typically https://github.com/ElementsProject/lightning/tree/master/cln-grpc/proto)
2025-08-07 18:06:00 -07:00
- certs: A Base64-encoded sequence created by concatenating the client key, client certificate, and CA certificate, in that order.
2025-07-09 21:55:30 -07:00
#### Example:
```
clngrpc://cln.grpc:9736?pubkey=023456789abcdef&protoPath=/path/to/cln.proto&certs=LS0tLS1CRUdJTiBQUklWQVRFIEtFWS0t
```
## Image of available API interfaces and transport protocols
2025-11-25 20:10:45 -08:00

*A visual chart of available API interfaces and transport protocols for interacting with a CLN node*