# Stop trying to use https to fetch the docker socket

**URL:** <https://community.traefik.io/t/stop-trying-to-use-https-to-fetch-the-docker-socket/4986>\
**Category:** Traefik v2\
**Tags:** docker\
**Created:** [March 18, 2020, 12:12pm UTC](https://community.traefik.io/t/stop-trying-to-use-https-to-fetch-the-docker-socket/4986 "2020-03-18T12:12:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Taluu](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/taluu/32/1747_2.png) [@Taluu](https://community.traefik.io/u/Taluu)\
**Post date:** [March 18, 2020, 12:12pm UTC](https://community.traefik.io/t/stop-trying-to-use-https-to-fetch-the-docker-socket/4986/1 "2020-03-18T12:12:12Z")

</div>

Hi. :}

I'm currently trying to use traefik (2.1) to replace our nginx reverse proxy on our docker setup, in order to be more flexible on its config (adding the ability to switch services on the go, switch the ports, ... and so on).

After following a few tutorials here and there, I'm kinda stuck : wehn booting the `reverse-proxy` service (through `docker-compose up -d reverse-proxy ...`), on the logs, it states it can't have a proper http response on `https://%2Fvar%2Frun%2Fdocker.sock/v1.24/version`... instead of using a unix socket (`unix:///var/run/docker.sock`).

Here is a gist showing what I am trying to do : [https://gist.github.com/Taluu/a49c0fa367cf6f7bc5986f0d738e55db](https://gist.github.com/Taluu/a49c0fa367cf6f7bc5986f0d738e55db)

It seems it doesn't see the right endpoint or something like that ? If anyone would have an idea on how to solve that (or at least hints), I'd be grateful for that. :}

Thanks !

---

<div class="post-metadata">

**Author:** ![Taluu](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/taluu/32/1747_2.png) [@Taluu](https://community.traefik.io/u/Taluu)\
**Post date:** [March 18, 2020, 1:47pm UTC](https://community.traefik.io/t/stop-trying-to-use-https-to-fetch-the-docker-socket/4986/2 "2020-03-18T13:47:33Z")

</div>

After some more investigation, it seems that by removing the tls config from the docker provider does the trick (I guess it still does a http call instead ?)

Not sure if it's great, so if anyone could explain that, it would be awesome. :}

---

<div class="post-metadata">

**Author:** ![ben-tpximpact](https://sea2.discourse-cdn.com/flex020/user_avatar/community.traefik.io/ben-tpximpact/32/8432_2.png) [@ben-tpximpact](https://community.traefik.io/u/ben-tpximpact)\
**Post date:** [March 25, 2024, 5:01pm UTC](https://community.traefik.io/t/stop-trying-to-use-https-to-fetch-the-docker-socket/4986/3 "2024-03-25T17:01:47Z")

</div>

4 years late, but I figured this out!

Somewhat confusingly the tls section under the traefik & docker documentation page [Traefik Docker Documentation - Traefik](https://doc.traefik.io/traefik/providers/docker/#tls)

is about using tls when traefik talks to docker so it can read dynamic config from container labels, NOT about setting TLS certs for http routers.

If you're trying to setup tls certs for https connections you need to write a dynamic config file (see [Traefik TLS Documentation - Traefik](https://doc.traefik.io/traefik/https/tls/)) and mount that in the correct directory so it gets loaded.

A great example of this here [Advanced Traefik configuration tutorial - TLS, dashboard, ping, metrics, authentication and more - DEV Community](https://dev.to/karvounis/advanced-traefik-configuration-tutorial-tls-dashboard-ping-metrics-authentication-and-more-4doh)
