Installing RTL⚡ on Raspberry Pi🍓
Let’s face the truth: we “nerds” like to play with shell commands, but often a nice GUI is a great help.
So, if you installed a Bitcoin Lightning Network at home using a RaspberryPi as I did, I’ll show you how to install the Ride The Lightning (RTL) GUI.
The mandatory introduction: What is Ride The Lightning (RTL)?
Quoting from the github of the project:
“RTL is a full function, device agnostic web user interface for Lightning Network Daemon, to help manage lightning node operations.”
Because I’m using LND on my Lightning Network node, I decided to give a try to RTL, that seams to be an ideal companion for the command line tool lnd
How to install RTL on Raspberry Pi
Here is what I did step by step.
login as admin and install nodejs
sudo apt-get update
sudo apt-get dist-upgrade
curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -
sudo apt-get install -y nodejs
Install RTL as bitcoin user
sudo su - bitcoin
cd /mnt/hdd
git clone https://github.com/ShahanaFarooqui/RTL.git
cd RTL
npm install
after some time… we can move back to the home directory and create a symbolic link
cd
ln -s /mnt/hdd/RTL .RTL
Now it’s time to edit the config file, using the sample-RTL.conf
as draft
cp sample-RTL.conf RTL.conf
Here is the content, remember to change the rtlPass
field
[Authentication]
macaroonPath=/home/bitcoin/.lnd
nodeAuthType=CUSTOM
lndConfigPath=/home/bitcoin/.lnd/lnd.conf
rtlPass=XXXXXXXXX[SSO]
rtlSSO=0
rtlCookiePath=
logoutRedirectLink=/login
[Settings]
flgSidenavOpened=true
flgSidenavPinned=true
menu=Vertical
menuType=Regular
theme=dark-blue
satsToBTC=false
bitcoindConfigPath=/home/bitcoin/.bitcoin/bitcoin.conf
enableLogging=true
port=3000
lndServerUrl=https://localhost:8080/v1
Let’s now start the server to check that everything is working fine, and open the web browser. Remember to change localhost
with the ip address of your Raspberry Pi node.
node rtl$ Server is up and running, please open the UI at http://localhost:3000
Now that we know that RTL is working, we can setup RTL as a service.
We need to create RTL systemd unit and with the following content. Save and exit. Remember to use the admin
user.
sudo vim /etc/systemd/system/RTL.service
This is the content of the file:
# Raspibolt RTL: systemd unit for RTL
# /etc/systemd/system/RTL.service[Unit]
Description=RTL daemon
Wants=lnd.service
After=lnd.service[Service]
ExecStart=/usr/bin/node /home/bitcoin/.RTL/rtl
User=bitcoin
Restart=always
TimeoutSec=120
RestartSec=30[Install]
WantedBy=multi-user.target
now enable and start RTL
sudo systemctl enable RTL
sudo systemctl start RTL
Yoi can also montior the RTL log file in realtime(exit with Ctrl-C)
sudo journalctl -f -u RTL
How to use the RTL GUI
Saubyk wrote an excellent guide on that topic, so I just refer to it:
Hope this helps!