# Traefik Container being detected by itself - Is this intended?

**URL:** <https://community.traefik.io/t/traefik-container-being-detected-by-itself-is-this-intended/14431>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [May 10, 2022, 11:28pm UTC](https://community.traefik.io/t/traefik-container-being-detected-by-itself-is-this-intended/14431 "2022-05-10T23:28:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![CyberiumShadow](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/cyberiumshadow/32/5322_2.png) [@CyberiumShadow](https://community.traefik.io/u/CyberiumShadow)\
**Post date:** [May 10, 2022, 11:28pm UTC](https://community.traefik.io/t/traefik-container-being-detected-by-itself-is-this-intended/14431/1 "2022-05-10T23:28:48Z")

</div>

I've got Traefik running in Secure Mode via api@internal as the service, however I've also seen that there is a service for the container that Traefik is running in as well.

Is this intended behaviour?

```auto
version: '3'

services:
  traefik:
    # The official v2 Traefik docker image
    image: traefik:v2.6
    hostname: traefik
    container_name: traefik
    # Enables the web UI and tells Traefik to listen to docker
    command: 
    - --entrypoints.web.address=:80
    - --api.insecure=false
    - --api.dashboard=true
    - --providers.docker
    - --providers.docker.exposedbydefault=false
    - --api.debug=true
    ports:
      # The HTTP port
      - "80:80"
      # The Web UI (enabled by --api.insecure=true)
      # - "8080:8080"
    volumes:
      # So that Traefik can listen to the Docker events
      - /var/run/docker.sock:/var/run/docker.sock
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.dashboard.rule=Host(`traefik.home`)"
      - "traefik.http.routers.dashboard.service=api@internal"
      - "traefik.docker.network=traefik"
    networks:
      traefik:
        ipv4_address: 172.16.0.2
      
networks:
  traefik:
    name: traefik
    ipam:
      driver: default
      config:
        - subnet: "172.16.0.0/16"

```

---

<div class="post-metadata">

**Author:** ![tommoulard](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/tommoulard/32/2997_2.png) [@tommoulard](https://community.traefik.io/u/tommoulard)\
**Post date:** [May 11, 2022, 2:27pm UTC](https://community.traefik.io/t/traefik-container-being-detected-by-itself-is-this-intended/14431/2 "2022-05-11T14:27:27Z")

</div>

Hello @CyberiumShadow,

As you configured your traefik docker container to have the `traefik.enable=true` label, Traefik picks it up as a potential service. Change it to true to remove it.

---

<div class="post-metadata">

**Author:** ![CyberiumShadow](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/cyberiumshadow/32/5322_2.png) [@CyberiumShadow](https://community.traefik.io/u/CyberiumShadow)\
**Post date:** [May 11, 2022, 11:12pm UTC](https://community.traefik.io/t/traefik-container-being-detected-by-itself-is-this-intended/14431/3 "2022-05-11T23:12:23Z")

</div>

Hello,

I presume you mean changing `traefik.enable=true` to `traefik.enable=false`?  
In that case, in order to navigate to `http://traefik.home`, it would require the use of the file provider correct?

```auto
http:
  routers:
    dashboard:
      entryPoints:
      - web
      service: api@internal
      rule: Host(`traefik.home`)

```

---

<div class="post-metadata">

**Author:** ![tommoulard](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/tommoulard/32/2997_2.png) [@tommoulard](https://community.traefik.io/u/tommoulard)\
**Post date:** [May 12, 2022, 7:53am UTC](https://community.traefik.io/t/traefik-container-being-detected-by-itself-is-this-intended/14431/4 "2022-05-12T07:53:58Z")

</div>

> [@CyberiumShadow](#):
>
> I presume you mean changing `traefik.enable=true` to `traefik.enable=false` ?

yes, indeed

> [@CyberiumShadow](#):
>
> In that case, in order to navigate to `http://traefik.home` , it would require the use of the file provider correct?

yes, indeed

---

<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:** [May 15, 2022, 7:54am UTC](https://community.traefik.io/t/traefik-container-being-detected-by-itself-is-this-intended/14431/5 "2022-05-15T07:54:54Z")

</div>

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