Docker Applications that I am trying to proxy give me "We’re having trouble finding that site."

1. The problem I’m having:

Caddy is only reverse-proxying select docker containers and I don’t know why. Is there something wrong with my certificates that I do not realize? So far I am able to proxy homarr and portainer without issue, but not applications I run in a different stack. I have made sure they are using the same docker network as well.

2. Error messages and/or full log output:

For some context, I was having issues with DNS resolvers. I still am and have not found a solution, so I’m just getting certificates one domain at a time for now. It was working without issue. Here’s a link to the previous problem if anyone wants to take a crack at it or thinks it could be related.

Near the end I get a warning about my firewall (still not sure what that could be) but ultimately the certificates get validated.

{"level":"info","ts":1703859358.235878,"logger":"http","msg":"enabling automatic TLS certificate management","domains":["","","",""]}
{"level":"info","ts":1703859358.2359967,"logger":"http","msg":"servers shutting down with eternal grace period"}
{"level":"info","ts":1703859358.2363653,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
{"level":"info","ts":1703859358.2364037,"logger":"admin.api","msg":"load complete"}
{"level":"info","ts":1703859358.2364683,"logger":"tls.obtain","msg":"acquiring lock","identifier":""}
{"level":"info","ts":1703859358.2375038,"logger":"tls.obtain","msg":"lock acquired","identifier":""}
{"level":"info","ts":1703859358.2376359,"logger":"tls.obtain","msg":"obtaining certificate","identifier":""}
{"level":"info","ts":1703859358.2384279,"logger":"http","msg":"waiting on internal rate limiter","identifiers":[""],"ca":"","account":""}
{"level":"info","ts":1703859358.2384388,"logger":"http","msg":"done waiting on internal rate limiter","identifiers":[""],"ca":"","account":""}
{"level":"info","ts":1703859358.2385433,"logger":"admin","msg":"stopped previous server","address":"localhost:2019"}
{"level":"info","ts":1703859358.7117724,"logger":"http.acme_client","msg":"trying to solve challenge","identifier":"","challenge_type":"http-01","ca":""}
{"level":"error","ts":1703859369.1422465,"logger":"http.acme_client","msg":"challenge failed","identifier":"","challenge_type":"http-01","problem":{"type":"urn:ietf:params:acme:error:connection","title":"","detail":" Fetching Timeout during connect (likely firewall problem)","instance":"","subproblems":[]}}
{"level":"error","ts":1703859369.1423311,"logger":"http.acme_client","msg":"validating authorization","identifier":"","problem":{"type":"urn:ietf:params:acme:error:connection","title":"","detail":" Fetching Timeout during connect (likely firewall problem)","instance":"","subproblems":[]},"order":"","attempt":1,"max_attempts":3}
{"level":"info","ts":1703859370.404195,"logger":"http.acme_client","msg":"trying to solve challenge","identifier":"","challenge_type":"tls-alpn-01","ca":""}
{"level":"info","ts":1703859370.5505674,"logger":"tls","msg":"served key authentication certificate","server_name":"","challenge":"tls-alpn-01","remote":"","distributed":false}
{"level":"info","ts":1703859370.6795526,"logger":"tls","msg":"served key authentication certificate","server_name":"","challenge":"tls-alpn-01","remote":"","distributed":false}
{"level":"info","ts":1703859370.7393312,"logger":"tls","msg":"served key authentication certificate","server_name":"","challenge":"tls-alpn-01","remote":"","distributed":false}
{"level":"info","ts":1703859371.0376031,"logger":"http.acme_client","msg":"authorization finalized","identifier":"","authz_status":"valid"}
{"level":"info","ts":1703859371.0376143,"logger":"http.acme_client","msg":"validations succeeded; finalizing order","order":""}
{"level":"info","ts":1703859371.9260838,"logger":"http.acme_client","msg":"successfully downloaded available certificate chains","count":2,"first_url":""}
{"level":"info","ts":1703859371.926424,"logger":"tls.obtain","msg":"certificate obtained successfully","identifier":""}
{"level":"info","ts":1703859371.9265113,"logger":"tls.obtain","msg":"releasing lock","identifier":""}

3. Caddy version:

v2.7.6 h1:w0NymbG2m9PcvKWsrXO6EEkY9Ru4FJK8uQbYcev1p3A=

4. How I installed and ran Caddy:



(internal) {
	tls internal {

(tls_config) {
	tls {
		dns googleclouddns {
			gcp_project {env.GCP_PROJECT}
			gcp_application_default {env.GCP_APPLICATION_DEFAULT}

(secure) {
	forward_auth {args.0} {
		uri /api/verify?rd=
		copy_headers Remote-User Remote-Groups Remote-Name Remote-Email
		header_up Host {upstream_hostport}
} {
	reverse_proxy portainer:9000
} {
	reverse_proxy homarr:7575
}, {
	reverse_proxy authelia:9091

Docker Compose:

version: "3.7"

    image: mycaddy/4tressxyz
    container_name: caddy
    restart: unless-stopped
      context: ./build
      dockerfile: dockerfile
      - NET_ADMIN
      - "80:80"
      - "443:443"
      - $PWD/Caddyfile:/etc/caddy/Caddyfile 
      - $PWD/site:/srv
      - $PWD/data:/data
      - $PWD/config:/config
    container_name: portainer
    image: portainer/portainer-ce:latest
      - $PWD/portainer-data:/data
      - /mount/disk:/mount/disk
      - /var/run/docker.sock:/var/run/docker.sock
    #restart: unless-stopped

  name: dockernet
  external: true

My other stacks that I am trying to proxy is Authelia:

version: "3.7"

    image: authelia/authelia
    container_name: authelia
    restart: unless-stopped
      - $PWD/data/config:/config
      - $PWD/data/config/configuration.yaml:/config/configuration.yaml
      - database
      - redis
    container_name: authpg
    image: postgres:15
    restart: unless-stopped
      - $PWD/data/postgres:/var/lib/postgresql/data
      POSTGRES_USER: "authelia"
      POSTGRES_PASSWORD: "[snip]"
    container_name: authredis
    image: redis:7
    restart: unless-stopped
    command: "redis-server --save 60 1 --loglevel warning --requirepass [snip]"
      - $PWD/data/redis:/data

  name: dockernet
  external: true

5. Links to relevant resources:

I am following this guide for Authelia

For clarification, this issue isn’t only with Authelia. Another troubleshooting step I have tried is exposing ports in docker compose (Authelia included, I exposed port 9091 in one iteration) and that has not been fruitful either.

If I try connecting to that domain, I get:

$ curl -v
*   Trying

In other words, I’m not getting a response from your server.

Are you certain that ports 80 and 443 are open and forwarded?

If this is a home server, are you sure that your ISP isn’t blocking incoming connections on those ports? Are you sure that your IP address is uniquely pointing to your network, and your ISP isn’t using CGNAT?

It is a home server. It appears that my ISP filters port 80. Port 80 and 443 are forwarded according to my asus router. Trace routing my public ip produces a single hop so I think that means I’m not using CGNAT?

In that case, the HTTP challenge won’t be possible for you to use. You can turn off that challenge if that’s the case. Caddy can still issue certs using port 443, but it does mean HTTP requests will never work so you’ll always have to type https:// in your browser when connecting to your server.

But even so, it seems like port 443 is also blocked:

$ curl -v
*   Trying
* connect to port 443 failed: Timed out
* Failed to connect to port 443 after 21080 ms: Couldn't connect to server

I don’t know what could’ve changed between the past few days and today to cause my 443 port to be blocked like this. On Debian, 443 is open, 443 is also forwarded according to my router, and even when my firewall is turned off inside my router I am having no results. Further more, works, not I am so confused lol

$ curl -v
*   Trying
* Connected to ( port 443

It now works for me :man_shrugging: you must’ve changed something.

That’s crazy. I guess I’ll update this topic if I ever figure this out, nothing has changed on my end.

Is there any reason why some sites work and not others?

It looks like Caddy only has a Let’s Encrypt staging certificate (i.e. not trusted) for your auth domain. Your logs should show details about what happened.

Since the HTTP challenge is impossible in your case, you could add this to each site to disable it:

tls {
	issuer acme {
	issuer zerossl {

So I tried that, and there was no change on my end. So finally, I turned on my VPN. And I was able to connect to without issue. So the issue is my network, I just do not know what and I frustrated. I checked my router’s firewall, I checked debian’s firewall, I checked Proxmox, I checked Windows, I am trying to learn nmap, I have to laugh because I still don’t know why 443 is filtered like this.

Okay, I fixed it. Restarting my router for some reason resolved the issue.

Just kidding, nothing has been fixed. It worked for five seconds and then it stopped again. Carry on.

Ah, probably because your home router doesn’t support NAT hairpinning, so it doesn’t know how to route packets destined for your WAN IP (which your domain resolves to) back into your network, so it gets dropped.

The typical solution is to run a DNS server inside your home network which resolves the domain to your server’s LAN IP instead (i.e. 192.168.x.x) so that your router knows what to do with those connections.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.