LND Lightning Address
A dead simple Lightning Address server for your personal Lightning Node!
This will allow your to receive lightning address payments. It's like an email address but for sats!
sats@fatbear.me is my address!
What you need
- LND Server
- Domain Name
Usage
Setup Environment Variables
- Create a .env file
- Find your LND REST Endpoint
- Generate a Macaroon with Create Invoice permissions
- Set your LND config. See
.env.samplefor example values - Set your domain name
Start Server
docker compose up
Config
| Env Var | Required | Description |
|---|---|---|
LNADDR_LND_REST_BASE_URL |
true | Your LND REST URL e.g. https://xxxx.onion:8080 address |
LNADDR_LND_REST_MACAROON_HEX |
true | Create Invoice Macaroon |
LNADDR_DOMAIN |
true | Your domain name e.g. fatbear.me |
LNADDR_NOTIFICATION_WEBHOOK |
false | Webhook URL to receive notifications when invoices are created. e.g. https://hookb.in/xxxx |
Endpoints
| Endpoint | Description |
|---|---|
/ |
Basic welcome page |
/healthz |
Health Check |
/.well-known/lnurlp/:username |
Lightning Address |
Deploy
Render
Deploy on Render free tier. You will need to configure you Custom Domain after it deploys.
Services on free plan are automatically spun down after 15 minutes of inactivity. When a new request for a free service comes in, Render spins it up again so it can process the request. This can cause a response delay of up to 30 seconds for the first request that comes in after a period of inactivity.
Fatbear Pro Tip: You could setup a cron job on your umbrel to curl the /healthz endpoint every ~15 minutes.
Umbrel
There are a few additional setups required for this to work on your Umbrel node. That is until Issue 1082 has been resolved.
STEPS:
- SSH to your umbrel server
ssh umbrel@umbrel.localyou will need your umbrel password - Find your LND REST browser URL
cat umbrel/tor/data/lnd-rest/hostname. It have a bunch of characters and end with.onion. Prependhttps://and append:8080to this values to getLNADDR_LND_REST_BASE_URLenv variable. - Open your LND Config File
vim umbrel/lnd/lnd.conf - Under Application Options add an additional
tlsextradomainline with your hostname from step 2. - Restart your Umbrel. Can be done from your Umbrel's settings UI.
Your lnd.config should have two tlsextradomain lines. e.g.
tlsextradomain=umbrel.local
tlsextradomain=xxxxxx.onion
Create Invoice Macaroon
You will need a HEX encoded macaroon for the LNADDR_LND_REST_MACAROON_HEX env variable.
I highly recommend generating a macaroon with only create invoice permissions. You can use Thunderhub to do this easily.
- Open Thunderhub
- Go to
Toolsin sidebar - Bakery -> Bake Macaroon
- Give
Create Invoicepermissions - Hit
Bake new macaroonbutton. - Copy the HEX encoded value
Support
My Lightning Address sats@fatbear.me is powered by the project, think about opening a channel to my node.