From f95705660a31d0003148c12feb94bec21ee50f3c Mon Sep 17 00:00:00 2001 From: saubyk Date: Sat, 14 Sep 2019 17:15:34 -0400 Subject: [PATCH] C-lightning setup doc added --- README.md | 4 +- docs/C-Lightning-setup.md | 99 +++++++++++++++++++++++++++++++++++++++ package-lock.json | 4 +- 3 files changed, 103 insertions(+), 4 deletions(-) create mode 100644 docs/C-Lightning-setup.md diff --git a/README.md b/README.md index 2bea8a90..0c63fe4e 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![license](https://img.shields.io/github/license/DAVFoundation/captain-n3m0.svg?style=flat-square)](https://github.com/DAVFoundation/captain-n3m0/blob/master/LICENSE) ### Stable Release: v0.4.6 -**Intro** -- [Application Features](docs/Application_features.md) -- [Road Map](docs/Roadmap.md) -- [LND API Coverage](docs/LNDAPICoverage.md) -- [Application Configurations](docs/Application_configurations) +**Intro** -- [Application Features](docs/Application_features.md) -- [Road Map](docs/Roadmap.md) -- [LND API Coverage](docs/LNDAPICoverage.md) -- [Application Configurations](docs/Application_configurations) -- [C-lightning](docs/C-Lightning-setup.md) * [Introduction](#intro) * [Architecture](#arch) @@ -47,7 +47,7 @@ Docker Image: https://hub.docker.com/r/shahanafarooqui/rtl ### Installation #### First time setup -* Fetch sources from the RTL git repository, by executing the below on the command prompt: +* Fetch sources from RTL git repository, by executing the below on the command prompt: `$ git clone https://github.com/ShahanaFarooqui/RTL.git` * Change directory to RTL folder: diff --git a/docs/C-Lightning-setup.md b/docs/C-Lightning-setup.md new file mode 100644 index 00000000..46140240 --- /dev/null +++ b/docs/C-Lightning-setup.md @@ -0,0 +1,99 @@ +RTL C-lightning setup + +* [Introduction](#intro) +* [Pre-requisite](#prereq) +* [Installation](#install) +* [Prep for execution](#prep) +* [Start the server and access the app](#start) + +### 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. + +### Pre-requisites: +1. Functioning C-lightning node +2. NodeJS - Can be downloaded [here](https://nodejs.org/en/download) +3. Cl-Rest - Ensure that `cl-rest` API server is installed and running. Install instructions [here](https://github.com/saubyk/c-lightning-REST/blob/master/README.md) +4. Copy the `access.macaroon` file from `cl-rest` to the device, on which RTL will be installed + +### Installation: +#### First time setup +* Fetch sources from RTL git repository, by executing the below on the command prompt: + +`$ git clone https://github.com/ShahanaFarooqui/RTL.git` +* Change directory to RTL folder: + +`$ cd RTL` +* Fetch the dependencies and build the application by running: + +`$ npm install` + +#### Or: Update existing build +``` +$ cd RTL +$ git reset --hard HEAD +$ git clean -f -d +$ git pull +$ npm install +``` +### Prep for Execution +RTL requires its own config file `RTL-Multi-Node-Conf.json`, to start the server and provide user authentication on the app. +* Rename `sample-RTL-Multi-Node-Conf.json` file to `RTL-Multi-Node-Conf.json`. +* 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": "", + "configPath": "" + }, + "Settings": { + "flgSidenavOpened": false, + "flgSidenavPinned": true, + "menu": "Vertical", + "menuType": "Regular", + "theme": "dark-pink", + "satsToBTC": true, + "bitcoindConfigPath": "", + "enableLogging": "true", + "lnServerUrl": "https://:3001/v1" + } + } + ], + "multiPass": +} +``` +### 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. + +### Redirect to main page for detailed instructions +For detailed config and access options and other information, view the main readme page. \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 952e2724..61e82e35 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14142,7 +14142,7 @@ }, "wrap-ansi": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "resolved": "http://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", "requires": { "string-width": "^1.0.1", @@ -14200,7 +14200,7 @@ }, "xmlbuilder": { "version": "9.0.7", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "resolved": "http://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", "dev": true },