Serve Traefik's internal dashboard behind Traefik itself

I have recently switched from jwilder/nginx-proxy + JrCs/docker-letsencrypt-nginx-proxy-companion to a more powerful reverse proxy called Traefik. Traefik has built-in ACME support, can be used as a load-balancer and (most importantly) has official Docker support!

When I was configuring Traefik's internal dashboard (the good-looking web UI), I was thinking of serving it behind the proxy itself. But the documantation didn't say how to do it. It only mentioned to serve the dashboard on a port other than 80 or 443, so you can only access with, for example, 111.222.333.444:7777. I wanted to use something like

Well, it needs a tricky hack.

You simply define a new entrypoint, I call it "traefik" here. Set the port number to anything you like. Finally give the Traefik container some traefik labels as you would to normal web containers.


address = ":80"

entryPoint = "https"
permanent = true

address = ":443"
compress = true

address = ":9987"
compress = true

users = ["123:456"]

entryPoint = "traefik"
dashboard = true


version: '3'

- 9987
- ""
- "traefik.enable=true"
- ""
- "traefik.basic.port=9987"
- "traefik.basic.protocol=http"

It's somehow stupid tho.