Ligess
Time: 20 minutes
With Ligess, you configure your own lightning address server connected to your node. Learn more in the Github repository.

Requirements
- NodeJS
- A Lightning node
- A domainname which refers to your server where you would install Ligess
Installation
Go to your home directory.
cd ~Download the source code and clone the Git repository.
git clone https://github.com/dolu89/ligessGo to the code.
cd ~/ligessInstall Ligess.
npm installMake a copy of the .env.example file and rename this copy to .env.
cp .env.example .envEdit this file with your .env variables.
nano .envSave the file with Ctrl + X and confirm with Y.
Example:
LIGESS_USERNAME=your_nameLIGESS_DOMAIN=yourdomain.comLIGESS_LN_BACKEND=LNDLIGESS_LND_REST=https://0.0.0.0:8080LIGESS_LND_MACAROON=[...]HOST=127.0.0.1PORT=8088At LIGESS_LND_MACAROON you need to place a hex encoded macaroon where the example reads [...].
To create a macaroon in hex format you can use https://github.com/ZeusLN/lnd-hex-macaroon-generator.
If you have this tool installed, use it as follows:
node index.js> /home/ubuntu/.lnd/data/chain/bitcoin/mainnet/backup/invoice.macaroonYou enter the output at LIGESS_LND_MACAROON in .env.
Firewall
Open port 8088.
sudo ufw allow 8088 comment "Ligess"Your lightning address now looks like this: your_name@yourdomain.com
Test whether Ligess works by launching the application:
yarn devNext, open this link in your browser:
http://localhost:8088/.well-known/lnurlp/jouw_naam
Automation
sudo nano /etc/systemd/system/ligess.servicePaste in the following.
[Unit]Description=LigessRequires=lnd.serviceAfter=lnd.service[Service]User=ubuntuWorkingDirectory=/home/ubuntu/ligessExecStart=yarn devRestart=alwaysTimeoutSec=120RestartSec=30[Install]WantedBy=multi-user.targetSave the file with Ctrl + X and confirm with Y.
The system must be notified of the new service and can then be started.
sudo systemctl enable ligesssudo systemctl start ligessIf you want to see if everything started up properly, run this:
systemctl status ligessIf you want an overview of the status over multiple session, use this:
sudo journalctl -f -u ligessServer
Locally, your setup should now work, but your lightning address is not yet reachable from the outside. For that you can use a Nginx reverse proxy webserver setup.
Install Nginx:
sudo apt install -y nginxYou also need to install Certbot to create a Let's Encrypt SSL certificate:
sudo apt install -y certbot python3-certbot-nginxOpen port 80 and 443 for Nginx:
sudo ufw allow 'Nginx Full'Create Nginx configuration file for Ligess:
sudo nano /etc/nginx/ligess.confIn this file, paste the following text and replace yourdomainname.com with your own domain:
upstream lnurlp { server 127.0.0.1:8088;}server { server_name yourdomain.com; listen [::]:443 ssl http2; # managed by Certbot listen 443 ssl http2; # managed by Certbot ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $host; location /.well-known/lnurlp/ { if ($request_method = 'GET') { add_header 'Access-Control-Allow-Origin' '*'; } proxy_pass http://lnurlp; }}server { if ($host = yourdomain.com) { return 301 https://$host$request_uri; } server_name yourdomain.com; listen 80; listen [::]:80; return 404;}Save it with Ctrl + X and confirm with Y.
You can check the configuration with sudo nginx -t whose output should look like:
nginx: the configuration file /etc/nginx/nginx.conf syntax is oknginx: configuration file /etc/nginx/nginx.conf test is successfulTo load the Ligess Nginx configuration you need to restart Nginx with sudo systemctl restart nginx.
You now can create a Let's Encrypt SSL certificate:
sudo certbot --nginx -d jouwdomeinnaam.comUpdating
Go to the application directory.
cd ~/ligessUpdate the repository with the latest changes via Git.
git fetch --allgit pullInstall the software.
npm installRestart the Ligess service.
sudo systemctl restart ligessLigess is now updated!
Usage
To use your own lightning address you need to use a wallet that supports it. A complete list can be found here.
You can also test/decode your lightning address at https://lightningdecoder.com where you can enter your_name@jouwdomein.com at Enter Invoice.