A small utility program I wrote to manage lightning address payments to my node.
- Create a application macaroon
lnd $ lnd-cli bakemacaroon invoices:read invoices:write address:read address:write --save_to ./app.macaroon
- Create a python virtual env
lnd $ python3 -m venv .env
- Source the environment
lnd $ source .env/bin/activate
- Install dependencies
lnd $ pip install -r requirements.txt
- Run the server
lnd $ ./lnurl --server
A sample system d file
[Unit]
Description=LND Lightning Address
Requires=lnd.service
After=lnd.service
[Service]
ExecStart=/usr/local/lnurl/.env/bin/python3 /usr/local/lnurl/lnurl --server --macaroon=/usr/local/lnurl/app.macaroon --image-thumb=/usr/local/lnurl/image-thumb.png
User=www-data
Group=www-data
Type=simple
KillMode=process
TimeoutSec=180
Restart=always
RestartSec=60
[Install]
WantedBy=multi-user.target
[Unit]
Description=LND Lightning Address
Requires=lnd.service
After=lnd.service
[Service]
ExecStart=/usr/local/lnurl/.env/bin/python3 /usr/local/lnurl/lnurl --server --macaroon=/usr/local/lnurl/app.macaroon --image-thumb=/usr/local/lnurl/image-thumb.png
User=www-data
Group=www-data
Type=simple
KillMode=process
TimeoutSec=180
Restart=always
RestartSec=60
[Install]
WantedBy=multi-user.target
It's recommened you host the server behind a nginx, etc.