Get started with Bitnode Box

Lightning Terminal (LiT)

This chapter describes how to configure and run Lightning Terminal (LiT), a web-based dashboard for Lightning Labs products. Through Terminal, you can easily and securely monitor your Lightning node, open payment channels, and manage inbound and outbound liquidity on the Lightning Network.

Getting started with Lightning Terminal (LiT)

Configuring Terminal.

The Lightning Terminal (LiT) application is already pre-installed on Bitnode Box in the following Windows Local AppData folder:
C:\Users\Bitnode\AppData\Local\Lit

Lightning Terminal (LiT) Windows Directory

Within the base directory you can find the configuration file (lit.conf) to customize your Lightning Terminal. This configuration file is a plain text file and consists of option=value entries, one per line, with optional comments starting with the '#' character.

To edit it, you can use the pre-installed Notepad++ application, a free and open-source text and source code editor.

Lightning Terminal (LiT) Configuration File

Lightning Terminal (LiT) offers two main operating modes, one in which LND is running inside the LiT process (called "lnd integrated mode", set by lnd-mode=integrated config option) and one in which LND is running in a standalone process on the same or remote machine (called "lnd remote mode", set by lnd-mode=remote config option).

Bitnode Box comes with a Lightning Terminal configuration in integrated mode. This enables LND to be started within the same process as Lightning Terminal daemon (litd), alongside the UI server, and everything is stored in LND's main data directory.

Integrated mode also allows you to run a suite of Lightning Labs tools, such as Lightning Pool, Loop, Faraday and Taproot Assets, in a single binary, simplifying the process of starting, stopping and upgrading all your tools.

The following custom configuration applies to Lightning Terminal:

 

      # lit.conf - Lightning Terminal (LiT) configuration file.

      # Application options
      lit-dir=$LOCALAPPDATA\Lit
      network=mainnet
      httpslisten=127.0.0.1:8443
      uipassword=your_ui_password
      lnd-mode=integrated

      # Integrated lnd options
      lnd.lnddir=$LOCALAPPDATA\Lnd
      lnd.listen=0.0.0.0:9735
      lnd.rpclisten=127.0.0.1:10009
      lnd.restlisten=127.0.0.1:8080
      lnd.externalip=your_external_ip
      lnd.debuglevel=info
      lnd.alias=Bitnode
      lnd.color=#00cd67
      lnd.gc-canceled-invoices-on-startup=true
      lnd.gc-canceled-invoices-on-the-fly=true
      lnd.ignore-historical-gossip-filters=true
      lnd.sync-freelist=true
      lnd.stagger-initial-reconnect=true
      lnd.accept-amp=true
      lnd.protocol.wumbo-channels=true
      lnd.protocol.no-anchors=false
      lnd.db.bolt.auto-compact=true
      lnd.bitcoin.active=true
      lnd.bitcoin.node=bitcoind
      lnd.bitcoin.mainnet=true
      lnd.bitcoind.rpchost=127.0.0.1
      lnd.bitcoind.rpcuser=your_rpc_username
      lnd.bitcoind.rpcpass=your_rpc_password
      lnd.bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332
      lnd.bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333

      # Integrated faraday options
      faraday.connect_bitcoin=true
      faraday.bitcoin.host=127.0.0.1
      faraday.bitcoin.user=your_rpc_username
      faraday.bitcoin.password=your_rpc_password
      faraday.debuglevel=info

      # Integrated loop options
      loop.debuglevel=info

      # Integrated pool options
      pool.debuglevel=info
      pool.newnodesonly=true

Your Lightning Terminal is provided with a random user interface password (uipassword) that you can change in the configuration file (lit.conf) whenever you want. Note that a password with a minimum of 8 characters is required to run Lightning Terminal. In a production environment, it's recommended that you store this password as an environment variable to avoid it being recorded in the command history.

Enabling P2P Connections.

Lightning routing nodes must be externally accessible from the Internet to let others connect and open channels with you. Therefore, your routing node will need to expose a reachable public IP address. For this, edit your Lightning Terminal (LiT) configuration file by removing the semi-colons at the beginning of the 'lnd.externalip' entry and adding your external IP address.

 

      lnd.externalip=your_external_IP

You’ll also need to enable incoming traffic on port 9735, as it is the default LND port to listen on for incoming P2P connections and inbound channels (see chapter 4).

Bitnode Box comes with an inbound port rule (LiT p2p connections) on Windows Defender Firewall that allows incoming TCP data connections to the LiT application (litd.exe) on port 9735.

Lightning Terminal (LiT) Windows Firewall Inbound Rules

Configuring Web Browser.

Lightning Terminal (LiT) is a web-based dashboard that serves content securely over HTTPS. It uses the self-signed TLS certificate that is auto-generated by LND (or LiT itself in remote mode) to encrypt the browser-to-server communication.

Nonetheless, self-signed certificates aren't trusted by web browsers because they are generated by a self-hosted server, not by a CA (Certificate Authority). Therefore, web browsers will display a HTTPS certificate warning when using the self-signed certificate.

To fix this browser warning you get about the self-signed certificate, browser settings are required. Bitnode Box already has the Google Chrome browser pre-configured to allow invalid certificates for resources loaded from localhost (see chrome://flags).

If you want to use another browser, such as Microsoft Edge, you will need to configure it as follows:

Step 1: Launch Microsoft Edge browser on your Bitnode Box.
Step 2: Type edge://flags in the address bar and press the Enter key.
Step 3: Use the search bar to find the flag "Allow invalid certificates for resources loaded from localhost". Enable this flag, and quit.

Lightning Terminal (LiT) Browser Setup

If you plan to run LiT on Bitnode Box but access the web-interface from your remote computer, you may not want to deal with self-signed certificate browser warnings. To avoid these warnings configure the HTTP server to use a certificate from Let's Encrypt. View the Let's Encrypt Configuration doc for instructions on how to configure this.

Running Lightning Terminal.

To begin using Lightning Terminal (LiT) in integrated mode, you first need to make sure that there is no local LND instance running at the same time as LiT, and your Bitcoin Core node is fully synchronized. If you had previously started LND, please shut down the lnd process with the command 'lncli stop'.

Next, to start the Lightning Terminal daemon (litd) and all processes set to integrated mode, open a new PowerShell tab in Windows Terminal and type the below command line:

> litd

Lightning Terminal Windows PowerShell

Windows Defender Firewall will ask you to allow Lightning Terminal to communicate on both private and public networks.

Lightning Terminal Windows Defender Firewall

By executing litd in integrated mode, LND is started within the same process as litd. LND is available through the same port as when run as a standalone process.

Lightning Terminal (LiT) Start

When you first start LiT, it auto-generates a self-signed TLS (Transport Layer Security) certificate in the LiT base directory. Each TLS certificate consists of a key pair made of a public key (tls.cert file) and private key (tls.key file).

Next, you will have to unlock an existing LND wallet, or create a new wallet if this is your first time starting LND (see chapter 4). To unlock an existing wallet, you need to open a second command-line terminal by clicking on Command Prompt. Note that the previous litd instance will be running in its own terminal window, so that you can see its log outputs. Then, enter the following command to unlock it:

> lncli unlock

Next, type your wallet password. Once the integrated LND has been unlocked and is fully synced to its chain backend, litd then goes ahead and starts Loop, Pool and Faraday, and connects them to the integrated LND node.

In integrated mode, litd runs a single binary that integrates loopd, poold and faraday daemons all in one. All of these services are reachable inside litd both via port 8443 and 10009. LiT uses the port 8443 to expose a variety of interfaces: gRPC, REST, grpc-web. When making requests using this interface, LiT's TLS cert and macaroons should be used.

Accessing the User Dashboard.

Once you are running the Lightning Terminal daemon (litd), and LND is fully synced to its chain backend (this might take a while), you should be able to access the web-based user dashboard. Note that your wallet needs to be unlocked with 'lncli unlock' before you can access the user interface. Then open the Google Chrome browser on your Bitnode Box and enter any of the following url in the address bar:

https://127.0.0.1:8443
https://localhost:8443

Lightning Terminal (LiT) Access to User Dashboard

To access Lightning Terminal, type your user interface password (uipassword) that you can find in the configuration file (lit.conf), and submit.

After you first log in to Lightning Terminal, it will show you a welcome tour through the different sections of the dashboard and show you how to perform a Loop. You may also reference the Walkthrough document for additional guidance on how to use the product.

Lightning Terminal (LiT) Dashboard

Here are some key dashboard features:

- Visualize your payment channels and balances.
- Perform submarine swaps via the Lightning Loop service.
- Monitor the progress of your ongoing Loops.
- Classify channels according to your node's operating mode.
- Use Pool to earn sats by opening channels to those needing inbound liquidity.
- Access a preview release of the Pool UI.

Connecting to Terminal Web.

Note that it is currently not possible to see recommended channels, make and receive payments, or see recent forwarded transactions through the interface of the self-hosted Lightning Terminal. To enjoy all features on Terminal Web, a new web-based node management UI for Lightning node operators, you can use Lightning Node Connect (LNC).

Lightning Node Connect (LNC) is an open source tool that allows establishing a secure and private connection between a Lightning Network node (LND) and a web browser or remote application. This first implementation is used by Lightning Terminal to enable anyone to manage their node easily over a web portal, independent from where the user or their node are located.

The process starts with the user creating a new Lightning Node Connect session in litd. This creates a pairing phrase, typically 10 English words from which a 64-byte stream ID can be derived. Then litd starts to listen for incoming connections through the proxy, listening on the stream with the derived ID.

For this, once you have navigated to your local installation of Lightning Terminal, click on "Lightning Node Connect" where you can inspect and revoke all existing sessions.

Lightning Node Connect New Session

From here, click on "Create a new session" and then assign a Label to your session and select your Permission type, either Read-Only or Admin. Finally, submit it.

Lightning Node Connect Submit Session

Next, copy the pairing phrase from the new Session.

Lightning Node Connect Copy Pairing Phrase

Once you get the required pairing phrase, go to Home menu and click on "Connect to Terminal" to be taken directly to Terminal on the web.

Lightning Terminal Web

From here, click on "Connect My Node" and enter your pairing phrase. Next, click on "Connect".

Lightning Terminal Connect My Node

Once the connection is successful, you'll need to set your password to login to your node via Terminal.

Lightning Terminal Set Your Password

After initializing your session with Lightning Node Connect, you can see all the Terminal features and interact with your node from your browser.

Lightning Terminal Web Dashboard

Manage your Liquidity:
Balance your channels and purchase inbound liquidity easily with Loop and Pool built-in.

Suggested Node Actions:
Recommendations for improving your node based on current health and rank.

Dashboard Insights:
View your node performance through a dashboard which includes insights on rank, centrality, and health.

Routing Insights:
View your routing insights like payments forwarded and fees earned through a time filter.

To learn more, please check What is Lightning Terminal on the project’s official website.

Upgrading Lightning Terminal.

It is recommended to upgrade Lightning Terminal to the latest release whenever it becomes available. If you miss a release, you should upgrade directly to the latest version.

Before upgrading, you need to shut down LiT by stopping the integrated LND node with the command 'lncli stop'. This may take a minute for the process to shut down completely.

Then, downloading and installing a release binary is recommended for use on mainnet. For this, visit the official release page on GitHub and select the latest version that does not have the "Pre-release" label set (unless you explicitly want to help test a Release Candidate, RC).

Choose the zip package for Windows 64bit version (amd64) and download it. Then extract all the binary files and place them to the 'bin' directory of your existing Lightning Terminal, overwriting the previous binaries.

C:\Users\Bitnode\AppData\Local\Lit\bin

Now you can start the Lightning Terminal daemon (litd) again, unlock the wallet and verify you are using the correct version with the command 'lncli version'.



◁  Lightning Network   |   Get Started  ▷

Back to Get Started