Am I misunderstanding ssl.termination and the discovery endpoint?

  • ssl.enable=true → CODE does TLS itself → discovery shows https://.
  • ssl.enable=false --o:ssl.termination=true → TLS expected at proxy → CODE trusts X-Forwarded-Proto.
  • If X-Forwarded-Proto: https is missing, discovery shows http://.
  • Use-case for plain http://: internal/no-TLS setups where Nextcloud also talks HTTP.
  • server_name overrides host; there’s no equivalent for scheme — protocol override relies only on X-Forwarded-Proto.

I am not expert on caddy config’s

I’m not too sure about the Caddy side of things you might find a working example in their docs or by asking in their public channel. From what I can tell, the issue looks more like a Caddy configuration problem than a Collabora one.