I/o timeout (error 502) when using Caddy for Nextcloud

I fixed it. This did the trick in the end:

This is my Caddyfile now:

{
  # Email
  email <email>

  # Debug
  # acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
  # debug
}

(cloudflare) {
  tls {
    dns cloudflare <api_token>
  }
}

https://cloud.domain.tld:443 {
  import cloudflare
  reverse_proxy nextcloud-aio-apache:11000
}

Thank you so much for your help!

For a full walkthrough on how I installed Nextcloud AIO behind Caddy without using the network_mode:“host” you can check:

1 Like