2019-01-28 01:31:32 +01: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-01-08 03:06:25 +01:00
|
|
|
**Intro** -- [Application Features](Application_features.md) -- [Road Map](Roadmap.md) -- [LND API Coverage](LNDAPICoverage.md)
|
2018-11-17 18:17:12 +01:00
|
|
|
|
2018-11-17 18:18:35 +01:00
|
|
|
## RTL - Ride The Lightning
|
2018-09-15 03:32:18 +02:00
|
|
|
|
|
|
|
RTL is a web UI for Lightning Network Daemon.
|
|
|
|
|
|
|
|
Lightning Network Daemon is an implementation of Lightning Network BOLT protocol by Lightning Labs (https://lightning.engineering/).
|
|
|
|
|
|
|
|
Visit their Github repo (https://github.com/lightningnetwork/lnd/blob/master/README.md) for details on Lightning Network and LND implementation.
|
|
|
|
|
2018-11-03 13:19:36 +01:00
|
|
|
For setting up your Lightning Network node on a Raspberry Pi, you can follow the below guide:
|
2018-11-18 15:03:14 +01:00
|
|
|
|
2018-09-15 03:32:18 +02:00
|
|
|
https://github.com/Stadicus/guides/blob/master/raspibolt/README.md
|
|
|
|
|
2018-12-17 02:47:45 +01:00
|
|
|
RTL source code is available at the below repo:
|
|
|
|
|
|
|
|
https://github.com/ShahanaFarooqui/RTLFullApplication
|
|
|
|
|
2019-01-06 14:30:10 +01:00
|
|
|
For Screenshots and UI operation guide you can visit the below medium post:
|
2019-01-01 00:05:55 +01:00
|
|
|
|
|
|
|
https://medium.com/@suheb.khan/how-to-ride-the-lightning-447af999dcd2
|
|
|
|
|
2018-11-17 18:18:35 +01:00
|
|
|
### Prerequisites
|
2018-10-08 00:04:25 +02:00
|
|
|
Please ensure that you have completed the installation of LND lightning node.
|
2018-09-15 03:32:18 +02:00
|
|
|
|
2018-10-08 00:04:25 +02:00
|
|
|
Its recommended to run this application on testnet, untill the aplha testing phase is over.
|
2018-09-15 03:32:18 +02:00
|
|
|
|
2018-11-02 01:33:53 +01:00
|
|
|
The application also requires Node.js, which can be downloaded from the below location:
|
|
|
|
|
|
|
|
https://nodejs.org/en/download/
|
|
|
|
|
|
|
|
Recommended Browsers: Chrome, Firefox, MS Edge
|
2018-09-16 05:27:11 +02:00
|
|
|
|
2018-11-17 18:18:35 +01:00
|
|
|
### Installation
|
2018-09-15 03:32:18 +02:00
|
|
|
|
2018-11-18 15:03:14 +01:00
|
|
|
#### First time setup
|
2018-10-08 00:04:25 +02:00
|
|
|
Fetch sources from the RTL git repository, by executing the below command at the command prompt:
|
2018-09-15 03:32:18 +02:00
|
|
|
|
2018-10-08 00:13:14 +02:00
|
|
|
`$ git clone https://github.com/ShahanaFarooqui/RTL.git`
|
2018-09-15 03:32:18 +02:00
|
|
|
|
2018-10-08 00:04:25 +02:00
|
|
|
Move to the newly created directory:
|
2018-09-15 03:32:18 +02:00
|
|
|
|
2018-10-08 00:13:14 +02:00
|
|
|
`$ cd RTL`
|
2018-09-15 03:32:18 +02:00
|
|
|
|
|
|
|
Fetch the dependencies and build the application by running:
|
|
|
|
|
2018-10-08 00:13:14 +02:00
|
|
|
`$ npm install`
|
2018-09-15 03:32:18 +02:00
|
|
|
|
2018-11-18 15:03:14 +01:00
|
|
|
#### Updating existing build
|
|
|
|
`$ cd RTL`
|
2018-11-18 15:04:19 +01:00
|
|
|
|
2018-11-18 15:03:14 +01:00
|
|
|
Reset Git (for the changes you may have made to the config file).
|
2018-11-18 15:04:19 +01:00
|
|
|
|
2018-12-22 21:55:40 +01:00
|
|
|
Warning: This step will revert the UI settings, you may have changed on RTL (We will address this in future revisions).
|
2018-11-18 15:04:19 +01:00
|
|
|
|
2019-01-01 17:26:51 +01:00
|
|
|
`$ git reset --hard HEAD`
|
2018-11-18 15:04:50 +01:00
|
|
|
|
2019-01-01 17:26:51 +01:00
|
|
|
`$ git clean -f -d`
|
2018-11-18 15:04:50 +01:00
|
|
|
|
2019-01-01 17:26:51 +01:00
|
|
|
`$ git pull`
|
2018-11-18 15:03:14 +01:00
|
|
|
|
2019-01-01 17:26:51 +01:00
|
|
|
`$ npm install`
|
2018-11-23 12:51:14 +01:00
|
|
|
|
2019-01-01 17:26:51 +01:00
|
|
|
### Prep for Execution
|
2018-09-15 03:32:18 +02:00
|
|
|
Make sure you are in the RTL directory, where the application was built.
|
|
|
|
|
2019-01-01 17:26:51 +01:00
|
|
|
RTL requires a config file `RTL.conf` to start the server and provide user authentication for the app.
|
|
|
|
|
|
|
|
Locate the complete path of the readable macroon file (admin.macroon) on your node and lnd.conf file
|
2018-09-15 03:32:18 +02:00
|
|
|
|
2018-12-22 21:55:40 +01:00
|
|
|
If you followed Stacidus's guide referenced above, and you are on lnd version 0.4.2 or below it should be `/home/admin/.lnd`.
|
2018-10-10 01:23:35 +02:00
|
|
|
|
2018-12-22 21:55:40 +01:00
|
|
|
For lnd versions 0.5 and above, it should be `/home/admin/.lnd/data/chain/bitcoin/testnet`.
|
2018-10-08 00:20:31 +02:00
|
|
|
|
2019-01-01 17:26:51 +01:00
|
|
|
Other platform users should accordingly locate the directory of the readable macroon and lnd.conf files.
|
2018-09-15 03:32:18 +02:00
|
|
|
|
2019-01-01 17:26:51 +01:00
|
|
|
The path of the macroon directory and lnd.conf needs to be provided in the RTL.conf file to start the server.
|
2018-09-15 03:37:04 +02:00
|
|
|
|
2019-01-01 17:26:51 +01:00
|
|
|
Sample RTL.conf:
|
|
|
|
```
|
|
|
|
[Authentication]
|
|
|
|
lndServerUrl=https://localhost:8080/v1
|
2019-01-01 17:30:56 +01:00
|
|
|
macroonPath=C:\Users\<User>\AppData\Local\Lnd\data\chain\bitcoin\testnet
|
2019-01-01 17:26:51 +01:00
|
|
|
nodeAuthType=DEFAULT
|
2019-01-01 17:30:56 +01:00
|
|
|
lndConfigPath=C:\Users\<User>\AppData\Local\Lnd\lnd.conf
|
2019-01-01 17:26:51 +01:00
|
|
|
[Settings]
|
|
|
|
flgSidenavOpened=true
|
|
|
|
flgSidenavPinned=true
|
|
|
|
menu=Vertical
|
|
|
|
menuType=Regular
|
|
|
|
theme=dark-blue
|
|
|
|
satsToBTC=false
|
|
|
|
```
|
2018-11-18 15:06:24 +01:00
|
|
|
|
2019-01-01 17:26:51 +01:00
|
|
|
#### User Authentication on RTL
|
|
|
|
Basic user authentication has now been added on RTL. This requires user to login to RTL server first, before accessing LND functions.
|
|
|
|
There are two options to configure authentication on RTL, depending on the `nodeAuthtype` value provided in RTL.conf.
|
2018-10-08 00:21:45 +02:00
|
|
|
|
2019-01-01 17:26:51 +01:00
|
|
|
For `nodeAuthType=DEFAULT`
|
|
|
|
Password provided in lnd.conf for the rpc setting for bitcoind will be used for authentication.
|
2018-10-08 00:21:45 +02:00
|
|
|
|
2019-01-01 17:26:51 +01:00
|
|
|
For `nodeAuthType=CUSTOM`
|
|
|
|
Specific password can be provided in RTL.conf, to be used by RTL for authentication.
|
|
|
|
Password should be set with `rtlPass=<user defined>` in the [Authentication] section of RTL.conf
|
2018-10-08 00:21:45 +02:00
|
|
|
|
2019-01-01 17:26:51 +01:00
|
|
|
### Start the Webserver
|
|
|
|
Run the following command:
|
2018-10-08 00:21:45 +02:00
|
|
|
|
2019-01-01 17:26:51 +01:00
|
|
|
`node rtl`
|
2018-09-15 03:32:18 +02:00
|
|
|
|
|
|
|
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`
|
|
|
|
|
2018-11-17 18:18:35 +01:00
|
|
|
#### Optional: Running RTL as a service (rpi or Linux platform users)
|
2018-10-08 00:20:31 +02:00
|
|
|
In case you are running a headless rpi or Linux node, you can configure RTL as a service.
|
|
|
|
|
2018-10-08 00:29:02 +02:00
|
|
|
* Create RTL systemd unit and with the following content. Save and exit.
|
2018-10-10 01:22:28 +02:00
|
|
|
```bash
|
|
|
|
# Raspibolt RTL: systemd unit for RTL
|
|
|
|
# /etc/systemd/system/RTL.service
|
2018-10-08 00:29:02 +02:00
|
|
|
|
|
|
|
[Unit]
|
|
|
|
Description=RTL daemon
|
|
|
|
Wants=lnd.service
|
2018-10-08 00:31:41 +02:00
|
|
|
After=lnd.service
|
2018-10-08 00:29:50 +02:00
|
|
|
|
2018-10-08 00:29:02 +02:00
|
|
|
[Service]
|
2019-01-01 17:26:51 +01:00
|
|
|
ExecStart=/usr/bin/node /home/admin/Projects/RTL/rtl
|
2018-10-10 01:23:35 +02:00
|
|
|
User=<user>
|
2018-10-08 00:29:02 +02:00
|
|
|
Restart=always
|
|
|
|
TimeoutSec=120
|
|
|
|
RestartSec=30
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
2018-10-10 01:22:28 +02:00
|
|
|
```
|
2018-10-08 00:39:30 +02:00
|
|
|
|
2018-10-08 00:35:48 +02:00
|
|
|
* enable and start RTL
|
2018-10-08 00:36:37 +02:00
|
|
|
|
2018-10-08 00:35:48 +02:00
|
|
|
`$ sudo systemctl enable RTL`
|
2018-10-08 00:39:30 +02:00
|
|
|
|
2018-10-08 00:35:48 +02:00
|
|
|
`$ sudo systemctl start RTL`
|
|
|
|
|
|
|
|
* montior the RTL log file in realtime(exit with Ctrl-C)
|
2018-10-08 00:36:37 +02:00
|
|
|
|
2019-01-10 16:27:13 +01:00
|
|
|
`$ sudo journalctl -f -u RTL`
|
2018-10-08 00:35:48 +02:00
|
|
|
|
2018-11-17 18:18:35 +01:00
|
|
|
### Accessing the Application
|
2018-09-28 03:25:15 +02:00
|
|
|
|
|
|
|
You can access the application in two ways:
|
2018-11-17 18:18:35 +01:00
|
|
|
#### Same computer as the webserver
|
2018-09-16 05:21:12 +02:00
|
|
|
Open your browser at the following address: http://localhost:3000 to access the RTL application.
|
2018-09-28 03:25:15 +02:00
|
|
|
|
2018-11-17 18:18:35 +01:00
|
|
|
#### Remotely from another computer on the same local network as the node
|
2018-09-28 03:25:15 +02:00
|
|
|
To access the application remotely from a computer, ensure that the firewall running on your node allows access on port 3000.
|
2018-10-08 00:20:31 +02:00
|
|
|
You would need the IP address of your node to access the application.
|
2018-09-28 03:39:09 +02: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.
|
2019-01-01 00:05:55 +01:00
|
|
|
|
|
|
|
### Troubleshooting
|
|
|
|
Feel free to open issues on our github, in case you are running into issues with the application.
|
|
|
|
You can also reach out via twitter DM @Sauby_k. Thanks.
|