You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RTL/README.md

163 lines
6.0 KiB
Markdown

5 years ago
## Ride The Lightning (RTL)
![](screenshots/RTL_Home.png)
5 years ago
<a href="https://snyk.io/test/github/ShahanaFarooqui/RTL"><img src="https://snyk.io/test/github/ShahanaFarooqui/RTL/badge.svg" alt="Known Vulnerabilities" data-canonical-src="https://snyk.io/test/github/ShahanaFarooqui/RTL" style="max-width:100%;"></a>
5 years ago
[![license](https://img.shields.io/github/license/DAVFoundation/captain-n3m0.svg?style=flat-square)](https://github.com/DAVFoundation/captain-n3m0/blob/master/LICENSE)
5 years ago
### Stable Release: v0.2.11
5 years ago
5 years ago
**Intro** -- [Application Features](Application_features.md) -- [Road Map](Roadmap.md) -- [LND API Coverage](LNDAPICoverage.md) -- [Application Configurations](Application_configurations)
6 years ago
5 years ago
* [Introduction](#intro)
5 years ago
* [Architecture](#arch)
5 years ago
* [Prerequisites](#prereq)
* [Installation](#install)
* [Prep For Execution](#prep)
* [Start The Server](#start)
* [Access The Application](#access)
* [Troubleshooting](#trouble)
### <a name="intro"></a>Introduction
5 years ago
RTL is a full function, device agnostic web user interface for Lightning Network Daemon, to help manage lightning node operations.
5 years ago
Lightning Network Daemon is an implementation of Lightning Network BOLT protocol by [Lightning Labs](https://lightning.engineering/).
6 years ago
5 years ago
Pre-requisite for running RTL is a functioning LND node. You can setup your own node, by following the below guides:
* Windows/Mac users can explore Pierre Rochard's [Node Launcher](https://github.com/lightning-power-users/node-launcher)
* Linux or Raspberry Pi users can explore Stadicus's [guide](https://github.com/Stadicus/guides/blob/master/raspibolt/README.md)
6 years ago
5 years ago
RTL source code is available at this [repo](https://github.com/ShahanaFarooqui/RTLFullApplication)
6 years ago
5 years ago
For detailed screenshots and UI operation guide you can visit our [medium post](https://medium.com/@suheb.khan/how-to-ride-the-lightning-447af999dcd2)
5 years ago
5 years ago
### <a name="arch"></a>Architecture
5 years ago
![](screenshots/RTL_Arch.png)
5 years ago
5 years ago
### <a name="prereq"></a>Prerequisites
6 years ago
Please ensure that you have completed the installation of LND lightning node.
6 years ago
5 years ago
The application also requires Node.js, which can be downloaded [here](https://nodejs.org/en/download/)
6 years ago
Recommended Browsers: Chrome, Firefox, MS Edge
6 years ago
5 years ago
### <a name="install"></a>Installation
6 years ago
#### First time setup
6 years ago
Fetch sources from the RTL git repository, by executing the below command at the command prompt:
6 years ago
6 years ago
`$ git clone https://github.com/ShahanaFarooqui/RTL.git`
6 years ago
6 years ago
Move to the newly created directory:
6 years ago
6 years ago
`$ cd RTL`
6 years ago
Fetch the dependencies and build the application by running:
6 years ago
`$ npm install`
6 years ago
6 years ago
#### Updating existing build
5 years ago
```
5 years ago
$ cd RTL
5 years ago
$ git reset --hard HEAD
$ git clean -f -d
$ git pull
$ npm install
```
5 years ago
### <a name="prep"></a>Prep for Execution
5 years ago
Rename `sample-RTL.conf` file to `RTL.conf`.
RTL requires its config file `RTL.conf`, to start the server and provide user authentication on the app.
Locate the complete path of the readable macroon file (admin.macroon) on your node and lnd.conf file
The path of the macroon directory and lnd.conf needs to be provided in the RTL.conf file to start the server.
6 years ago
5 years ago
For details on all the configuration options refer to [this page](https://github.com/ShahanaFarooqui/RTL/blob/master/Application_configurations).
Sample RTL.conf:
```
[Authentication]
5 years ago
macaroonPath=C:\Users\<user>\AppData\Local\Lnd\data\chain\bitcoin\testnet
nodeAuthType=CUSTOM
lndConfigPath=C:\Users\<user>\AppData\Local\Lnd\lnd.conf
rtlPass=***
[SSO]
rtlSSO=0
rtlCookiePath=C:\RTL\cookies\auth.cookie
logoutRedirectLink=/login
[Settings]
flgSidenavOpened=true
flgSidenavPinned=true
menu=Vertical
menuType=Regular
theme=dark-blue
satsToBTC=false
5 years ago
lndServerUrl=https://192.168.0.0:8080/v1
bitcoindConfigPath=
enableLogging=false
port=3000
```
#### User Authentication on RTL
5 years ago
Basic user authentication has now been added on RTL. This requires user to be authenticated by RTL first, before accessing LND functions.
There are two options to configure authentication on RTL, depending on the `nodeAuthtype` value provided in RTL.conf.
6 years ago
For `nodeAuthType=DEFAULT`
Password provided in lnd.conf for the rpc setting for bitcoind will be used for authentication.
6 years ago
For `nodeAuthType=CUSTOM`
5 years ago
Specific password can be provided in RTL.conf (in plain text), to be used by RTL for authentication.
Password should be set with `rtlPass=<user defined>` in the [Authentication] section of RTL.conf
6 years ago
5 years ago
### <a name="start"></a>Start the Server
Run the following command:
6 years ago
`node rtl`
6 years ago
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`
6 years ago
#### Optional: Running RTL as a service (rpi or Linux platform users)
6 years ago
In case you are running a headless rpi or Linux node, you can configure RTL as a service.
6 years ago
* Create RTL systemd unit and with the following content. Save and exit.
6 years ago
```bash
# Raspibolt RTL: systemd unit for RTL
# /etc/systemd/system/RTL.service
6 years ago
[Unit]
Description=RTL daemon
Wants=lnd.service
6 years ago
After=lnd.service
6 years ago
6 years ago
[Service]
ExecStart=/usr/bin/node /home/admin/Projects/RTL/rtl
6 years ago
User=<user>
6 years ago
Restart=always
TimeoutSec=120
RestartSec=30
[Install]
WantedBy=multi-user.target
6 years ago
```
6 years ago
6 years ago
* enable and start RTL
5 years ago
```
$ sudo systemctl enable RTL
$ sudo systemctl start RTL
```
6 years ago
* montior the RTL log file in realtime(exit with Ctrl-C)
6 years ago
5 years ago
`$ sudo journalctl -f -u RTL`
6 years ago
5 years ago
### <a name="access"></a>Accessing the Application
6 years ago
You can access the application in two ways:
5 years ago
#### Same device as the server
6 years ago
Open your browser at the following address: http://localhost:3000 to access the RTL application.
6 years ago
5 years ago
#### Remotely from another device on the same local network as the node
Ensure that the firewall running on your node allows access on port 3000 (or the custom port configured for RTL).
Determine the IP address of your node to access the application.
6 years ago
E.g. if the IP address of your node is 192.168.0.15 then open your browser at the following address: http://192.168.0.15:3000 to access RTL.
5 years ago
5 years ago
### <a name="trouble"></a>Troubleshooting
5 years ago
In case you are running into issues with the application or if you have feedback, feel free to open issues on our github repo.
You can also reach out to us via twitter DM on @Sauby_k or @RTL_App. Thanks for your interest.