this post was submitted on 08 Sep 2026
25 points (93.1% liked)

Selfhosted

62026 readers
1170 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

I have a minipc with proxmox on it. I have tried caddy in a lxc to set up DNS challenges to my owned domain and I set the url in my router to point to the IP (for example, proxmox.DOMAIN.com could be 192.168.10.22). The hope was to have everything local within my house and nothing needs the internet to be accessed. Some services I can host in proxmox NEED https to use, which I could not get working with my own certs or ones proxmox could make, thus Caddy. However, I get proxmox with a proper cert, but i cannot get any of the other services from proxmox working. If I were doing it all manually, I would expect DNS issues with the domain, but from what I understand, Caddy by default does wildcard domains which should mean that my services should work. but they do not. Networking is new to me so perhaps I am missing something obvious. Any guidance would be appreciated.

top 18 comments
sorted by: hot top controversial new old
[–] moonshine69@lemmy.nz 2 points 10 hours ago* (last edited 10 hours ago)

If you are doing a dns challenge then You need to give caddy access to your domain to perform the dns challenge. Depending on domain provider that is easy or hard. It will briefly change some records that tells let's encrypt you own the domain and then issue the cert

Or you can do http challenge, this requires you to manually configure your domain to point to a publicly accessible caddy endpoint which is probably not what you want, maybe there is a way to make it work through a cloud flare tunnel

Who is your domain provider?

[–] Lem453@lemmy.ca 2 points 20 hours ago* (last edited 19 hours ago)

This is for traefik but might help to understand the process and change it for caddy (https://youtu.be/liV3c9m_OX8)

You should have

Service.local.domain.com

For local only services (Vaultwarden) and

Service.domain.com

For external things (immich)

I'm your router / Pihole locally, you setup the above URLs to point to the IP of caddy

[–] fundbasis_bot@lemmy.1095.me 1 points 1 day ago (1 children)

Two things that I think are tripping you up:

  1. DNS. Your router only maps proxmox.DOMAIN.com to 192.168.10.22. The other services (in LXCs, with their own container IPs) resolve to nothing, so the browser can't reach Caddy for them at all - that's why Proxmox works and the rest don't. Either add a record per service name pointing at the right IP, or forward those service ports into Caddy.

  2. Certs. If you want to stay fully local (nothing needs the internet), skip DNS challenges entirely: Caddy has a built-in CA (tls internal in the site block). It auto-issues self-signed certs for whatever hostname you hit, no challenge, no DNS. You do need to export that CA and install it as a trusted root on the machines you browse from, but after that every service works with zero DNS configuration.

Wildcard aside: DNS-01 + wildcard only covers issuance, it doesn't fix the resolution gap in point 1.

If you're open to egress, a quick tunnel (cloudflared) removes cert management completely - Cloudflare terminates TLS on a random public URL. That's how I expose a small self-hosted API of mine; the trade-off is the URL changes on every tunnel restart.

[–] valkyre09@lemmy.world 3 points 1 day ago

+1 for cloudflare tunnels. But if you want to host locally, nginx proxy manager has a very intuitive gui you’ll be able to host your sites on.

Example:

Docker container exposes port 8989 for sonarr. Nginx proxy manager entry will be: Sonarr.mydomain.com > http://192.168.0.50:8888/ There’s a setting to allow ssl for your domain.

In your domain registrar, just put the a record for sonarr.mydomain.com to the local IP of nginx proxy manager, in this case let’s assume it’s the same IP as sonarr.

So now in your house your computer calls the domain, your dns server responds with 192.168.0.50. That’s the IP of your proxy.

Your proxy gets your request. Sees you’re trying to access sonarr, and passes your query along to it.

But like I said, cloudflare tunnels removes ALL of this and even supports google / azure SSO to keep you secure and keep logins convenient.

[–] ShortN0te@lemmy.ml 8 points 2 days ago

Short answer, it should work as you describe, everything local, no need to expose anything.

More information is needed to help.

Its either the caddy setup, maybe proxmox internal networking? Or most likely DNS, its almost always DNS.

[–] valar@lemmy.ca 8 points 2 days ago (1 children)

IME Caddy will not do wildcard domains "by default" if you just configure sub.domain.com {} for everything. It will try to create a unique cert for each. You have to specifically configure it to use a wildcard cert.

[–] DarkSirrush@piefed.ca 6 points 1 day ago* (last edited 1 day ago)

Yeah it will, if you have even a single reference to a wildcard, preferably as one of your first entries in your caddyfile.

https://caddyserver.com/docs/automatic-https

You can literally get a wildcard cert by putting in the following entry, before any other routing logic:

*.domain.tld {
  respond "Wildcard Bitch!"
}
[–] kokesh@lemmy.world 2 points 1 day ago

My setup: My domain-> vps <-wireguard->home ubuntu server behind 4G modem. My home server runs letsencrypt certbot for .mydomain.com My ubuntu server at home runs adguard home as DNS/DHCP/Android Private VPN. I have rules for adguard to forward any client coming from home lan 192.168.1. accessing mydomain.com to go directly to my home server local ip.

That way I run same certs and can access my local services via same urls - immich.mydomain.com runs from outside and inside my network, with ultra fast local uploads without using my modem data, etc.

[–] stratself@lemdro.id 3 points 1 day ago* (last edited 1 day ago) (1 children)

Caddy does certs by responding to ACME challenges on port 80 and 443. You need to forward those ports from the public internet back to Caddy, have you done that?

Edit: it seems like you're doing DNS challenges. Did you compile Caddy yourself with the right plugins? Have you tested the API token work? Any Caddy logs?

[–] Appoxo@lemmy.dbzer0.com 1 points 12 hours ago* (last edited 6 hours ago)

Or do it like traefik can and do TLS challenge by proofing you can add TXT entries on your domain.

[–] non_burglar@lemmy.world 2 points 1 day ago

or ones proxmox could make

In proxmox, ACME is a service for the root CA of the cluster. It does use letsencrypt, but it does not provide certs for clients.

Sounds like you are probably conflating DNS and PKI certificates.

[–] bizarroland@lemmy.world 2 points 2 days ago

I had some success using nginx reverse proxy with let's encrypt.

There should be a couple of guides online that will tell you how to do that.

I was running Nginx through Portainer on Proxmox, and the Let's Encrypt certificate was set to my local IP address for nginx.

[–] curbstickle@anarchist.nexus 1 points 2 days ago

How is everything set up? Do you have a quick diagram or anything you can share? I'd like to understand how you have proxmox with a cert but not the rest, or what you mean by your own certs - like from LE? Where is your wildcard cert coming from?

[–] CompactFlax@discuss.tchncs.de -3 points 2 days ago* (last edited 2 days ago) (1 children)

Firstly, wildcards are convenient but they break your functionality of authenticating the server to which you are connecting which is half of what TLS does. That may or may not be important to you.

Does it work without TLS? Start there, making sure dns and reverse proxy works, works, then add the certificate/TLS termination.

[–] ShortN0te@lemmy.ml 2 points 2 days ago (1 children)

Its good practice to handle https on a reverse proxy. Also who actually does cert pinning?

[–] CompactFlax@discuss.tchncs.de -3 points 2 days ago (1 children)

I am neither stating TLS termination is wrong, nor providing instructions to cert pinning.

[–] ShortN0te@lemmy.ml 2 points 2 days ago

Firstly, wildcards are convenient but they break your functionality of to which you are connecting which is half of what TLS does. That may or may not be important to you.

You are implying that https is supposed to be done by the individual server and not reverse proxy. Since otherwise you could not "authenticating the server"