Install Ride the Lightning GUI on Ubuntu server – Upgrade your Bitcoin Node

If you prefer a video guide to install RTL on your upgraded Bitcoin Node on Ubuntu Server, here is Ketan’s guide:

Install Ride the Lightning as a GUI for setting up and managing Lightning Channels.

  • We will be using instructions from the Ride the Lightning github here: https://github.com/Ride-The-Lightning/RTL/
  • One of the requirements is to run node.js. We will find installation instructions for that here: https://github.com/nodesource/distributions/blob/master/README.md#debinstall
  • Run this command [curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -]
  • Then this one [sudo apt-get install -y nodejs]
  • If you want to avoid permission errors for npm installs, do the following command [mkdir ~/.npm-global] and then [npm config set prefix ‘~/.npm-global’]
  • Enter [nano .profile]
  • At the bottom of that file add this line [export PATH=~/.npm-global/bin:$PATH]
  • Then command [source .profile]
  • cd into downloads [cd downloads]
  • From this webpage copy the RTL archive and wget that into your downloads directory example: [wget https://github.com/Ride-The-Lightning/RTL/archive/refs/tags/v0.12.3.tar.gz]
  • Use this command but keep an eye on your version number [tar -xvf v0.12.2.tar.gz]
  • In the example above I installed 12.3, but the command show on the RTL install page doesn’t have that updated, so be aware.
  • You can move this to your home directory if you prefer: [mv RTL-0.12.3/ ~] (again, beware of version numbers)
  • Go to home directory [cd ~]
  • Make a directory for your LND backups with the command [mkdir lndbackup]
  • Verify RTL directory is in /home with [ls]
  • Rename it with command [mv RTL-0.12.3/ RTL] (beware of version number)
  • cd into RTL [cd RTL]
  • install this [npm install –only=prod –legacy-peer-deps]
  • Check [ls] to view files. You should see a sample .json file
  • Copy that file and rename it [cp RTL-Config.json]
  • Edit that file using [nano RTL-Config.json]
  • You should see the   “multiPass”: “password”, line, change the password to one of your choosing. This is how you will login to RTL.
  • Confirm that your admin.macaroon file is in /home/<YOURUSERNAME>/data/chain/bitcoin/mainnet and you can then paste that into the line that says “macaroonpath”
  • The “configpath” line should have the filepath /home/<YOURUSERNAME>/.lnd/lnd.conf
  • The “channelbackupath” should be /home/figure8/lndbackup
  • Control x, y, enter to save and return to command line
  • Start the server with [node rtl]
  • Visit <YOURNODEIPADDRESS>:8080 to see if Ride the Lightning is up
  • If it is, stop it in terminal using ‘Control c’
  • Now we will create a service file to make it start automatically on boot
  • There are instructions here: https://github.com/Ride-The-Lightning/RTL/ at the bottom of the page
  • Create the service file using [sudo nano /etc/systemd/system/RTL.service]
  • Paste the below into that file:
[Unit]
Description=RTL daemon
Wants=lnd.service
After=lnd.service

[Service]
ExecStart=/usr/bin/node /home/<YOURUSERNAME>/RTL/rtl
User=<YOURUSERNAME>
Restart=always
TimeoutSec=120
RestartSec=30

[Install]
WantedBy=multi-user.target
  • Make sure you update your username in the above
  • Control x, y, enter
  • Enable it with [sudo systemctl enable RTL.service]
  • Start it with [sudo systemctl start RTL.service]
  • Check status with [sudo systemctl status RTL.service]