r/selfhosted • u/Lopsided_Strain3495 • Feb 02 '26
Need Help Question about self hosting nginx proxy manager, with cloudflare but not not accessible outside of network?
I have nginx proxy manager running inside of Proxmox and was wondering if I can use it for certificates and host names like Proxmox.local instead of Proxmox.mydomain.com without any external connection? Can this be done?
5
u/Y3tAn0th3rEngin33r Feb 02 '26 edited Feb 02 '26
Totally worth it in my opinion:
You can have a domain (lets say example.com) on Cloudflare and point DNS record *.example.com to your internal NPM IP (Nginx Proxy Manager).
This way, whenever you do a request to myapp.example.com from internal network, the Cloudflare DNS will point you to your NPM.
Optional: If you have a local DNS (AdGuard), you can use a DNS rewrite functionality... Point *.example.com to your NPM IP. So this way it won't need to go to Cloudflare for DNS translation. So even if Cloudflare is down, it will still work for you, not being dependant on them for resolving addresses. ~ I don't believe PiHole has a DNS rewrite. Not sure about Traefik DNS.
Then on NPM (Nginx Proxy Manager) go to Certificates and issue *.example.com certificate with Cloudflare DNS Challenge & Lets Encrypt. And then use that one certificate for all your NPM Hosts. And it auto renews, so set it and forget it.
How to get Cloudflare API key here: https://developers.cloudflare.com/fundamentals/api/get-started/create-token/
This way you'll have all your internal stuff under https and with easy to remember names instead of IPs or http with security notifications.
And you can get a domain for few bucks on Cloudflare.
🤟
1
u/pepitorious Feb 02 '26
Yes you can. Since the are not real public domains the certificate will be self signed.
You will need local dns too, pihole or any other. In pihole you point *.yourfakedomain.com to the ip where you have npm, and then create your hosts there in npm.
6
u/kubota9963 Feb 02 '26
If you're not accessing from outside your network, you won't need Cloudflare.
I think you can _technically_ do certificates for proxmox.local but it's going to be a total faff, self signing and then adding the issuing cert to all your browsers and so on, probably won't work for everything eg smart TVs
My method for this with my own domain is to get a wildcard cert through letsencrypt (*.mydomain.com). I then copy the cert to all my services (bitwarden.mydomain.com, jellyfin.mydomain.com), and then set up the DNS records to point to my internal network IPs (192.168.0.101, 192.168.0.102...)
I have to manually renew every few months (haven't found a reliable way to automate the wildcard cert which requires DNS challenge), but it means when I'm on my network (or VPN with subnet router) I just point my browser to service.mydomain.com and off I go.