Traefik redirecting its dashboard to http instead of specified https

I recently replaced my SWAG reverse proxy with Traefik and it's mostly working, I have only two issues to resolve but I'll focus on one for now.

I use Homer as a dashboard for all the stuff I run on my servers and in the list of links I have a link to Traefik's dashboard in the form of https://dashboard.docker.REDACTED but when I click on the link Traefik sends Firefox a redirect to http://dashboard.docker.REDACTED for some reason and I get an HTTP 404 error. If I open a new tab and enter https://dashboard.docker.REDACTED manually I get the Traefik dashboard as expected.

Here is my docker-compose.yaml file:

version: "3.3"

    image: "traefik:v2.9"
    container_name: "traefik"
      - --log.level=DEBUG
      - --api.insecure=true
      - --providers.docker=true
      - --providers.docker.exposedbydefault=false
      - --entrypoints.web.address=:80
      - --entrypoints.websecure.address=:443
      - --entrypoints.web.http.redirections.entryPoint.scheme=https
      - --entrypoints.web.http.redirections.entrypoint.permanent=true
      - --entrypoints.websecure.http.tls.certresolver=myresolver
      - --certificatesresolvers.myresolver.acme.dnschallenge=true
      - --certificatesresolvers.myresolver.acme.dnschallenge.provider=cloudflare
      - "traefik.enable=true"
      - "traefik.http.routers.dashboard.rule=Host(`dashboard.docker.REDACTED`)"
      - "traefik.http.routers.dashboard.service=dashboard"
      - "traefik.http.routers.dashboard.entrypoints=websecure"
      - ""
      - 80:80
      - 443:443
      - data:/letsencrypt
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - --api.insecure=true

This is why

Okay I removed that line and recreated the container. I still get redirected to http, and if I enter https://dashboard.docker.REDACTED I get the error Bad Gateway

I spent about three hours trying to get Traefik to display its own dashboard properly and failed. I switched to Nginx Proxy Manager and got everything working in about 10 minutes.

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