# How to specify server in consul catalog？

**URL:** <https://community.traefik.io/t/how-to-specify-server-in-consul-catalog/3485>\
**Category:** Traefik v2\
**Tags:** consul-catalog\
**Created:** [December 17, 2019, 7:59am UTC](https://community.traefik.io/t/how-to-specify-server-in-consul-catalog/3485 "2019-12-17T07:59:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikecoo](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@mikecoo](https://community.traefik.io/u/mikecoo)\
**Post date:** [December 17, 2019, 7:59am UTC](https://community.traefik.io/t/how-to-specify-server-in-consul-catalog/3485/1 "2019-12-17T07:59:55Z")

</div>

- "traefik.http.services.myservice.loadbalancer.server.port=8080"

but How to specify server in consul catalog？ like this？

- "traefik.http.services.myservice.loadbalancer.server=32.23.23.23"

---

<div class="post-metadata">

**Author:** ![ldez](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/ldez/32/5_2.png) [@ldez](https://community.traefik.io/u/ldez)\
**Post date:** [December 17, 2019, 8:26am UTC](https://community.traefik.io/t/how-to-specify-server-in-consul-catalog/3485/2 "2019-12-17T08:26:36Z")

</div>

Hello,

the IP is detect automatically from Consul Catalog information.

If needed you can specify the port or the scheme:

```auto
traefik.http.services.myservice.loadbalancer.server.port=8080

```

```auto
traefik.http.services.myservice.loadbalancer.server.scheme=http

```

- [https://docs.traefik.io/v2.1/routing/providers/consul-catalog/#services](https://docs.traefik.io/v2.1/routing/providers/consul-catalog/#services)

---

<div class="post-metadata">

**Author:** ![mikecoo](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@mikecoo](https://community.traefik.io/u/mikecoo)\
**Post date:** [December 17, 2019, 8:44am UTC](https://community.traefik.io/t/how-to-specify-server-in-consul-catalog/3485/3 "2019-12-17T08:44:11Z")

</div>

how to set host in Consul Catalog information ????????/

---

<div class="post-metadata">

**Author:** ![ldez](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/ldez/32/5_2.png) [@ldez](https://community.traefik.io/u/ldez)\
**Post date:** [December 17, 2019, 9:06am UTC](https://community.traefik.io/t/how-to-specify-server-in-consul-catalog/3485/4 "2019-12-17T09:06:05Z")

</div>

Consul Catalog contains information to connect to your service, Traefik consume thos data so you don't need to manually define the IP/host of your service.

To route to your service, you have to create a the rule of the router:

```auto
traefik.http.routers.myrouter.rule=Host(`mydomain.com`)

```

- [https://docs.traefik.io/v2.1/routing/providers/consul-catalog/#routers](https://docs.traefik.io/v2.1/routing/providers/consul-catalog/#routers)

---

<div class="post-metadata">

**Author:** ![taro](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/taro/32/2441_2.png) [@taro](https://community.traefik.io/u/taro)\
**Post date:** [August 18, 2020, 4:24am UTC](https://community.traefik.io/t/how-to-specify-server-in-consul-catalog/3485/5 "2020-08-18T04:24:52Z")

</div>

can you add an ip to the Host(`10.x.x.x`)?
