Is this only for public facing services then? I have little desire to expose my services except through tailscale or something like that.
Comment on Opinionated collection of docker-compose.yml
cron@feddit.de 8 months agoSetting up a reverse proxy with nginx proxy manager is pretty simple and comes with letsencrypt support.
For letsencrypt to work, a software needs to write a confirmation code to a special path in your domain. When letsencrypt verifies that you can write to this path (and therefore control the domain), you get the certificate.
BrianTheeBiscuiteer@lemmy.world 8 months ago
double_oh_walter@feddit.nu 8 months ago
No! If you have a domain and can do DNS* verification you can get fully functional certificates to use on your internal network.
*Doesn’t have to be DNS, but the you’d need to expose http to the internet for verification.
BrianTheeBiscuiteer@lemmy.world 8 months ago
lemmyvore@feddit.nl 8 months ago
The alternative is to offer the Let’s Encrypt bot access to your DNS service, typically in the form of an API token which you revoke after the bot verifies the domain. Access to the API is not needed for subsequent cert refreshes, only the first time.
The bot (or the proxy you use) needs to support the API of the DNS you use, naturally, but they support a wide variety of the most well-known ones.
vividspecter@lemm.ee 8 months ago
Just to add to the other comments, you probably want to use a wildcard cert so you don’t need to individually certify each subdomain (or expose them at all).
PlexSheep@feddit.de 8 months ago
I hosted nom in two servers for some time, I had it break too often and could not set custom configs easily. I switched to caddy and could not be happier.
When using caddy, you don’t even need to think about letsencrypt, unless you want to disable it in favor of something else.
eager_eagle@lemmy.world 8 months ago
Do you know if it’s just as friction-less to have a self signed cert up with Caddy for internal use? I was using Ngix PM recently and had the need to serve https but I can’t use letsencrypt because it’s not public-facing. Nginx PM only has letsencrypt as an option.
I wish there was a checkbox that just deployed a self-signed cert without bothering with the details (it’s 2024 ffs, HTTPS should be 1 click away, whether that’s self-signed or not).
lemmyvore@feddit.nl 8 months ago
NPM also lets you use your own certificates. Pick the “Custom” option after you click “Add SSL certificate”.
If your services are not public-facing and you can’t use the HTTP challenge you have the alternative to use a real domain name and to ask the bot to verify access to your DNS service through an API token you revoke after that. In NPM it’s called “DNS challenge” in the certificate options.
So instead of using something like “service.local” as the domain you would use “service.local.realdomain.tld”, give the Let’s Encrypt bot a token to the DNS service that you use to manage realdomain.tld, and ask for a wildcard cert for *.local.realdomain.tld.
Of course you will also need *.local.realdomain.tld to resolve to your server’s private LAN IP. Typically people do this in their LAN DNS but if you can’t then you can do it in the public DNS too.
PlexSheep@feddit.de 8 months ago
I’m using a self signed CA for my home network with caddy. You just set it up to use a ca once and afterwards it just works. So yeah, really easy.
Iirc you can upload your own certificates and keys in npm, you’ll just have to manage the CA manually or with some other tool.
cron@feddit.de 8 months ago
true, and caddy works very well with docker compose setups.
jonno@discuss.tchncs.de 8 months ago
Caddy combined with dns challenges are the dream!