2
0
mirror of https://github.com/Ride-The-Lightning/RTL synced 2024-11-11 13:10:41 +00:00
RTL/README.md

177 lines
7.5 KiB
Markdown
Raw Normal View History

2019-02-18 14:25:33 +00:00
## Ride The Lightning (RTL)
![](screenshots/RTL_Home.png)
2019-01-28 00:31:32 +00:00
<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>
2019-02-22 00:07:38 +00:00
[![license](https://img.shields.io/github/license/DAVFoundation/captain-n3m0.svg?style=flat-square)](https://github.com/DAVFoundation/captain-n3m0/blob/master/LICENSE)
2019-11-20 20:56:01 +00:00
### Stable Release: v0.5.4
2019-02-21 00:34:30 +00:00
2019-09-14 21:15:34 +00:00
**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)
2018-11-17 17:17:12 +00:00
2019-02-17 01:20:38 +00:00
* [Introduction](#intro)
2019-02-18 19:06:51 +00:00
* [Architecture](#arch)
2019-02-17 01:29:56 +00:00
* [Prerequisites](#prereq)
* [Installation](#install)
* [Prep For Execution](#prep)
* [Start The Server](#start)
* [Access The Application](#access)
* [Troubleshooting](#trouble)
### <a name="intro"></a>Introduction
2019-10-15 00:26:17 +00:00
RTL is a full function, device agnostic, web user interface to help manage lightning node operations.
RTL is available on LND and C-Lightning implementations.
This page covers instructions for LND. For C-lightning, refer to [this](docs/C-Lightning-setup.md) page.
Lightning Network Daemon(LND) is an implementation of Lightning Network BOLT protocol by [Lightning Labs](https://lightning.engineering/).
2018-09-15 01:32:18 +00:00
2019-02-24 23:26:39 +00:00
Pre-requisite for running RTL is a functioning and synced LND node. You can setup your own node, by following the below guides:
* Windows/Mac users can follow Pierre Rochard's [Node Launcher](https://github.com/lightning-power-users/node-launcher)
* Linux or Raspberry Pi users can follow Stadicus's [guide](https://github.com/Stadicus/guides/blob/master/raspibolt/README.md)
2018-09-15 01:32:18 +00:00
2019-02-18 14:51:58 +00:00
For detailed screenshots and UI operation guide you can visit our [medium post](https://medium.com/@suheb.khan/how-to-ride-the-lightning-447af999dcd2)
2018-12-31 23:05:55 +00:00
2019-09-16 17:02:34 +00:00
RTL is available on the below platforms/services:
2019-03-01 23:43:40 +00:00
* [RaspiBlitz](https://github.com/rootzoll/raspiblitz)
* [Nodl](https://www.nodl.it/)
* [BTCPayserver](https://github.com/btcpayserver/btcpayserver-docker)
2019-09-16 17:02:34 +00:00
* [Blockdaemon](https://blockdaemon.com/bitcoin-lightning-protocol-details)
* [myNode](http://mynodebtc.com)
* [Lux Node](https://luxnode.io/product/lux-node/)
2019-03-01 23:43:40 +00:00
2019-03-03 03:43:12 +00:00
Docker Image: https://hub.docker.com/r/shahanafarooqui/rtl
2019-02-18 19:06:51 +00:00
### <a name="arch"></a>Architecture
2019-09-16 17:36:02 +00:00
![](screenshots/RTL-LND-Arch.png)
2019-02-18 19:06:51 +00:00
2019-02-17 01:29:56 +00:00
### <a name="prereq"></a>Prerequisites
2019-02-24 23:26:39 +00:00
* Functioning and synced LND lightning node.
* Node.js, which can be downloaded [here](https://nodejs.org/en/download/)
* On Ubuntu, `g++` is required to install the node-sass dependency. This is available in the `build-essential` package.
* The Most recent versions of node.js might give errors while installing node-sass. Use node.js LTS version 8 or 10 as a solution.
2019-02-24 23:26:39 +00:00
* Recommended Browsers: Chrome, Firefox, MS Edge
2018-09-16 03:27:11 +00:00
2019-02-17 01:29:56 +00:00
### <a name="install"></a>Installation
2018-11-18 14:03:14 +00:00
#### First time setup
2019-09-14 21:15:34 +00:00
* Fetch sources from RTL git repository, by executing the below on the command prompt:
2019-02-24 23:44:26 +00:00
2019-11-22 00:08:17 +00:00
`$ git clone https://github.com/Ride-The-Lightning/RTL.git`
2019-02-24 23:43:45 +00:00
* Change directory to RTL folder:
2019-02-24 23:44:26 +00:00
2018-10-07 22:13:14 +00:00
`$ cd RTL`
2019-02-24 23:43:45 +00:00
* Fetch the dependencies and build the application by running:
2019-02-24 23:44:26 +00:00
2018-10-07 22:13:14 +00:00
`$ npm install`
2018-09-15 01:32:18 +00:00
2019-02-24 23:43:45 +00:00
#### Or: Update existing build
2019-02-17 21:58:37 +00:00
```
2019-02-17 22:05:40 +00:00
$ cd RTL
2019-02-17 21:58:37 +00:00
$ git reset --hard HEAD
$ git clean -f -d
$ git pull
$ npm install
```
2019-02-17 01:29:56 +00:00
### <a name="prep"></a>Prep for Execution
2019-02-24 23:43:45 +00:00
RTL requires its own config file `RTL.conf`, to start the server and provide user authentication on the app.
2018-09-15 01:37:04 +00:00
2019-07-28 17:53:50 +00:00
*Advanced users can refer to [this page](docs/Multi-LND-Node-setup.md), for config settings required to manage multiple LND nodes*
2019-02-24 23:12:10 +00:00
* Rename `sample-RTL.conf` file to `RTL.conf`.
* Locate the complete path of the readable macroon file (admin.macroon) on your node and the lnd.conf file.
2019-02-24 23:43:45 +00:00
* Modify the `RTL.conf` file per the example file below
2019-02-21 01:55:12 +00:00
2019-02-24 23:43:45 +00:00
Example RTL.conf:
2019-01-01 16:26:51 +00:00
```
[Authentication]
2019-02-21 01:55:12 +00:00
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
2019-01-01 16:26:51 +00:00
[Settings]
flgSidenavOpened=true
flgSidenavPinned=true
menu=Vertical
menuType=Regular
theme=dark-blue
satsToBTC=false
2019-02-21 01:55:12 +00:00
lndServerUrl=https://192.168.0.0:8080/v1
bitcoindConfigPath=
enableLogging=false
port=3000
2019-01-01 16:26:51 +00:00
```
For details on all the configuration options refer to [this page](./docs/Application_configurations).
2019-02-24 23:12:10 +00:00
2019-01-01 16:26:51 +00:00
#### User Authentication on RTL
2019-02-24 23:23:38 +00:00
RTL requires the user to be authenticated by the application first, before allowing access to LND functions.
2019-01-01 16:26:51 +00:00
There are two options to configure authentication on RTL, depending on the `nodeAuthtype` value provided in RTL.conf.
2018-10-07 22:21:45 +00:00
2019-02-24 23:32:28 +00:00
* Option 1: `nodeAuthType=DEFAULT`; Password provided in lnd.conf for the rpc setting for bitcoind will be used for authentication.
* Option 2: `nodeAuthType=CUSTOM`; Specific password must be provided in RTL.conf (in plain text) for authentication. Password should be set with `rtlPass=<user defined>` in the [Authentication] section of RTL.conf
2018-10-07 22:21:45 +00:00
2019-02-17 01:29:56 +00:00
### <a name="start"></a>Start the Server
2019-01-01 16:26:51 +00:00
Run the following command:
2018-10-07 22:21:45 +00:00
2019-02-24 23:16:11 +00:00
`$ node rtl`
2018-09-15 01:32:18 +00:00
If the server started successfully, you should get the below output on the console:
2019-02-24 23:16:11 +00:00
`$ Server is up and running, please open the UI at http://localhost:3000`
2018-09-15 01:32:18 +00:00
2019-02-24 23:23:38 +00:00
#### Optional: Running RTL as a service (Rpi or Linux platform users)
In case you are running a headless Rpi or a Linux node, you can configure RTL as a service.
2018-10-07 22:20:31 +00:00
2018-10-07 22:29:02 +00:00
* Create RTL systemd unit and with the following content. Save and exit.
2018-10-09 23:22:28 +00:00
```bash
# Raspibolt RTL: systemd unit for RTL
# /etc/systemd/system/RTL.service
2018-10-07 22:29:02 +00:00
[Unit]
Description=RTL daemon
Wants=lnd.service
2018-10-07 22:31:41 +00:00
After=lnd.service
2018-10-07 22:29:50 +00:00
2018-10-07 22:29:02 +00:00
[Service]
2019-02-24 23:12:10 +00:00
ExecStart=/usr/bin/node <Full path of the RTL folder>/rtl
2018-10-09 23:23:35 +00:00
User=<user>
2018-10-07 22:29:02 +00:00
Restart=always
TimeoutSec=120
RestartSec=30
[Install]
WantedBy=multi-user.target
2018-10-09 23:22:28 +00:00
```
2018-10-07 22:39:30 +00:00
2018-10-07 22:35:48 +00:00
* enable and start RTL
2019-02-17 21:58:37 +00:00
```
$ sudo systemctl enable RTL
$ sudo systemctl start RTL
```
2018-10-07 22:35:48 +00:00
* montior the RTL log file in realtime(exit with Ctrl-C)
2018-10-07 22:36:37 +00:00
2019-01-10 15:27:13 +00:00
`$ sudo journalctl -f -u RTL`
2018-10-07 22:35:48 +00:00
2019-02-17 01:29:56 +00:00
### <a name="access"></a>Accessing the Application
2019-03-22 21:16:26 +00:00
You can access the application in multiple setups (Please make note of the 4th exception):
2019-03-03 21:07:14 +00:00
1. Same device as the server:
2018-09-16 03:21:12 +00:00
Open your browser at the following address: http://localhost:3000 to access the RTL application.
2018-09-28 01:25:15 +00:00
2019-03-22 21:16:26 +00:00
2. Remotely from another device on the same local network (home network) as the node(RTL server+LND running on the same device):
2019-02-24 23:12:10 +00:00
* Ensure that the if a firewall running on your node, it allows access on port 3000 (or the custom port configured for RTL).
* Determine the IP address of your node to access the application.
2018-09-28 01:39:09 +00:00
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.
2018-12-31 23:05:55 +00:00
2019-04-13 23:38:32 +00:00
3. Config tweaks for running RTL server and LND on separate devices on the same network can be found [here](docs/RTL_setups.md).
2019-03-22 21:16:26 +00:00
2019-03-30 18:51:30 +00:00
4. Any Other setup: **Please be advised, if you are accessing your node remotely via RTL, its critical to encrypt the communication via use of https. You can use solutions like nginx and letsencrypt or TOR to setup secure access for RTL.**
2019-04-13 23:35:59 +00:00
- Sample SSL setup guide can be found [here](docs/RTL_SSL_setup.md)
- (For advanced users) A sample SSL guide to serve remote access over an encrypted Tor connection can be found [here](docs/RTL_TOR_setup.md)
2019-03-03 21:02:52 +00:00
2019-02-17 01:29:56 +00:00
### <a name="trouble"></a>Troubleshooting
2019-02-23 23:11:44 +00:00
In case you are running into issues with the application or if you have feedback, feel free to open issues on our github repo.
2019-06-23 12:06:40 +00:00
You can also reach out to us via twitter DM on [@Suheb__](https://twitter.com/Suheb__) or [@RTL_App](https://twitter.com/RTL_App). Thanks for your interest.