2022-05-01 19:35:20 +02:00
![](../screenshots/RTL-CLN-Dashboard.png)
2019-09-15 01:47:45 +02:00
2022-05-01 19:35:20 +02:00
## RTL Core lightning setup
2019-09-14 23:15:34 +02:00
* [Introduction ](#intro )
* [Pre-requisite ](#prereq )
2019-09-14 23:29:29 +02:00
* [Architecture ](#arch )
2019-09-14 23:15:34 +02:00
* [Installation ](#install )
* [Prep for execution ](#prep )
* [Start the server and access the app ](#start )
### <a name="intro"></a>Introduction
2022-05-01 19:35:20 +02:00
RTL is now enabled to manage lightning nodes running Core Lightning.
2019-09-14 23:15:34 +02:00
2022-05-01 19:35:20 +02:00
Follow the below steps to install and setup RTL to run on Core Lightning.
2019-09-14 23:15:34 +02:00
### <a name="prereq"></a>Pre-requisites:
2022-05-01 19:35:20 +02:00
1. Functioning Core Lightning node. Follow install instructions on their [github ](https://github.com/ElementsProject/lightning )
2019-09-14 23:15:34 +02:00
2. NodeJS - Can be downloaded [here ](https://nodejs.org/en/download )
2020-05-30 02:18:49 +02:00
3. Cl-REST - Ensure that `cl-rest` API server is installed and running. Install instructions [here ](https://github.com/Ride-The-Lightning/c-lightning-REST )
2019-09-14 23:15:34 +02:00
4. Copy the `access.macaroon` file from `cl-rest` to the device, on which RTL will be installed
2019-09-14 23:29:29 +02:00
### <a name="arch"></a>Architecture
2022-05-01 19:35:20 +02:00
![](../screenshots/RTL-CLN-Arch-2.png)
2019-09-14 23:29:29 +02:00
2019-09-14 23:15:34 +02:00
### <a name="install"></a>Installation:
2020-06-06 03:02:33 +02:00
To download a specific RTL version follow the instructions on the [release page ](https://github.com/Ride-The-Lightning/RTL/releases )
2019-09-14 23:15:34 +02:00
2020-06-06 03:02:33 +02:00
To download from master (*not recommended*):
2019-09-14 23:15:34 +02:00
2020-06-06 03:02:33 +02:00
#### First time setup
```
$ git clone https://github.com/Ride-The-Lightning/RTL.git
$ cd RTL
2022-08-10 09:00:51 +02:00
$ npm install --omit=dev
2020-06-06 03:02:33 +02:00
```
2019-09-14 23:15:34 +02:00
#### Or: Update existing build
```
$ cd RTL
$ git reset --hard HEAD
$ git clean -f -d
$ git pull
2022-08-10 09:00:51 +02:00
$ npm install --omit=dev
2019-09-14 23:15:34 +02:00
```
2022-11-29 05:52:18 +01:00
#### Error on npm install
If there is an error with `upstream dependency conflict` message then replace `npm install --omit=dev` with `npm install --omit=dev --legacy-peer-deps` .
2019-09-14 23:15:34 +02:00
### <a name="prep"></a>Prep for Execution
2020-01-20 17:15:04 +01:00
RTL requires its own config file `RTL-Config.json` , to start the server and provide user authentication on the app.
2022-05-04 16:15:15 +02:00
* Rename the file `Sample-RTL-Config.json` to `RTL-Config.json` located at`./RTL`..
2019-09-14 23:15:34 +02:00
* Locate the complete path of the readable `access.macaroon` from `cl-rest` on your node.
* Modify the RTL conf file per the example file below
Ensure that the follow values are correct per your config:
2022-05-01 19:35:20 +02:00
* `lnImplementation` - This should be `CLN` , indicating that RTL is connecting to a core lightning node.
2019-09-14 23:15:34 +02:00
* `macaroonPath` - Path of the folder containing `access.macaroon` file from cl-rest server.
* `lnServerUrl` - complete url with ip address and port of the cl-rest server.
* `multiPass` - Specify the password (in plain text) to access RTL. This password will be hashed and not stored as plain text.
2022-05-01 19:35:20 +02:00
* `configPath` (optional) - File path of the core lightning config file, if RTL server is local to the core lightning server.
2019-09-14 23:15:34 +02:00
```
{
2022-05-24 02:57:22 +02:00
"multiPass": < password required for accessing RTL > ,
2019-09-14 23:15:34 +02:00
"port": "3000",
2022-05-24 02:57:22 +02:00
"defaultNodeIndex": 1,
2023-02-18 02:33:33 +01:00
"dbDirectoryPath": "< Complete path of the folder where rtl ' s database file should be saved > ",
2019-09-14 23:15:34 +02:00
"SSO": {
"rtlSSO": 0,
"rtlCookiePath": "",
"logoutRedirectLink": ""
},
"nodes": [
{
"index": 1,
2022-05-01 19:35:20 +02:00
"lnNode": "Core Lightning Testnet # 1",
"lnImplementation": "CLN",
2019-09-14 23:15:34 +02:00
"Authentication": {
"macaroonPath": "< Modify to include the path of the folder with access . macaroon > ",
2022-05-01 19:35:20 +02:00
"configPath": "< Optional - Config file path for core lightning > "
2019-09-14 23:15:34 +02:00
},
"Settings": {
2020-01-08 15:44:58 +01:00
"userPersona": "OPERATOR",
"themeMode": "DAY",
"themeColor": "PURPLE",
2019-09-14 23:15:34 +02:00
"bitcoindConfigPath": "",
2021-08-28 23:03:18 +02:00
"logLevel": "INFO",
2020-01-10 04:50:02 +01:00
"fiatConversion": false,
2022-11-16 04:17:23 +01:00
"unannouncedChannels": false,
2020-08-18 16:34:40 +02:00
"lnServerUrl": "https://< cl-rest api server ip address > :3001"
2019-09-14 23:15:34 +02:00
}
}
2022-05-24 02:57:22 +02:00
]
2019-09-14 23:15:34 +02:00
}
```
### <a name="start"></a>Start the server and access the app
Run the following command:
`$ node rtl`
If the server started successfully, you should get the below output on the console:
2022-05-04 18:47:21 +02:00
`$ Server is up and running, please open the UI at http://localhost:3000 or your proxy configured url.`
2019-09-14 23:15:34 +02:00
Open your browser at the following address: http://localhost:3000 to access the RTL app.
2019-09-14 23:17:38 +02:00
### Detailed config and instructions
2019-09-14 23:29:29 +02:00
For detailed config and access options and other information, view the main readme page.