# Traefik v2.0 Docker Swarm Service Labels

**URL:** <https://community.traefik.io/t/traefik-v2-0-docker-swarm-service-labels/848>\
**Category:** Traefik v2\
**Created:** [July 10, 2019, 1:09am UTC](https://community.traefik.io/t/traefik-v2-0-docker-swarm-service-labels/848 "2019-07-10T01:09:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cbille0](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/cbille0/32/432_2.png) [@cbille0](https://community.traefik.io/u/cbille0)\
**Post date:** [July 10, 2019, 1:09am UTC](https://community.traefik.io/t/traefik-v2-0-docker-swarm-service-labels/848/1 "2019-07-10T01:09:05Z")

</div>

Hello,

I have a quick question with regards to the service labels when deploying Traefik v2.0 in Docker Swarm. For the Docker Swarm service with the Traefik v2.0 image (using docker compose yaml file), under deploy \> labels, do I want to have that set to traefik.enable=false? I have pasted a snippet of a docker compose to make it clearer of what I am talking about.

```auto
version: "3.7"
services:
  traefik:
    image: traefik:v2.0.0-alpha8-alpine
    deploy:
      replicas: 1
      labels:
        - "traefik.enable=false"
      placement:
        constraints:
          - "node.role == manager"

```

Thank you,  
Chris

---

<div class="post-metadata">

**Author:** ![mpl](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@mpl](https://community.traefik.io/u/mpl)\
**Post date:** [July 11, 2019, 8:54am UTC](https://community.traefik.io/t/traefik-v2-0-docker-swarm-service-labels/848/2 "2019-07-11T08:54:54Z")

</div>

Hi Chris,

I think the most relevant part of the documentation regarding your question is:  
[https://docs.traefik.io/v2.0/providers/docker/#exposedbydefault](https://docs.traefik.io/v2.0/providers/docker/#exposedbydefault)

And to answer it, I think that you indeed need to set traefik.enable=false on your traefik container if you want it to ignore itself. That is, if you haven't already set exposedbydefault to false.

hth,  
Mathieu

---

<div class="post-metadata">

**Author:** ![cbille0](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/cbille0/32/432_2.png) [@cbille0](https://community.traefik.io/u/cbille0)\
**Post date:** [July 11, 2019, 7:59pm UTC](https://community.traefik.io/t/traefik-v2-0-docker-swarm-service-labels/848/3 "2019-07-11T19:59:01Z")

</div>

Hello,

Thank you for your reply. It was very helpful. I just have a quick follow up question for you. Would there ever be a reason for me to add docker labels traefik service itself?

---

<div class="post-metadata">

**Author:** ![mpl](https://avatars.discourse-cdn.com/v4/letter/m/e480ec/32.png) [@mpl](https://community.traefik.io/u/mpl)\
**Post date:** [July 12, 2019, 8:15am UTC](https://community.traefik.io/t/traefik-v2-0-docker-swarm-service-labels/848/4 "2019-07-12T08:15:33Z")

</div>

You mean, is there a reason to add labels to the container that runs traefik itself?

> [@cbille0](#):
>
> Hello,
> 
> Thank you for your reply. It was very helpful. I just have a quick follow up question for you. Would there ever be a reason for me to add docker labels traefik service itself?

---

<div class="post-metadata">

**Author:** ![cbille0](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/cbille0/32/432_2.png) [@cbille0](https://community.traefik.io/u/cbille0)\
**Post date:** [July 13, 2019, 12:42am UTC](https://community.traefik.io/t/traefik-v2-0-docker-swarm-service-labels/848/5 "2019-07-13T00:42:23Z")

</div>

Correct. I want to use the best practices when deploying traefik.
