# Traefik reads but doesn't load dynamic configuration

**URL:** <https://community.traefik.io/t/traefik-reads-but-doesnt-load-dynamic-configuration/20750>\
**Category:** Traefik v2\
**Tags:** file\
**Created:** [December 12, 2023, 5:48pm UTC](https://community.traefik.io/t/traefik-reads-but-doesnt-load-dynamic-configuration/20750 "2023-12-12T17:48:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mlazzarotto](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/mlazzarotto/32/5617_2.png) [@mlazzarotto](https://community.traefik.io/u/mlazzarotto)\
**Post date:** [December 12, 2023, 5:48pm UTC](https://community.traefik.io/t/traefik-reads-but-doesnt-load-dynamic-configuration/20750/1 "2023-12-12T17:48:20Z")

</div>

I have setup Traefik on Ubuntu (no docker).  
The problem is that the dashboard is not showing any of the components of my dynamic configuration, but if I mess it up, Traefik reports that the dynamic configuration is not valid... so it seems that he's checking if the config is valid, but it's not loading it

`/etc/traefik/traefik.yaml`

```traefik
providers:
  file:
    directory: /etc/traefik/dynamic
    watch: true

api:
  dashboard: true
  insecure: true
  debug: true

log:
  level: DEBUG

```

`/etc/traefik/dynamic/dynamic.yaml`

```traefik
entryPoints:
  cloudflare_2083:
    address: :2083

  middlewares:
    HSTS:
      headers:
        stsSeconds: 15552000
        stsIncludeSubdomains: true
        forceSTSHeader: true
        stsPreload: true
        frameDeny: true
        browserXssFilter: true

  routers:
    routerSeafile:
      entryPoints: cloudflare_2083
      service: seafile
      rule: "Host(`sf.me.it`)"
      middlewares:
        - "HSTS"
      tls: {}
    routerSeafHttp:
      entryPoints: cloudflare_2083
      service: seafhttp
      rule: "Host(`sf.me.it`) && PathPrefix(`/seafhttp`)"
      middlewares:
        - "HSTS"
      tls: {}
    routerSeafdav:
      entryPoints: cloudflare_2083
      service: seafdav
      rule: "Host(`sf.me.it`) && PathPrefix(`/seafdav`)"
      middlewares:
        - "HSTS"
      tls: {}
    routerCode:
      entryPoints: cloudflare_2083
      service: code
      rule: "Host(`seafile.lab.me.it`)"
      middlewares:
        - "HSTS"
      tls: {}

  services:
    seafile:
      servers:
        - url: http://seafile.lab.me.it:8000
    seafhttp:
      servers:
        - url: http://seafile.lab.me.it:8082
    seafdav:
      servers:
        - url: http://seafile.lab.me.it:8080
    code:
      servers:
        - url: http://seafile.lab.me.it:9980

tls:
  certificates:
    - certFile: /etc/traefik/certs/star_me_it.pem
      keyFile: /etc/traefik/certs/star_me_it.pem.key
      stores:
        - me
  options:
    default:
      minVersion: VersionTLS12

```

---

<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:** [December 12, 2023, 5:51pm UTC](https://community.traefik.io/t/traefik-reads-but-doesnt-load-dynamic-configuration/20750/2 "2023-12-12T17:51:11Z")

</div>

`entrypoints` belongs in static, `routers`, `middlewares` and `services` in dynamic config.

---

<div class="post-metadata">

**Author:** ![mlazzarotto](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/mlazzarotto/32/5617_2.png) [@mlazzarotto](https://community.traefik.io/u/mlazzarotto)\
**Post date:** [December 13, 2023, 7:21am UTC](https://community.traefik.io/t/traefik-reads-but-doesnt-load-dynamic-configuration/20750/3 "2023-12-13T07:21:29Z")

</div>

I moved my `entryPoints` to the static file, but still I don't see any of my routers, middlewares or services in the dashboard (but I see the routers, middlewared and services of the dashboard/api)

```traefik
middlewares:
  HSTS:
    headers:
      stsSeconds: 15552000
      stsIncludeSubdomains: true
      forceSTSHeader: true
      stsPreload: true
      frameDeny: true
      browserXssFilter: true

routers:
  routerSeafile:
    entryPoints: cloudflare_2083
    service: seafile
    rule: "Host(`sf.myself.it`)"
    middlewares:
      - "HSTS"
    tls: {}
  routerSeafHttp:
    entryPoints: cloudflare_2083
    service: seafhttp
    rule: "Host(`sf.myself.it`) && PathPrefix(`/seafhttp`)"
    middlewares:
      - "HSTS"
    tls: {}
  routerSeafdav:
    entryPoints: cloudflare_2083
    service: seafdav
    rule: "Host(`sf.myself.it`) && PathPrefix(`/seafdav`)"
    middlewares:
      - "HSTS"
    tls: {}
  routerCode:
    entryPoints: cloudflare_2083
    service: code
    rule: "Host(`seafile.lab.myself.it`)"
    middlewares:
      - "HSTS"
    tls: {}

services:
  seafile:
    servers:
      - url: http://seafile.lab.myself.it:8000
  seafhttp:
    servers:
      - url: http://seafile.lab.myself.it:8082
  seafdav:
    servers:
      - url: http://seafile.lab.myself.it:8080
  code:
    servers:
      - url: http://seafile.lab.myself.it:9980

tls:
  certificates:
    - certFile: /etc/traefik/certs/star_myself_it.pem
      keyFile: /etc/traefik/certs/star_myself_it.pem.key
      stores:
        - myself
  options:
    default:
      minVersion: VersionTLS12

```

---

<div class="post-metadata">

**Author:** ![mlazzarotto](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/mlazzarotto/32/5617_2.png) [@mlazzarotto](https://community.traefik.io/u/mlazzarotto)\
**Post date:** [December 13, 2023, 8:41am UTC](https://community.traefik.io/t/traefik-reads-but-doesnt-load-dynamic-configuration/20750/4 "2023-12-13T08:41:46Z")

</div>

@bluepuma77 I've found the issue. I was not nesting the routers, services and middlewares under `http:`
