With the new update out for LNBits I was able to finally resolve this issue.
- First update to LNbits version: 0.10.6
- Use this guide to ensure your NGINX proxy is configured properly.
Something important to note, because Umbrel is already using port 80, you can’t set up a listener in NGINX to forward HTTP traffic to HTTPS. You can however skip using LetsEncrypt to issue your SSL certificates and instead install Origin Server certificates issued by Cloudflare.
On the SSL / TLS Overview page, ensure your SSL/TLS encryption mode is Full (strict).
Under the Edge Certificate tab, enable Always Use HTTPS. This will take care of managing your SSL certificates, proxy your node’s IP address, and redirect HTTP traffic.
At this stage you should be able to access LNBits over clearnet and on your local network. When using LNaddress or LNURLs you should be getting:
Error: 2 validation errors for LnurlPayResponse callback URL host invalid, top level domain required (type=value_error.url.host) callback URL scheme not permitted (type=value_error.url.scheme; allowed_schemes={‘https’})
Edit the docker compose file for the app:
~/umbrel/app-data/lnbits/docker-compose.yml
First, you need to turn off Admin UI to force LNBits to use the environment variables set in the docker compose file, when Admin UI is enabled, it stores and uses the settings configured in the database.
Restart the app with the following command:
~/umbrel/scripts/app restart lnbits
Under #Global add the following:
HOST: "mydomain.com"
(don’t add https:// or www., etc.)
Under #App add the following:
FORWARDED_ALLOW_IPS: "*"
Finally, restart the app once again. Once it finishes restarting you should be able to use LNURLs and LN addresses. If you are still having issues, try debugging by reading the logs of the docker container.
Use this command to list all the docker containers, look for one called lnbits_web_1, copy the container ID.
docker ps
Then use this command to follow the logs. This can be useful to tell which IP is being interpreted by pydantic- which is what is throwing this error.
You know its working when you see the IP address of the container in the Umbrel app network when accessing LNbits from your local network. It should show your nodes public IP address when receiving traffic from using the LNURL or LNaddress.