3d0c66f0f6
the encoding parameter defaults to utf-8, so it's not needed |
||
---|---|---|
.. | ||
static/image | ||
templates/lnaddress | ||
__init__.py | ||
cloudflare.py | ||
config.json | ||
crud.py | ||
lnurl.py | ||
migrations.py | ||
models.py | ||
README.md | ||
tasks.py | ||
views_api.py | ||
views.py |
Lightning Address
Rent Lightning Addresses on your domain
LNAddress extension allows for someone to rent users lightning addresses on their domain.The extension is muted by default on the .env file and needs the admin of the LNbits instance to meet a few requirements on the server.
Requirements
- Free Cloudflare account
- Cloudflare as a DNS server provider
- Cloudflare TOKEN and Cloudflare zone-ID where the domain is parked
The server must provide SSL/TLS certificates to domain owners. If using caddy, this can be easily achieved with the Caddyfife snippet:
:443 {
reverse_proxy localhost:5000
tls <your email>@example.com {
on_demand
}
}
fill in with your email.
Certbot is also a possibity.
Usage
-
Before adding a domain, you need to add the domain to Cloudflare and get an API key and Secret key
You can use the Edit zone DNS template Cloudflare provides.
Edit the template as you like, if only using one domain you can narrow the scope of the template
-
Fill the form with the domain information
- select your wallet - add your domain
- cloudflare keys
- an optional webhook to get notified
- the amount, in sats, you'll rent the addresses, per day
-
Your domains will show up on the Domains section
On the left side, is the link to share with users so they can rent an address on your domain. When someone creates an address, after pay, they will be shown on the Addresses section
-
Addresses get automatically purged if expired or unpaid, after 24 hours. After expiration date, users will be granted a 24 hours period to renew their address!
-
On the user/buyer side, the webpage will present the Create or Renew address tabs. On the Create tab:
- optional email
- the alias or username they want on your domain
- the LNbits URL, if not the same instance (for example the user has an LNbits wallet on https://s.lnbits.com and is renting an address from https://lnbits.com)
- the Admin key for the wallet
- how many days to rent a username for - bellow shows the per day cost and total cost the user will have to pay
-
- enter the Alias/username
- enter the wallet key
- press the GET INFO button to retrieve your address data
- an expiration date will appear and the option to extend the duration of your address