Get started with Bitnode Studio
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.
Configuring Terminal.The Lightning Terminal (LiT) application is already pre-installed on Bitnode Studio in the following Windows Local AppData folder: 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) 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 Studio 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:
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.
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 Studio 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. 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 Studio 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 Studio. If you plan to run LiT on Bitnode Studio 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
Windows Defender Firewall will ask you to allow Lightning Terminal to communicate on both private and public networks. 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. 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 Studio and enter any of the following url in the address bar: https://127.0.0.1:8443 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. Here are some key dashboard features: - Visualize your payment channels and balances. 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. 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. Next, copy the pairing phrase from the new Session. 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. From here, click on "Connect My Node" and enter your pairing phrase. Next, click on "Connect". Once the connection is successful, you'll need to set your password to login to your node via Terminal. After initializing your session with Lightning Node Connect, you can see all the Terminal features and interact with your node from your browser. Manage your Liquidity: Suggested Node Actions: Dashboard Insights: Routing Insights: 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'. |