# Specifying service port

**URL:** <https://community.traefik.io/t/specifying-service-port/2926>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [November 13, 2019, 9:48pm UTC](https://community.traefik.io/t/specifying-service-port/2926 "2019-11-13T21:48:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![greg](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/greg/32/1099_2.png) [@greg](https://community.traefik.io/u/greg)\
**Post date:** [November 13, 2019, 9:48pm UTC](https://community.traefik.io/t/specifying-service-port/2926/1 "2019-11-13T21:48:13Z")

</div>

Greetings  
I've setup my first Traefik with a few docker services. Most of them work ok. Some however don't, but I don't understand why. It seems Traefik cannot connect to them. I'm starting with basic configuration: no load balancing, just Traefik as a proxy and a few containers on Traefik's docker network.  
For example, here is a part of my yml file:

```auto
    labels:
      - traefik.enable=true
      - traefik.port=7073
      - traefik.docker.network=traefik_default

```

But in the dashboard, Traefik shows:

```auto
http://172.20.0.5:7072

```

What's happening? how can I specify the port of my service?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![greg](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/greg/32/1099_2.png) [@greg](https://community.traefik.io/u/greg)\
**Post date:** [November 13, 2019, 9:49pm UTC](https://community.traefik.io/t/specifying-service-port/2926/2 "2019-11-13T21:49:19Z")

</div>

Note that the container have only 1 port open, port 7073, and that port 7072 is not open.  
Also it's basic docker, not swarm.

---

<div class="post-metadata">

**Author:** ![zespri](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/zespri/32/310_2.png) [@zespri](https://community.traefik.io/u/zespri)\
**Post date:** [November 14, 2019, 8:54am UTC](https://community.traefik.io/t/specifying-service-port/2926/3 "2019-11-14T08:54:55Z")

</div>

Check out traefik v2 documentation, it looks like you are using v1 labels.

---

<div class="post-metadata">

**Author:** ![dduportal](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/dduportal/32/4_2.png) [@dduportal](https://community.traefik.io/u/dduportal)\
**Post date:** [November 14, 2019, 4:08pm UTC](https://community.traefik.io/t/specifying-service-port/2926/4 "2019-11-14T16:08:32Z")

</div>

+1 with @zespri: check [https://docs.traefik.io/v2.0/routing/providers/docker/](https://docs.traefik.io/v2.0/routing/providers/docker/) , in particular the label `traefik.http.services.<service_name>.loadbalancer.server.port` 🙂

---

<div class="post-metadata">

**Author:** ![greg](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/greg/32/1099_2.png) [@greg](https://community.traefik.io/u/greg)\
**Post date:** [November 15, 2019, 1:57pm UTC](https://community.traefik.io/t/specifying-service-port/2926/5 "2019-11-15T13:57:21Z")

</div>

Oh you mean I have to declare a load balancer even if there's so need for load balancing? that was unclear from the documentation which I read several times. Moreover, all the litterature available seem to relate only to v1, which is very confusing...  
But thanks, it's working now, I still don't know why port 7072 was chosen, but now I'm able to specify the correct port.
