Mobile app

We install Zeus, a cross-platform mobile app that connect to your LN node over local network or over Tor. Make payments with lightning or on-chain and manage your channels while you’re on the go.

Zeus mockup

Preparations

Configure LND

  • Edit this line
$SU $EDITOR /etc/lnd/lnd.conf
/etc/lnd/lnd.conf
[...]
restlisten=localhost:8080
[...]

Reverse proxy

In the Security section, we set up a reverse proxy. Now we can add the LND rest configuration.

  • Enable the reverse proxy to route external encrypted HTTPS traffic internally to the LND rest.
$SU $EDITOR /etc/caddy/streams/lnd-rest.caddy
/etc/caddy/streams/lnd-rest.caddy
:8081 {
        route {
                proxy 127.0.0.1:8080
        }
}
  • Reload Caddy
$SU rc-service caddy restart

Firewall

  • Configure the firewall to allow incoming HTTPS requests
$SU $EDITOR /etc/awall/optional/lnd-rest.json
/etc/awall/optional/lnd-rest.json
{
  "description": "Allow LND rest SSL",
 
  "filter": [
    {
      "in": "internet",
      "out": "_fw",
      "service": { "proto": "tcp", "port": 8081 },
      "action": "accept",
      "conn-limit": { "count": 10, "interval": 60 }
    }
  ]
}
  • Enable it
$SU awall enable lnd-rest
$SU awall activate
Access over Tor
  • Add the following lines in the section for “location-hidden services” in the torrc file. Save and exit.
$SU $EDITOR /etc/tor/torrc
/etc/tor/torrc
# Hidden Service LND REST
HiddenServiceDir /var/lib/tor/lnd-rest/
HiddenServiceVersion 3
HiddenServicePoWDefensesEnabled 1
HiddenServicePort 8081 127.0.0.1:8081
  • Reload Tor configuration and get your connection address.
$SU rc-service tor reload
$SU cat /var/lib/tor/lnd-rest/hostname
output
abcdefg..............xyz.onion
  • Save the onion address in a safe place (e.g., password manager). You should now be able to connect to your LND rest remotely via Tor using your hostname and port 8081

Create a lndconnect QR code

  • Install qrencode
$SU apk add libqrencode-tools
  • There is a utility tool called lndconnect, but instead of installing it we can generate a qr with a valid lndconnect url very easily like this

Define the hostname or IP address of your node in the HOP variable. Leave blank to use the default value nakamoto01.local.

HOP=192.168.21.40
printf "%s" \
    "lndconnect://" \
    "${HOP:-nakamoto01.local}" \
    ":8081" \
    "?cert=" \
    "$(
        grep -v 'CERTIFICATE' /var/lib/lnd/tls.cert |\
        tr -d '=' |\
        tr '/+' '_-'
    )" \
    "&macaroon=" \
    "$(
        base64 /var/lib/lnd/data/chain/bitcoin/mainnet/admin.macaroon |\
        tr -d '=' |\
        tr '/+' '_-'
    )" |\
tr -d '\n' |\
qrencode -t ansiutf8 -o -
  • It will be a big QR code, so maximize your terminal window and use <CTRL><-> to shrink the code further to fit the screen

  • Keep the SSH session with the QR code opened, it will be needed later

Installation

Install the Zeus app

Download the Zeus app for your mobile phone. Check the Zeus website for the direct download links to the Apple App Store or Google Play.

On Android, if you can’t or do not want to use Google Play, you can use Obtanium how-to add app, the F-Droid store or simply download the APK, tap it and install it. If it’s the first time you install an APK on your phone you will be asked to authorize the app to install unknown apps, simply follow the on-screen instructions to do so.

Configuration

Connect Zeus to your node

  • Open Zeus and tap on ADVANCED SET-UP
  • Tap on + Connect a node
  • Enter a Nickname for your node (e.g., “Microbolt”)
  • Click on “scan button” at the top right and, if prompted, allow Zeus to use the camera
  • Scan the QR code generated earlier
  • Click on SAVE NODE CONFIG. Zeus is now connecting to your node, and it might take a while the first time.

Security

Anyone using Zeus on your phone has control over your node and all its funds. It is strongly recommended to set up a password for the app.

  • In the app, tap on the node icon in the top-left corner
  • Click on Security and Set/Change Password or Set/Change PIN to enter a password or PIN
  • Save your password or PIN somewhere safe, e.g., in your password manager

Zeus in action

Below is a list of Zeus existing and planned features at 2024-03-16:

Zeus features

Update

To update Zeus, update the app using the same method you used to install it.