Custom LNAddress with Self-Hosted AlbyHub
My adventure to have custom LNAddres
I was using Wallet of Satoshi at first, but then I realized it does not support NWC, so I found Alby. It’s great, but I didn’t want to make that many payments (I’m a developer but a newbie in Nostr, more of an explorer).
Thanks to Alby, they have an open-source AlbyHub. I had a Raspberry Pi 3, so I updated it and installed AlbyHub, then connected my wallet to my Alby account.
Still, I didn’t like depending on other domains. Alby gave me the address fallingwhimsy946296@getalby.com—ugly, right? So I started researching how to have a custom LN Address. Alby offers this if you buy their cloud hub, but as I mentioned, I didn’t want to spend money for this exploration.
After reading some Lightning Network documentation, I realized that LN supports well-known URLs.
I then accessed Alby’s well-known URL for my account: https://getalby.com/.well-known/lnurlp/delirehberi and got the correct configurations for the callback setting and updated identifier.
Next, I created a .well-known/lnurlp/delirehberi file under the static folder of my Hugo blog. I’m using GitHub Pages to serve my blog. This led to two problems:
- GitHub Pages does not set correct headers for files without an extension. I tried to solve this using a Cloudflare Worker as middleware to add the
application/jsonheader. - My Cloudflare-GitHub setup was corrupted, affecting the proxy configuration for my root domain.
After some research, I realized the exact SSL configuration matters when using Cloudflare with GitHub Pages:
- Use Full SSL on Cloudflare and enable Force HTTPS in GitHub Pages.
- Or use Flexible SSL on Cloudflare and disable Force HTTPS in GitHub Pages.
After making these updates, I enabled proxy configuration for my root domain and added the worker route for my Worker.
Finally, it worked like a charm: https://emre.xyz/.well-known/lnurlp/delirehberi
Emre Yilmaz
I am a veteran Full-Stack Engineer, Open Source Contributor, and Web Generalist. Having shipped applications continuously since 2005, I don't just write code—I architect scalable digital systems that drive business value. Building Nostr tools: - https://nostr.emre.xyz - https://photo.emre.xyz - https://snips.emre.xyz - https://nostr.org.tr - https://rehber.dev
delirehberi@emre.xyz
I am a veteran Full-Stack Engineer, Open Source Contributor, and Web Generalist. Having shipped applications continuously since 2005, I don't just write code—I architect scalable digital systems that drive business value. Building Nostr tools: - https://nostr.emre.xyz - https://photo.emre.xyz - https://snips.emre.xyz - https://nostr.org.tr - https://rehber.dev