this post was submitted on 05 Oct 2026
24 points (92.9% liked)

Selfhosted

63543 readers
345 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
 

Hello! I have 2 services that are only being accessed locally but require HTTPS so I am using Caddy & DuckDNS w/ DNS-01 to reverse proxy them. In DuckDNS, both subdomains are pointing at the local IP address of Caddy, and my Caddyfile has:

service1.duckdns.org:443 {
        tls {
                dns duckdns {
                        api_token API-TOKEN
                }
        }
        reverse_proxy 192.168.0.51:8080
	}

service2.duckdns.org:443 {
        tls {
                dns duckdns {
                        api_token API-TOKEN
                }
        }
        reverse_proxy 192.168.0.20:8080
	}

The issue is that I can access https://service1.duckdns.org/ (within my home network), but I can't access https://service2.duckdns.org/ (502 Bad Gateway). Caddy is running in a LXC in Proxmox, and Service1 is on a different VM on the same Proxmox machine, while Service2 is on a different machine on my network. I don't see any entries in my router's firewall logs or PiHole that indicates something is blocking it. I enabled logging in Caddy for both services and I am only able to see activity for Service1, so I guess that means something is blocking Service2 from reaching Caddy entirely?

I'm able to access service2 directly from the IP address but I'm a novice in networking so I'm trying to understand and learn what could be causing this. Any help would be appreciated!

Edit: service2 is ActualBudget and I had configured it to use the certs using the instructions here (https://actualbudget.org/docs/config/https/) when I didn't need to (since Caddy handles all of this already.. i think)

you are viewing a single comment's thread
view the rest of the comments
[–] hendrik@palaver.p3x.de 7 points 1 month ago (1 children)

I'd say there's likely something wrong with your service. Maybe it refuses serving on a domain it's not configured for? Or there's something wrong with the headers or something like that. Or the internal network. Anyway, the 502 error is sent by the Caddy server. That means everything from your browser to the Caddy server should be fine. You can reach it. There's something wrong with the service or the parts in-between the reverse proxy and the application.

[–] dimjim@sh.itjust.works 3 points 4 weeks ago (1 children)

This is the right approach, I’ve had several services require extra bits in the caddy config such as:

reverse_proxy 192.168.50.6:8006 { transport http { tls_insecure_skip_verify } }

I would do a search for “your service & caddy”, someone probably has ran into the same issue.

[–] HoodedBandit@lemmy.zip 2 points 4 weeks ago* (last edited 4 weeks ago) (1 children)

FWIW, here is my ActualBudget Caddy config.

budget.example.com {
    reverse_proxy actual-server:5006 {
        header_down -Access-Control-Allow-Origin
        header_down Cross-Origin-Opener-Policy same-origin
        header_down Cross-Origin-Embedder-Policy credentialless
    }
}
[–] dimjim@sh.itjust.works 2 points 4 weeks ago* (last edited 4 weeks ago) (1 children)

I’ve never used ActualBudget, but their docs have a slightly different caddy example config:

budget.example.org {
    encode gzip zstd
    reverse_proxy actual_server:5006
}```
[–] HoodedBandit@lemmy.zip 1 points 4 weeks ago (1 children)

Yep, just sharing what worked for me

[–] dimjim@sh.itjust.works 2 points 4 weeks ago

Lmao sorry for the confusion, I wasn’t paying attention and thought you were OP, wasn’t trying to correct you!