# Traefik + Authelia -\> cannot create middleware

**URL:** <https://community.traefik.io/t/traefik-authelia-cannot-create-middleware/9427>\
**Category:** Traefik v2\
**Tags:** docker, middleware\
**Created:** [January 25, 2021, 1:51pm UTC](https://community.traefik.io/t/traefik-authelia-cannot-create-middleware/9427 "2021-01-25T13:51:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jLemmings](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/jlemmings/32/3253_2.png) [@jLemmings](https://community.traefik.io/u/jLemmings)\
**Post date:** [January 25, 2021, 1:51pm UTC](https://community.traefik.io/t/traefik-authelia-cannot-create-middleware/9427/1 "2021-01-25T13:51:36Z")

</div>

Hello

I am trying to protect a container with Authelia. This is the list of Traefik labels I have set to the container:

```auto
   labels:
      - traefik.enable=true
      - traefik.docker.network=traefik_proxy  
      - traefik.http.services.myservice.loadbalancer.server.port=8989
      - traefik.http.routers.myservice.middlewares=authelia@docker
      - traefik.http.routers.myservice.rule=Host(`myservice.mydomain.com`)
      - traefik.http.routers.myservice.entrypoints=https
      - traefik.http.routers.myservice.tls=true

```

Traefik container:

```auto
  traefik:
    container_name: traefik
    hostname: docker
    image: traefik:latest
    restart: always
    domainname: mydomain.com
    ports:
      - 80:80
      - 443:443
      - 7070:8080
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock:ro
      - ${CONFIG}/traefik:/etc/traefik
      - ${CONFIG}/traefik/log:/var/log/traefik
    environment:
      - PUID=${PUID}
      - PGID=${PGID}
    networks:
      - default
      - traefik_proxy
    labels:
      - traefik.http.routers.http-catchall.rule=HostRegexp(`{any:.+}`)
      - traefik.http.routers.http-catchall.entrypoints=http
      - traefik.http.routers.http-catchall.middlewares=redirect-to-https
      - traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https
      - traefik.http.middlewares.https_redirect.redirectscheme.permanent=true
      - traefik.http.routers.api.service=api@internal

```

Traefik version: 2.4.0  
Authelia version: 4.25.2

What am I doing wrong?  
Thanks for any suggestions!
