# 2.2.8 Minimal configuration for dashboard not working

**URL:** <https://community.traefik.io/t/2-2-8-minimal-configuration-for-dashboard-not-working/7140>\
**Category:** Traefik v2\
**Tags:** dashboard-api, docker\
**Created:** [July 30, 2020, 8:55am UTC](https://community.traefik.io/t/2-2-8-minimal-configuration-for-dashboard-not-working/7140 "2020-07-30T08:55:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![loganmzz](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/loganmzz/32/2358_2.png) [@loganmzz](https://community.traefik.io/u/loganmzz)\
**Post date:** [July 30, 2020, 8:55am UTC](https://community.traefik.io/t/2-2-8-minimal-configuration-for-dashboard-not-working/7140/1 "2020-07-30T08:55:58Z")

</div>

Hello there,

I wish to try upgrading to Traefik v2 but I'm not able to setup a minimal configuration with dashboard enabled. Traefik starts up but trying to access Dashboard or API always results in HTTP Error 404

```yaml
# docker-compose.yml
version: '3.0'

services:
  traefik:
    image: traefik:2.2.8
    ports:
    - "80:80"
    volumes:
    - "./traefik.yml:/etc/traefik/traefik.yml"
    - "/var/run/docker.sock:/var/run/docker.sock"
    networks:
    - main

networks:
  main:
    driver: bridge

# traefik.yml
log:
  level: DEBUG

api:
  dashboard: true

http:
  routers:
    dashboard:
      rule: Host('traefik.localhost')
      service: "api@internal"

```

Tested URLs:

- [http://traefik.localhost/](http://traefik.localhost/)
- [http://traefik.localhost/dashboard/](http://traefik.localhost/dashboard/)
- [http://traefik.localhost/api/](http://traefik.localhost/api/)

What am I missing ?

---

<div class="post-metadata">

**Author:** ![ldez](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/ldez/32/5_2.png) [@ldez](https://community.traefik.io/u/ldez)\
**Post date:** [July 30, 2020, 11:44am UTC](https://community.traefik.io/t/2-2-8-minimal-configuration-for-dashboard-not-working/7140/2 "2020-07-30T11:44:37Z")

</div>

in the v2, the [dynamic configuration](https://docs.traefik.io/v2.2/getting-started/configuration-overview/#the-dynamic-configuration) and the [static configuration](https://docs.traefik.io/v2.2/getting-started/configuration-overview/#the-static-configuration) must be defined in separated files:

- [https://docs.traefik.io/v2.2/getting-started/configuration-overview/#the-dynamic-configuration](https://docs.traefik.io/v2.2/getting-started/configuration-overview/#the-dynamic-configuration)
- [https://docs.traefik.io/v2.2/getting-started/configuration-overview/#the-static-configuration](https://docs.traefik.io/v2.2/getting-started/configuration-overview/#the-static-configuration)

A minimal example:

```auto
version: '3.7'

services:

  traefik:
    image: traefik:v2.2.8
    command:
      # - --log.level=DEBUG
      - --api
      - --providers.docker.exposedbydefault=false
      - --entrypoints.web.address=:80
      - --entrypoints.web.http.redirections.entrypoint.to=websecure
      - --entrypoints.web.http.redirections.entrypoint.scheme=https
      - --entrypoints.websecure.address=:443
      - --entrypoints.websecure.http.tls=true
    ports:
      - 80:80
      - 443:443
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
    labels:
      traefik.enable: "true"

      # Dashboard
      traefik.http.routers.traefik.rule: Host(`traefik.localhost`)
      traefik.http.routers.traefik.entrypoints: websecure
      traefik.http.routers.traefik.service: api@internal

  whoami:
    image: containous/whoami:v1.5.0
    labels:
      traefik.enable: "true"

      traefik.http.routers.app.rule: Host(`whoami.localhost`)
      traefik.http.routers.app.entrypoints: websecure

```

---

<div class="post-metadata">

**Author:** ![loganmzz](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/loganmzz/32/2358_2.png) [@loganmzz](https://community.traefik.io/u/loganmzz)\
**Post date:** [July 30, 2020, 1:11pm UTC](https://community.traefik.io/t/2-2-8-minimal-configuration-for-dashboard-not-working/7140/3 "2020-07-30T13:11:14Z")

</div>

Ok thank you !

I find static / dynamic meaning not exaclty what I'm expecting ... I thought static was everything that's define at startup. I think only the picture is really explicit:

 ![](https://docs.traefik.io/v2.2/assets/img/static-dynamic-configuration.png)

However, here is the final configuration for future reader:

```yaml
# docker-compose.yml
version: '3.0'

services:
  traefik:
    image: traefik:2.2.8
    ports:
    - "80:80"
    volumes:
    - "./etc:/etc/traefik"
    - "/var/run/docker.sock:/var/run/docker.sock"
    networks:
    - main

networks:
  main:
    driver: bridge

# ./etc/traefik.yml
log:
  level: DEBUG

api:
  dashboard: true

providers:
  file:
    directory: /etc/traefik/config.d

# ./etc/config.d/traefik-dashboard.yml
http:
  routers:
    dashboard:
      rule: Host(`traefik.localhost`)
      service: "api@internal"

```

---

<div class="post-metadata">

**Author:** ![TrafikJam](https://avatars.discourse-cdn.com/v4/letter/t/b38774/32.png) [@TrafikJam](https://community.traefik.io/u/TrafikJam)\
**Post date:** [March 23, 2021, 9:45pm UTC](https://community.traefik.io/t/2-2-8-minimal-configuration-for-dashboard-not-working/7140/4 "2021-03-23T21:45:23Z")

</div>

Right the words 'static' and 'dynamic' are totally not used correctly throughout Traefik.

---

<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:** [March 26, 2021, 9:46pm UTC](https://community.traefik.io/t/2-2-8-minimal-configuration-for-dashboard-not-working/7140/5 "2021-03-26T21:46:13Z")

</div>

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