# Create middleware with docker labels on traefik own container

**URL:** <https://community.traefik.io/t/create-middleware-with-docker-labels-on-traefik-own-container/8287>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [October 22, 2020, 1:26pm UTC](https://community.traefik.io/t/create-middleware-with-docker-labels-on-traefik-own-container/8287 "2020-10-22T13:26:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leosirth](https://avatars.discourse-cdn.com/v4/letter/l/97f17d/32.png) [@Leosirth](https://community.traefik.io/u/Leosirth)\
**Post date:** [October 22, 2020, 1:26pm UTC](https://community.traefik.io/t/create-middleware-with-docker-labels-on-traefik-own-container/8287/1 "2020-10-22T13:26:16Z")

</div>

Hi All,

I'm trying to create a middleware as docker labels directly on the traefik compose and reuse it on other routers, but this is not created.  
Also the router "traefik" is not created.

Is there any limitation?

If I put the same on different containers it just works, will traefik not look for labels at his own container?  
(using Docker NOT on Swarm mode)

```yaml
version: '3'

services:
  traefik:
    image: traefik:latest
    network_mode: "host"
    volumes:
      - ./acme:/etc/traefik/acme
      - ./traefik.yml:/etc/traefik/traefik.yml
    labels:
      - 'traefik.enable=true'
      # dashboard
      - 'traefik.http.routers.traefik.entryPoints=https'
      - 'traefik.http.routers.traefik.tls=true'
      - 'traefik.http.routers.traefik.rule=Host(`traefik.example.com`)'
      - 'traefik.http.routers.traefik.service=api@internal'
      - 'traefik.http.routers.traefik.middlewares=onlyLAN'
      
      # onlyLAN WhiteList
      - 'traefik.http.middlewares.onlyLAN.ipwhitelist.sourcerange=192.168.0.0/16'
      

```
