Mobile app

Mobile app

We install Zeus (opens in a new tab), 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=0.0.0.0:8080
[...]

Firewall & reverse proxy

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

  • Enable NGINX reverse proxy to route external encrypted HTTPS traffic internally to the LND rest.
$SU $EDITOR /etc/nginx/sites-available/lnd-rest-reverse-proxy.conf
/etc/nginx/sites-available/lnd-rest-reverse-proxy.conf
server {
    listen 8081 ssl;
 
    location / {
        proxy_pass https://127.0.0.1:8080;
        proxy_ssl_verify off;
        proxy_set_header Host $host;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "Upgrade";
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}
$SU ln \
    -s \
    ../sites-available/lnd-rest-reverse-proxy.conf \
    /etc/nginx/sites-enabled/lnd-rest-reverse-proxy.conf
  • Test and reload NGINX configuration
$SU nginx -t
$SU rc-service nginx restart
 
  • Configure the firewall to allow incoming HTTPS requests
$SU ufw allow 8081/tcp comment 'allow LND rest SSL from anywhere'
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:8080
  • 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
printf "%s" \
    "lndconnect://" \
    "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 (opens in a new tab) 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 (opens in a new tab) how-to add app (opens in a new tab), the F-Droid store (opens in a new tab) or simply download the APK (opens in a new tab), 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.