2018-09-28 01:37:59 +00:00
|
|
|
[ **Intro** ] -- [ [Application Features](Application_features.md) ]
|
2018-09-28 01:25:15 +00:00
|
|
|
-----
|
2018-09-15 01:32:18 +00:00
|
|
|
# RTL - Ride The Lightning
|
|
|
|
|
|
|
|
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-09-16 03:19:38 +00:00
|
|
|
For setting up your Lightning Network node, you can follow the below guide:
|
2018-09-15 01:32:18 +00:00
|
|
|
https://github.com/Stadicus/guides/blob/master/raspibolt/README.md
|
|
|
|
|
|
|
|
## Prerequisites
|
2018-10-07 22:04:25 +00:00
|
|
|
Please ensure that you have completed the installation of LND lightning node.
|
2018-09-15 01:32:18 +00:00
|
|
|
|
2018-10-07 22:04:25 +00:00
|
|
|
Its recommended to run this application on testnet, untill the aplha testing phase is over.
|
2018-09-15 01:32:18 +00:00
|
|
|
|
2018-09-16 03:27:11 +00:00
|
|
|
Recommended Browsers: Chrome, Chromium (rpi), MS Edge.
|
|
|
|
|
2018-09-15 01:32:18 +00:00
|
|
|
## Installation
|
|
|
|
|
2018-10-07 22:04:25 +00:00
|
|
|
Fetch sources from the RTL git repository, by executing the below command at the command prompt:
|
2018-09-15 01:32:18 +00:00
|
|
|
|
2018-10-07 22:13:14 +00:00
|
|
|
`$ git clone https://github.com/ShahanaFarooqui/RTL.git`
|
2018-09-15 01:32:18 +00:00
|
|
|
|
2018-10-07 22:04:25 +00:00
|
|
|
Move to the newly created directory:
|
2018-09-15 01:32:18 +00:00
|
|
|
|
2018-10-07 22:13:14 +00:00
|
|
|
`$ cd RTL`
|
2018-09-15 01:32:18 +00:00
|
|
|
|
|
|
|
Fetch the dependencies and build the application by running:
|
|
|
|
|
2018-10-07 22:13:14 +00:00
|
|
|
`$ npm install`
|
2018-09-15 01:32:18 +00:00
|
|
|
|
|
|
|
## Execution
|
|
|
|
Make sure you are in the RTL directory, where the application was built.
|
|
|
|
|
2018-09-16 03:19:38 +00:00
|
|
|
Locate the complete path of the readable macroon file (admin.macroon) on your node.
|
2018-09-15 01:32:18 +00:00
|
|
|
|
2018-10-07 22:13:14 +00:00
|
|
|
If you followed the guide above, and your on lnd version 0.4.2 or below it should be `/home/admin/.lnd`.
|
2018-10-07 22:20:31 +00:00
|
|
|
For lnd version 0.5 it should be `/home/admin/.lnd/data/chain/bitcoin/testnet`.
|
|
|
|
|
2018-10-07 22:13:14 +00:00
|
|
|
Other platform users should accordingly locate the directory of the readable macroon file.
|
2018-09-15 01:32:18 +00:00
|
|
|
|
2018-10-07 22:20:31 +00:00
|
|
|
The path of the macroon directory needs to be provided as a command line argument to start the server.
|
2018-09-15 01:32:18 +00:00
|
|
|
|
|
|
|
## Start the Webserver
|
|
|
|
Run the following command:
|
|
|
|
|
2018-09-15 01:37:04 +00:00
|
|
|
`node rtl --lndir <macaroon-path>`
|
|
|
|
|
|
|
|
For example:
|
2018-10-07 22:20:31 +00:00
|
|
|
`$ node rtl --lndir /home/admin/.lnd`
|
2018-10-07 22:21:45 +00:00
|
|
|
|
2018-10-07 22:20:31 +00:00
|
|
|
or
|
2018-10-07 22:21:45 +00:00
|
|
|
|
2018-10-07 22:20:31 +00:00
|
|
|
`$ node rtl --lndir /home/admin/.lnd/data/chain/bitcoin/testnet`
|
2018-10-07 22:21:45 +00:00
|
|
|
|
2018-10-07 22:20:31 +00:00
|
|
|
or (for windows)
|
2018-10-07 22:21:45 +00:00
|
|
|
|
2018-10-07 22:20:31 +00:00
|
|
|
`$ node rtl --lndir C:\Users\<your user directory>\AppData\Local\Lnd\data\chain\bitcoin\testnet`
|
2018-09-15 01:32:18 +00: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-10-07 22:21:45 +00:00
|
|
|
### Optional: Running RTL as a service (rpi or Linux platform users)
|
2018-10-07 22:20:31 +00:00
|
|
|
In case you are running a headless rpi or Linux node, you can configure RTL as a service.
|
|
|
|
|
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]
|
|
|
|
ExecStart=/usr/bin/node /home/admin/Projects/RTL/rtl --lndir /home/admin/.lnd/data/chain/bitcoin/testnet/
|
2018-10-08 17:05:04 +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
|
2018-10-07 22:36:37 +00:00
|
|
|
|
2018-10-07 22:35:48 +00:00
|
|
|
`$ sudo systemctl enable RTL`
|
2018-10-07 22:39:30 +00:00
|
|
|
|
2018-10-07 22:35:48 +00:00
|
|
|
`$ sudo systemctl start RTL`
|
|
|
|
|
|
|
|
* montior the RTL log file in realtime(exit with Ctrl-C)
|
2018-10-07 22:36:37 +00:00
|
|
|
|
2018-10-07 22:35:48 +00:00
|
|
|
`$ sudo jounrnalctl -f -u RTL`
|
|
|
|
|
2018-09-28 01:25:15 +00:00
|
|
|
## Accessing the Application
|
|
|
|
|
|
|
|
You can access the application in two ways:
|
|
|
|
### Same computer as the webserver
|
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
|
|
|
|
|
|
|
### Remotely from another computer on the same local network as the node
|
|
|
|
To access the application remotely from a computer, ensure that the firewall running on your node allows access on port 3000.
|
2018-10-07 22:20:31 +00:00
|
|
|
You would need 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.
|