Rest-server: TLS with Traefik (reverse proxy)

Traefik is a nice utility, with what you can very easily throw a domain, get & maintain certs from Let’s Encrypt and more.

When using rest-server via docker with traefik, I get http: server gave HTTP response to HTTPS client (also with --tls (without specifying a cert)).

Is there any way to get this working or is support from rest-server needed?

I haven’t tried this setup myself, but my thoughts are:

  • Naturally rest-server can only talk HTTP if you don’t give it a TLS cert to use, so that’s expected.

  • If you front it with Traefik, then Traefik should wrap that HTTP from rest-server in HTTPS, and if that’s not what you’re seeing, you probably have a misconfiguration in Traefik?

Take a look at the Caddy restic plugin. I think it does what you want because Caddy was made to provide HTTPS out of the box.

2 Likes

After looking at it again, it now magically works for no apparent reason. My brain melted due to the magic yesterday.