Ride The Lightning
Ride The Lightning (RTL) is a web-based interface for managing a Lightning node. It provides a convenient way to view your node, channels, peers, balances and payments from any web browser on your local network.
RTL does not store your bitcoin or hold your Lightning channels. It communicates with LND using its REST API and authenticates using LND's administrative macaroon.
The github repository can be found here.
github.com/Ride-The-Lightning/RTL.
A link to the latest release can be found on the right hand side of the page. Make note of the latest release number.
Install Debian dependencies.
Check if the following packages are installed.
node --version
npm --version
git -v
Install them if they're not.
apt install git nodejs npm
Create the RTL user
Create a dedicated system account for RTL.
useradd \
--system \
--home-dir /var/lib/rtl \
--create-home \
--shell /usr/sbin/nologin \
rtl
Create the application directory.
mkdir -p /usr/local/lib/rtl
Download RTL
Clone the RTL repository directly into the installation directory.
git clone https://github.com/Ride-The-Lightning/RTL.git /usr/local/lib/rtl
Change into the RTL directory.
cd /usr/local/lib/rtl
Verify the signed release tag
Import the developer's public key.
curl https://keybase.io/suheb/pgp_keys.asc | gpg --import
Then verify. At the time of writing the latest release was v0.15.9.
git tag -v v0.15.9 (use latest release number)
You should see a Good signature message before continuing.
Check out the verified release.
git checkout v0.15.9 (use latest release number)
Install RTL
Install the production dependencies.
npm ci --omit=dev --legacy-peer-deps
Configure RTL
RTL stores its database under /var/lib/rtl, while the configuration file remains in the installation directory.
Create the database directory.
mkdir -p /var/lib/rtl
RTL includes a default configuration file named Sample-RTL-Config.json. Copy it into the file we'll use.
cp Sample-RTL-Config.json RTL-Config.json
Edit the file.
nano /usr/local/lib/rtl/RTL-Config.json
Only the following settings need to be changed.
"dbDirectoryPath": "/var/lib/rtl"
"macaroonPath": "/var/lib/lnd/data/chain/bitcoin/mainnet"
"configPath": "/etc/lnd.conf"
"channelBackupPath": "/var/lib/lnd/data/chain/bitcoin/mainnet/channel.backup"
Save the file and exit the editor.
Configure LND permissions
RTL needs permission to read LND's TLS certificate and administrative macaroon. Add the rtl user to the lnd group.
usermod -aG lnd rtl
Grant the lnd group read and execute access to the directories that contain the TLS certificate and macaroons.
chmod 750 /var/lib/lnd
chmod 750 /var/lib/lnd/data
chmod 750 /var/lib/lnd/data/chain
chmod 750 /var/lib/lnd/data/chain/bitcoin
chmod 750 /var/lib/lnd/data/chain/bitcoin/mainnet
Allow members of the lnd group to read the TLS certificate and administrative macaroon.
chmod 640 /var/lib/lnd/tls.cert
chmod 640 /var/lib/lnd/data/chain/bitcoin/mainnet/admin.macaroon
These permissions allow RTL to authenticate with LND while preventing access from other users on the system.
Create the systemd service
Create the RTL service.
nano /etc/systemd/system/rtl.service
Enter the following.
[Unit]
Description=Ride The Lightning (RTL)
After=network-online.target lnd.service
Wants=network-online.target
[Service]
Type=simple
User=rtl
Group=rtl
WorkingDirectory=/usr/local/lib/rtl
ExecStart=/usr/bin/node rtl
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
Save the file and exit the editor.
Reload systemd.
systemctl daemon-reload
Enable the service
Enable RTL so that it starts automatically when the system boots.
systemctl enable rtl
Start the service
Start RTL.
systemctl start rtl
Verify the installation
Check that the service is running.
systemctl status rtl
Add these two lines to /etc/bitcoin.conf
zmqpubrawblock=tcp://127.0.0.1:28332
zmqpubrawtx=tcp://127.0.0.1:28333
Then restart Bitcon Core.
systemctl restart bitcoind
You should see the service listed as active (running).
Open a web browser and connect to your server on port 3000.
http://your-server-ip:3000
The Ride The Lightning login page should appear.
The default password is 'password'. Change it once you've logged in.
After logging in, RTL should connect to your LND node and display your Lightning wallet.
Incorporate RTL into the dashboard.
Create the web server configuration file.
nano /etc/apache2/sites-available/rtl.conf
Copy the following into rtl.conf.
<VirtualHost *:4083>
ProxyPreserveHost On
ProxyRequests Off
ProxyPass / http://127.0.0.1:3000/
ProxyPassReverse / http://127.0.0.1:3000/
ErrorLog ${APACHE_LOG_DIR}/rtl-error.log
CustomLog ${APACHE_LOG_DIR}/rtl-access.log combined
</VirtualHost>
Enable the site.
a2ensite rtl.conf
Configure apache2 to listen on port 4083.
nano /etc/apache2/ports.conf
Insert the following line.
Listen 4083
Enable apache2 modules.
a2enmod proxy
a2enmod proxy_http
Restart apache2 webserver.
systemctl restart apache2