# How do I find internal server ip to be used with url in file provider

**URL:** <https://community.traefik.io/t/how-do-i-find-internal-server-ip-to-be-used-with-url-in-file-provider/6957>\
**Category:** Traefik v2\
**Tags:** file\
**Created:** [July 17, 2020, 2:48pm UTC](https://community.traefik.io/t/how-do-i-find-internal-server-ip-to-be-used-with-url-in-file-provider/6957 "2020-07-17T14:48:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fomm](https://avatars.discourse-cdn.com/v4/letter/f/ea666f/32.png) [@fomm](https://community.traefik.io/u/fomm)\
**Post date:** [July 17, 2020, 2:48pm UTC](https://community.traefik.io/t/how-do-i-find-internal-server-ip-to-be-used-with-url-in-file-provider/6957/1 "2020-07-17T14:48:21Z")

</div>

Hi everyone,

If I used docker as provider, I can define `entrypoint`, `router`, `service`, `loanbalancer port` with label as below

```auto
      - "traefik.http.routers.nginx-secure.entrypoints=websecure"
      - "traefik.http.routers.nginx-secure.rule=Host(`yourdomain`)"
      - "traefik.http.routers.nginx-secure.service=bitwarden-service"
      - "traefik.http.services.nginx-service.loadbalancer.server.port=80"

```

As you can see I don't need to know what internal service ip address is. However with file provider, it appears that I must put the private ip address next to url.

[https://docs.traefik.io/v2.0/routing/services/](https://docs.traefik.io/v2.0/routing/services/)

```auto
## Dynamic configuration
http:
  services:
    my-service:
      loadBalancer:
        servers:
        - url: "http://private-ip-server-1/"

```

I know I can inspect the container to check its IP address, is there any quicker way to find the internal IP?

Thanks

---

<div class="post-metadata">

**Author:** ![fomm](https://avatars.discourse-cdn.com/v4/letter/f/ea666f/32.png) [@fomm](https://community.traefik.io/u/fomm)\
**Post date:** [July 17, 2020, 3:09pm UTC](https://community.traefik.io/t/how-do-i-find-internal-server-ip-to-be-used-with-url-in-file-provider/6957/2 "2020-07-17T15:09:43Z")

</div>

I do find a quicker way accidentally... Let me share it with you guys.  
on your static configurations, add Docker as another provider

```auto
providers:
  docker:
    endpoint: "unix:///var/run/docker.sock"
    exposedByDefault: false
  file:
    directory: /path/to/config/
    watch: true

```

After that, after you've started a new docker service, you can see a this docker service available on your Traefik dashboard and you can get the internal ip address there.

screenshot below:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/containo/original/2X/6/62dd3d0d945820743de6cf69743c3070290672c0.png)

If you know any good methods of getting the internal ip address, please let me know.

Thanks

---

<div class="post-metadata">

**Author:** ![cakiwi](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/cakiwi/32/3205_2.png) [@cakiwi](https://community.traefik.io/u/cakiwi)\
**Post date:** [July 17, 2020, 4:47pm UTC](https://community.traefik.io/t/how-do-i-find-internal-server-ip-to-be-used-with-url-in-file-provider/6957/3 "2020-07-17T16:47:00Z")

</div>

I can't think of a good reason to do this. It's precisely why the dynamic providers exist.

The ip is unlikely to be addressable outside of the docker host and docker networks.

Unless you are doing ip configuration for your container(in which case you know the ip) the ip is almost certainly going to change when you change the container.

---

<div class="post-metadata">

**Author:** ![fomm](https://avatars.discourse-cdn.com/v4/letter/f/ea666f/32.png) [@fomm](https://community.traefik.io/u/fomm)\
**Post date:** [July 18, 2020, 1:23pm UTC](https://community.traefik.io/t/how-do-i-find-internal-server-ip-to-be-used-with-url-in-file-provider/6957/4 "2020-07-18T13:23:38Z")

</div>

Can you please confirm the correct way of getting the IP of a container/service is to use docker inspect, is that right?
