How to use your own domain with ln.tips (and any other custodial wallet) on Cloudflare
In this guide, I will go over setting up LN Address redirection to the ln.tips wallet. These steps also apply to any other custodial wallet too.
https://ln.tips is a great wallet. It's an extremely easy to use, custodial Lightning wallet for the masses. Each telegram account has it's own @ln.tips
LN Address, but sometimes you want to use your own domain.
In this guide I will teach you how to setup LN Address redirection with your own domain using Cloudflare's Redirection Rules.
Prerequisites
- A Web Domain that's has Cloudflare setup on it.
- https://ln.tips setup and ready to go.
- Using ln.tips is optional. This guide will work with any other custodial wallet that provides you with an LN Address will work too.
Setup
Getting your destructured LN Address
ln.tips
Since ln.tips provides two LN addresses to everybody, you have two options.
- Use your Telegram username LN address (Not Recommended)
- This isn't recommended because anyone can see your Telegram username with this method and use it to message you. It's the best choice for anonymity from other users.
- ex:
[email protected]
- Use your anonymous LN address (Recommended)
- This is recommended because the address is random, nobody can look this up back to your Telegram account.
- Can be obtained by running
/advanced
to the bot, and finding it under "Anonymous Lightning address" - ex:
[email protected]
What option you pick doesn't matter to your next step, you're going to want to take the username portion of the address (everything before the @, like an email address) add
https://ln.tips/.well-known/lnurlp/<username>
username goes at the end.
The final url should look something like https://ln.tips/.well-known/lnurlp/0x84e6b3ea699ab309
(depending on the method you chose)
Other platforms
Custodial Wallets that provide you with a Lightning address work similarly to this.
Apps like Wallet of Satoshi provide you with a completely random address when you sign up, so a Wallet of Satoshi destructured address would look like: https://walletofsatoshi.com/.well-known/lnurlp/LawyerCicanery69
Setting up Cloudflare Redirects
Assuming that you have Cloudflare hooked up and ready to go, you're going to want to follow a few steps.
- Open your site on the panel
- On the sidebar, click the dropdown arrow next to Rules
- Click "Redirect Rules"
- Press the button that says "Create Rule"
- Configure your new rule
- Give it a name. ex: "lnaddr"
- Configure the first condition
- Set "Field" to
URI Path
- Set "Operator" to
starts with
- Set "Value" to
/.well-known/lnurlp/
- Set "Field" to
- Configure the "then"
- Set "Type" to
Static
- Set "URL" to your destructured Lightning address from earlier
- Set "Status Code" to
307
- Check "Preserve query string"
- Set "Type" to
- Click Save
All done! Now whenever someone goes to pay your new Lightning address, it should automatically redirect to your custodial wallet. Have fun!