How To Make Your Bitcoin Lightning Network Node Mobile

This is a viewpoint editorial by Anthony Feliciano, a Bitcoin occasions organizer and contributor at Bitcoin Magazine.This short article is a follow up to a previous article I composed, talking about various types of Lightning nodes. I will be broadening on the RaspiBlitz Lightning Network node. I wont be going into the many other alternatives and features of what RaspiBlitz provides, but this is a distinct twist. This job began 4 years earlier when I was being in my apartment, midday, and the power unexpectedly headed out. The very first thing that goes through a typical persons mind, is “damn it, powers out– I wonder how long is it going to take and do I need to begin searching in the refrigerator to perhaps BBQ what might thaw?” Not me! I right away believed, “MY LIGHTNING NODE!” Long story short, the power was just out for a number of hours. At that time it got me thinking, if something like this happens again, what can I do?What manifested next was a job that followed me setting up a RaspiBlitz LN node. That project being to find out a way to keep the LN node running when power and web goes out. The issues to resolve for: Power– what can I use to keep the LN node running throughout the next power outage?Internet– how do I keep the LN node connected to the web to keep LN sync d? Mobility– what if there was a fire or emergency situation and I had to leave, taking just what I can carry?PowerIf you review the concerns, you yourself are probably already likewise thinking of services. The first issue is simple to fix – get an uninterruptible power supply (UPS) as a backup. Makes sense? If the power heads out, UPS kicks on and keeps the gadgets power on without any problems. Only follow-up concern is, the length of time do you need? There are numerous UPSs on the marketplace offering power for any number of hours, so at that point it becomes a matter of choice and budget plan. I opted for a roughly two-hour power supply UPS model. At the time I had absolutely nothing, so this was still new to me and had actually never crossed my mind. While not the longest charge or most powerful UPS out there, the UPS I chose only offers backup power to my LN node and my router; if I lose internet, I can still keep my router power going and link through a Secure Shell (SSH) terminal to my devices on the network. Problem resolved. If you are using a WiFi setup to start with, Internet ** Note ** The following solution is based upon. You can still include the WiFi network as a backup from the actions listed below if you are utilizing the Ethernet cable. Also, if you keep your router powered up by a UPS, this does not constantly imply you lose web in a power outage, as this will depend upon whether your supplier is impacted as well. This approach is for a greater location power outage or emergency situation, and will contribute to fixing the third issue– movement. Internet And Maintaining Connectivity While everybody frets about power, and rightfully so, many forget the second most essential part– the internet connection. How do I keep this device connected if there is a power failure? Easy– this is when I started looking into; thankfully since I am utilizing a Raspi 4 that features built-in WiFi, with an easy setup of the WiFi file you can add a second WiFi network. How To Setup A Second Network On Your Raspi: Head over to this page for more information: Set up WiFi on Raspi This is the line of code you are looking for: sudo nano/ etc/wpa _ supplicant/wpa _ supplicant.conf ** NOTE ** If you are not using WiFi and rather are utilizing RJ45 (Ethernet) your wpa_supplicant. conf file might not have this code at the top; if it is missing add it: ctrl_interface=DIR=/ var/run/wpa _ supplicant GROUP=netdevupdate_config=1country=US – ** Change your country code if outside the United States ** To enter this code, exit out of your RaspiBlitz menu to the terminal screen, which ought to appear like this:admin@NODEIPADDRESS:~ $Enter the code to look like this below:admin@NODEIPADDRESS:~ $ sudo nano/ etc/wpa _ supplicant/wpa _ supplicant.confI wont be revealing my setup, but you will see your setup when you open the file. I took this from the “Set up WiFi on Raspi” link above. ctrl_interface=DIR=/ var/run/wpa _ supplicant GROUP=netdevupdate_config=1country=USnetwork= ssid=”SchoolNetworkSSID”psk=”passwordSchool”id_str=”school” network= ssid=”HomeNetworkSSID”psk=”passwordHome”id_str=”home” What you will see on your file is your WiFi network that you already utilize. What you are adding is that second network. So what is your second network? I imply the number of WiFi spots can you link to? Do you understand the SSID (service set identifier) and the password to connect to them? In my instance, I utilized my cellular phones hotspot. Thats right, you can utilize your cellphone as a hotspot to function as WiFi, so that your LN node can link to it. So for the 2nd network on the list, I entered my SSID and the password that is given by my cellphone hotspot feature.Question– but what if I use my cellphone hotspot? How will I know the IP address to link to it? Dont fret, Ive got you covered with that. On your phone (I utilize Android) download an app called Termius which imitates a SSH terminal from your cellphone to your LN gadget. ** Note ** If you have a screen on your RaspiBlitz, the IP address to connect to will appear there as well, which suggests you entered the second WiFi network properly and your phone and device are interacting. ** Note ** If you run your gadget headless (no screen) like I do, then you have to get the IP address, from “connected gadget” info, an action that I discuss belowTermius AppSteps: Due to security policy I cant take screenshots to demonstrate how to set up the app on your phone, however I can assist you.Open the appClick “+” – New HostFill out the details – Alias (name for the connection) Hostname or IP Address: you will get this IP address when your node connects to your mobile phone hotspot. Ill show how to get this later.Make sure “SSH” box is checked.User name: for RaspiBlitz users the user name is “admin” but if you changed it to something else, then it is whatever you called it,. Password: DONT ENTER A PASSWORD! If you enter it, it will immediately connect, which is a security flaw if somebody enters into your phone. Leave it blank when you click the alias name, it will ask you for the password of your device to link to. Click the check mark at top to add the brand-new connection. When you make your first SSH connection into the device it will ask you to accept the fingerprint to do so. Click “Yes.”Below is a screenshot of what this all looks like: As you can see, Im on my cellular phone hotspot. My WiFi network is “Gopoundsand” in addition to the password offered (psk), which I went into as the 2nd WiFi network.network= ssid=”Gopoundsand” psk=”passwordHome” id_str=”home” If you see connected gadgets (your LN node name) that suggests you successfully set up the sudo nano/ etc/wpa _ supplicant/wpa _ supplicant.conf correctly and your device is now WiFi connected to your cellphone and the web. Congratulations on making it this far! ** Note ** Make sure your first connection if you use Ethernet is unplugged, or if you use WiFi, as your main connection, that it is turned off. For when you reboot, the device will lock onto your main WiFi network and wont look for your second connection. This will take a couple of minutes on reboot to develop a connection.You can now go to mobile hotspot from settings and see connected gadgets or swipe down from the notice bar, like shown above to see linked devices. Now click on “information” of the linked device, and “information” again. This is where you will see the IP address given from your cellular phone to the device. (Example: 192.168.200.102.) That info will now go into the Termius app: Hostname or IP Address: you will get this IP address when your node links to your cellular phone hotspot. If you managed to do everything correctly then you must arrive to this area in the screenshot: This is the menu screen of the RaspiBlitz, on my Android phone with Termius app.If you handled to get through all the actions, then you have actually effectively added a 2nd WiFi network to your sudo nano/ etc/wpa _ supplicant/wpa _ supplicant.conf, handled to get the LN node to connect to your cellular phone by means of hotspot and were finally able to SSH into your gadget and get your LN node to resync over cellular and access the RaspiBlitz menu as seen in the screenshot above you. Congratulations, you are going to make it!Tips if something fails to connect: Make sure the SSID and password are right in the sudo nano/ etc/wpa _ supplicant/wpa _ supplicant.conf file. Ctrl+x to exit, “y” to save the file if the details is proper. Or “n” if you mistyped something.When rebooting the LN node, to link to your cell phone hotspot, then provide it a couple of minutes to establish that connection. Do not fear you did something wrong – if it takes over 5 minutes, then its probably worth troubleshooting.Make sure your first connection if you utilize Ethernet is unplugged, or if you utilize WiFi, as your main connection, that it is turned off. For when you reboot, the gadget will lock onto your primary WiFi network and wont look for your 2nd connection. On SSH through terminal, make certain you have the appropriate IP address from your hotspot. And include that info to the new host connection. (Side note: on some gadgets like mine, everytime I turned off and switched on the hotspot, I got a brand-new IP address, so I have to “modify connection alias” in the app with the new IP address, and SSH will reconnect. MobilityWe finally come to the last step. What if there is a significant emergency situation, a fire or say just a trip, and you needed to take just what you could and go? Could you take your LN node with you? How would you do it? If you chose a moderately-sized UPS, you can always grab that and go, as it offers a couple of hours required to keep your system going until you can get to a more stable setup. Lets state, your UPS is chunky and huge, and taking it with you is just not possible. I considered that too, and chose to choose a 28800mAH solar backup charger, generally what you could utilize to charge your mobile phone. Why is this handy? Due to the fact that its small, light, and flexible. The system also has usages (usb-c adapter) for wall charging the unit. But more notably, the solar battery charger provides the power (3Amp) required to power up your gadget including the external SSD.Tips: You cant wall-charge the backup battery charger while attempting to power up the LN gadget; it didnt kill the Pi, simply stopped it from working. I pulled the power, waited some time, and rebooted back up.You cant utilize both USB ports to connect to your Raspi USB ports. That will fry your board: So yea, I killed my board. The good news is it was just the board, which was only a $35 replacement. To sum it up, I learn through trial and error. Hope you had a laugh about it however hopefully it assists somebody prevent unneeded stress. This is the end outcome (picture taken at a state park in the Rocky Mountains): ConclusionThis can be a weekend project for you. , if you are currently running a node and feel like getting a bit #reckless this is a fun way to broaden your skills and applicationsAbilitiesAbilities Even if you dont do it this specific method, I hope this motivated you to consider a more imaginative way to fix the issues that I experienced. Now go be #reckless. This is a visitor post by Anthony Feliciano. Viewpoints expressed are totally their own and do not always show those of BTC Inc or Bitcoin Magazine.

The problems to solve for: Power– what can I utilize to keep the LN node running throughout the next power outage?Internet– how do I keep the LN node linked to the web to keep LN sync d? If the power goes out, UPS kicks on and keeps the gadgets power on with no problems. While not the longest charge or most effective UPS out there, the UPS I chose only supplies backup power to my LN node and my router; if I lose internet, I can still keep my router power going and connect by means of a Secure Shell (SSH) terminal to my gadgets on the network. If you keep your router powered up by a UPS, this does not constantly indicate you lose internet in a power outage, as this will depend upon whether your company is affected. More significantly, the solar battery charger provides the power (3Amp) required to power up your device including the external SSD.Tips: You cant wall-charge the backup charger while attempting to power up the LN gadget; it didnt kill the Pi, just stopped it from working.

Leave a Reply

Your email address will not be published.