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!
- LND Server
- Domain Name
- Create a .env file
- Find your LND REST Endpoint
- Generate a Macaroon with Create Invoice permissions
- Set your LND config. See
.env.sample
for example values - Set your domain name
docker compose up
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 |
Endpoint | Description |
---|---|
/ |
Basic welcome page |
/healthz |
Health Check |
/.well-known/lnurlp/:username |
Lightning Address |
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.
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 [email protected]
you 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:8080
to this values to getLNADDR_LND_REST_BASE_URL
env variable. - Open your LND Config File
vim umbrel/lnd/lnd.conf
- Under Application Options add an additional
tlsextradomain
line 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
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
Tools
in sidebar - Bakery -> Bake Macaroon
- Give
Create Invoice
permissions - Hit
Bake new macaroon
button. - Copy the HEX encoded value