Traefik Dashboard 404 not found - Docker

Hi guys,

This is most likely an ID10T issue. First time setting up Traefik v2, and got a Dashboard 404 error.

I've tried curl
and get: 404 page not found

Here's my config:

I've tried following but I'm pretty certain I've mucked something up!

Here are the logs I currently have:

Any help for this muppet would certainly be appreciated!

Thank you

Welcome @modem7

  - "traefik.http.routers.traefik-rtr.entrypoints=https"
  - "traefik.http.routers.traefik-rtr.rule=Host(`traefik.$DOMAINNAME`)"
  - "traefik.http.routers.traefik-rtr.tls=true"

This entrypoint https is defined as port 443 and the router is tls enabled. So using http:// scheme will not work.

Additionally the Rule is host based so you will need to use the host in the url.

Ahha, thank you for the pointer!

I've just setup a CNAME record on cloudflare, made sure the router was port forwarded accordingly to 80 and 443, and verified via ping.

Unfortunately still no go.

Getting 404 on https:// traefik. modem7. com. I'm definitely doing something stupid somewhere!

I'm also seeing acme.json is still empty

Can you post the new config (after your changes) and new logs? 404, when returned from traefik, means that none of the rules has matched, so, this is something you might want to doublecheck. And cert is of course a separate problem.

Also please docker inspect your docker container and check the labels. Using environment variables sometime they just aren't set.

Hi guys,

Thanks for the suggestions!

New Traefik Docker Logs:

Inspect response:

Traefik Logs:

I've checked that all the files in the volumes (rules etc) have the same permissions the traefik.log (as that can be written to, I thought it'd be a good place to start just in case it was a permissions issue)

It looks like the labels are being seen as expected.

Cert I'm not too fussed about at this point, that I can resolve once I can see the dashboard (it's also using a staging server, so cert issues are to be expected).

Please note that Plex is hosted outside of Docker, and the Nginx things you see in the logs are just calls by Netdata.

Hi guys,

It seems that the macvlan might be the issue.

The settings I have work absolutely fine for Nginx, but seems to not work w/ Traefik. Have I done anything glaringly wrong?

The main reason I asked for posting your configuration, is so that I could try and reproduce your issue. Inspect response is not very well suited for that. - this is my full docker compose

Hopefully this should give some insight

Can you also tell me what's not working? In your initial post you wrote:

I've tried curl

but is your internal docker macvlan, where did you issue that command from? How is routing setup between these two networks?

For what it's worth:

- traefik.http.routers.traefik-rtr.service=api@internal

If you are expecting api/dashboard on 8080 it won't be there since you are not using that entrypoint for the api/dashboard.

I've a similar Problem: Dashboard is served by web but not by websecure

version: "3.3"
    image: "traefik:v2.2"
    container_name: "traefik"
      - "--log.level=DEBUG"
      - "--accesslog=true" # print access-logs
      - "--api" # enable dashboard
      - "--api.debug=true"
      - "--providers.docker=true" # listen for docker-container events
      - "--providers.docker.exposedbydefault=false" # explicitly expose by container label
      - "--entrypoints.web.address=:80" # http
      - "--entrypoints.websecure.address=:443" # https
      - "80:80"
      - "443:443"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
      - "traefik.enable=true"
      - "traefik.http.routers.dashboard.rule=Host(``) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
      - "traefik.http.routers.dashboard.service=api@internal"
curl -v
< HTTP/1.1 200 OK

curl -v -k
< HTTP/2 404

What is my problem here?

Welcome @Psi

Your router does not have TLS enabled. You would need two routers on this service to do both http and https.

Ah ok. Is there a way to define tls global for every router similar to treafik 1?


And above that section is the entrypoint redirect. So you can set a default http -> https redirect.

Hmm this is not clear to me. I already have a

  • "--entrypoints.websecure.address=:443"
    Cli option.

The command options, or equivalent toml/yaml

This is my 'simple' example:
    image: "traefik:v2.2"
    - --entrypoints.web.address=:80
    - --entrypoints.web.http.redirections.entryPoint.scheme=https
    - --entrypoints.web.http.redirections.entrypoint.permanent=true
    - --entrypoints.websecure.address=:443
    - --entrypoints.websecure.http.tls=true
    # add a resolver for real certs
    #- --entrypoints.websecure.http.tls.certresolver=myresolver0
    - --providers.docker=true
    - --providers.docker.exposedbydefault=false
    - --api
      traefik.enable: "true"
      #traefik.http.routers.api.rule: (Host(``) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`)))
      traefik.http.routers.api.rule: PathPrefix(`/api`) || PathPrefix(`/dashboard`)
      traefik.http.routers.api.service: api@internal 65535
      traefik.http.routers.api.entrypoints: websecure
      - "80:80"
      - "443:443"
      - "/var/run/docker.sock:/var/run/docker.sock:ro"
    image: containous/whoami
      traefik.enable: "true"
      traefik.http.routers.w.rule: PathPrefix(`/whoami`)
      traefik.http.routers.w.entrypoints: websecure

thanks a lot!
--entrypoints.websecure.http.tls=true did the trick

One last question: Can I have a Host Rule with an IP? Like Host('') ? Seems this is not working.

1 Like

@Psi the documentation for rules is located here. There is nothing that prevents you from having a host rule with an IP, but it will do the same thing that a host rule with a name: filter on the host header of the incoming http request. I'm not sure, that this is what you want.

If I add a Host-Rule with the IP of public interface I'll get 404s. So seems it does not work but never the less, adding a regular DNS for the Dashboard is the more straight forward way.

Many thanks for your feedback and help. I love traefik for years and the progress of v2

If I add a Host-Rule with the IP of public interface I'll get 404s

Does the IP address appear in the host header?