2020-01-09 01:20:10 +00:00
![](../screenshots/RTL-CLT-Dashboard.png)
2019-09-14 23:47:45 +00:00
## RTL C-lightning setup
2019-09-14 21:15:34 +00:00
* [Introduction ](#intro )
* [Pre-requisite ](#prereq )
2019-09-14 21:29:29 +00:00
* [Architecture ](#arch )
2019-09-14 21:15:34 +00:00
* [Installation ](#install )
* [Prep for execution ](#prep )
* [Start the server and access the app ](#start )
### <a name="intro"></a>Introduction
RTL can now be run to manage a c-lightning node via the UI.
Please note, this integration is currently in *alpha* testing phase and can be bug prone.
Follow the below steps to install and setup RTL to run on c-lightning.
### <a name="prereq"></a>Pre-requisites:
1. Functioning C-lightning node
2. NodeJS - Can be downloaded [here ](https://nodejs.org/en/download )
2019-11-23 13:05:00 +00: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 21:15:34 +00:00
4. Copy the `access.macaroon` file from `cl-rest` to the device, on which RTL will be installed
2019-09-14 21:29:29 +00:00
### <a name="arch"></a>Architecture
2020-02-02 23:01:07 +00:00
![](../screenshots/RTL-CLT-Arch-2.png)
2019-09-14 21:29:29 +00:00
2019-09-14 21:15:34 +00:00
### <a name="install"></a>Installation:
#### First time setup
* Fetch sources from RTL git repository, by executing the below on the command prompt:
2020-01-08 14:44:58 +00:00
`$ git clone https://github.com/Ride-The-Lightning/RTL.git`
2019-09-14 21:15:34 +00:00
* Change directory to RTL folder:
`$ cd RTL`
2020-01-11 21:54:41 +00:00
* Fetch the production dependencies by running:
`$ npm install --only=prod`
2019-09-14 21:15:34 +00:00
#### Or: Update existing build
```
$ cd RTL
$ git reset --hard HEAD
$ git clean -f -d
$ git pull
2020-01-11 21:54:41 +00:00
$ npm install --only=prod
2019-09-14 21:15:34 +00:00
```
### <a name="prep"></a>Prep for Execution
2020-01-20 16:15:04 +00:00
RTL requires its own config file `RTL-Config.json` , to start the server and provide user authentication on the app.
* Rename `sample-RTL-Config.json` file to `RTL-Config.json` .
2019-09-14 21:15:34 +00: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:
* `lnImplementation` - This should be `CLT` , indicating that RTL is connecting to a c-lightning node.
* `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.
* `configPath` (optional) - File path of the c-lightning config file, if RTL server is local to the c-lightning server.
```
{
"port": "3000",
"SSO": {
"rtlSSO": 0,
"rtlCookiePath": "",
"logoutRedirectLink": ""
},
"nodes": [
{
"index": 1,
"lnNode": "c-lightning Testnet # 1",
"lnImplementation": "CLT",
"Authentication": {
"macaroonPath": "< Modify to include the path of the folder with access . macaroon > ",
"configPath": "< Optional - Config file path for c-lightning > "
},
"Settings": {
2020-01-08 14:44:58 +00:00
"userPersona": "OPERATOR",
"themeMode": "DAY",
"themeColor": "PURPLE",
2019-09-14 21:15:34 +00:00
"bitcoindConfigPath": "",
2020-01-08 14:44:58 +00:00
"enableLogging": true,
2020-01-10 03:50:02 +00:00
"fiatConversion": false,
2019-09-14 21:15:34 +00:00
"lnServerUrl": "https://< cl-rest api server ip address > :3001/v1"
}
}
2020-01-20 16:15:04 +00:00
],
2019-09-14 21:15:34 +00:00
"multiPass": < password required for accessing RTL >
}
```
### <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:
`$ Server is up and running, please open the UI at http://localhost:3000`
Open your browser at the following address: http://localhost:3000 to access the RTL app.
2019-09-14 21:17:38 +00:00
### Detailed config and instructions
2019-09-14 21:29:29 +00:00
For detailed config and access options and other information, view the main readme page.