# Dashboard 404 after upgrading from v2

**URL:** <https://community.traefik.io/t/dashboard-404-after-upgrading-from-v2/26509>\
**Category:** Traefik v3 (latest)\
**Tags:** cli, dashboard-api, file, docker, middleware\
**Created:** [February 15, 2025, 5:41pm UTC](https://community.traefik.io/t/dashboard-404-after-upgrading-from-v2/26509 "2025-02-15T17:41:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mlsh0](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/mlsh0/32/9988_2.png) [@mlsh0](https://community.traefik.io/u/mlsh0)\
**Post date:** [February 15, 2025, 5:41pm UTC](https://community.traefik.io/t/dashboard-404-after-upgrading-from-v2/26509/1 "2025-02-15T17:41:32Z")

</div>

I get error "404 page not found" after upgrading from traefik from v2.x.x to v3.x..  
This error appears only when I'm trying to access dashboard but when I'm using it to access other containers it works fine.

> docker-compose.yml

```auto
version: "3.9"
services:
  traefik:
    image: traefik:v3.3.0
    container_name: traefik
    networks:
      - proxy
    ports:
      - 80:80/tcp
      - 443:443/tcp
    volumes:
      - ./config/traefik.yml:/traefik.yml:ro
      - ./config/dynamic.yml:/dynamic.yml:ro
      - /docker/logs/traefik:/var/logs/traefik
      - ./acme.json:/acme.json
      - /var/run/docker.sock:/var/run/docker.sock
      - /etc/localtime:/etc/localtime:ro
    security_opt:
      - no-new-privileges:true
    environment:
      - CF_DNS_API_TOKEN=X
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.dashboard.rule=Host(`traefik.local.X`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
      - "traefik.http.routers.traefik.entrypoints=websecure"
      - "traefik.http.routers.traefik.service=api@internal"
      - "traefik.http.routers.traefik.tls.certresolver=cloudflare"
      - "traefik.http.routers.traefik.tls=true"
      - "traefik.http.routers.traefik.tls.domains[0].main=local.X"
      - "traefik.http.routers.traefik.tls.domains[0].sans=*.local.X"
      - "traefik.http.routers.traefik.middlewares=auth@file,default@file"
    restart: always
networks:
  proxy:
    external: true

```

> traefik.yml

```auto
global:
  checkNewVersion: false
  sendAnonymousUsage: false

api:
  dashboard: true
  debug: false
entryPoints:
  web:
    address: ":80"
    http:
      redirections:
        entrypoint:
          to: websecure
          scheme: https
  websecure:
    address: ":443"

serversTransport:
  insecureSkipVerify: true

providers:
  docker:
    endpoint: "unix:///var/run/docker.sock"
    exposedByDefault: false
    network: proxy
    watch: true
  file:
    filename: "dynamic.yml"
    watch: true

certificatesResolvers:
  cloudflare:
    acme:
      email: ""
      storage: "/acme.json"
      keyType: RSA4096
      dnsChallenge:
        provider: cloudflare
        resolvers:
          - "1.1.1.1:53"
          - "1.0.0.1:53"

log:
  level: "DEBUG"
  filePath: "/var/logs/traefik/traefik.log"
accessLog:
  filePath: "/var/logs/traefik/access.log"
  bufferingSize: 100

```

> dynamic.yml

```auto
tls:
  options:
    default:
      minVersion: VersionTLS13
      sniStrict: true

http:
  middlewares:
    auth:
      basicAuth:
        users:
          - "x"

```

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [February 15, 2025, 5:55pm UTC](https://community.traefik.io/t/dashboard-404-after-upgrading-from-v2/26509/2 "2025-02-15T17:55:29Z")

</div>

This seems wrong:

> [@mlsh0](#):
>
> ```auto
> middlewares=auth@file,default@file"
> 
> ```

The "default" does not seem to be a declared `middleware`.

---

<div class="post-metadata">

**Author:** ![mlsh0](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/mlsh0/32/9988_2.png) [@mlsh0](https://community.traefik.io/u/mlsh0)\
**Post date:** [February 15, 2025, 6:13pm UTC](https://community.traefik.io/t/dashboard-404-after-upgrading-from-v2/26509/3 "2025-02-15T18:13:40Z")

</div>

Removed "default@file". Still doesn't work

---

<div class="post-metadata">

**Author:** ![bluepuma77](https://avatars.discourse-cdn.com/v4/letter/b/a9adbd/32.png) [@bluepuma77](https://community.traefik.io/u/bluepuma77)\
**Post date:** [February 15, 2025, 6:56pm UTC](https://community.traefik.io/t/dashboard-404-after-upgrading-from-v2/26509/4 "2025-02-15T18:56:15Z")

</div>

You should use the same `router` name for all labels:

> [@mlsh0](#):
>
> ```auto
> labels:
> - "traefik.enable=true"
> - "traefik.http.routers.dashboard.rule=Host(`traefik.local.X`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))"
> # ^
> - "traefik.http.routers.traefik.entrypoints=websecure"
> - "traefik.http.routers.traefik.service=api@internal"
> - "traefik.http.routers.traefik.middlewares=auth@file"
> 
> ```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/b/bd81ebdb578656e76e56ff3cc3eed021d3ba132d.png) [@system](https://community.traefik.io/u/system)\
**Post date:** [February 18, 2025, 6:57pm UTC](https://community.traefik.io/t/dashboard-404-after-upgrading-from-v2/26509/5 "2025-02-18T18:57:13Z")

</div>

Closed on February 18, 2025, 6:57pm UTC

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