Using a secondary Traefik as HTTP provider

Hi,
I'm not even sure if this is possible because I wasn't able to found exact mentions in the docs.

I have two servers in my lan, each one have it's own traefik instance (both v2.11) and I'm trying to have the main one using the secondary as an HTTP provider.

I have all the config in the docker-compose.yaml.

The main one has

      - "--providers.http.endpoint=http://10.10.10.12:8080/api/rawdata"
      - "--providers.http.pollInterval=10s"

The secondary has the API enabled (as insicure just to test) and it's reachable by the main instance (installed curl just to test)

# curl http://10.10.10.12:8080/api/rawdata
{"routers":{"api@internal":{"entryPoints":["traefik"],"service":"api@internal","rule":"PathPrefix(`/api`)","priority":9223372036854775806,"status":"enabled","using":["traefik"]},"dashboard@internal":{"entryPoints":["traefik"],"middlewares":["dashboard_redirect@internal","dashboard_stripprefix@internal"],"service":"dashboard@internal","rule":"PathPrefix(`/`)","priority":9223372036854775805,"status":"enabled","using":["traefik"]},"ping@internal":{"entryPoints":["traefik"],"service":"ping@internal","rule":"PathPrefix(`/ping`)","priority":9223372036854775807,"status":"enabled","using":["traefik"]},"vikunja@docker":{"entryPoints":["websecure"],"service":"vikunja","rule":"Host(`vikunja.federicogranata.dev`)","tls":{"certResolver":"myresolver"},"status":"enabled","using":["websecure"]},"web-to-websecure@internal":{"entryPoints":["web"],"middlewares":["redirect-web-to-websecure@internal"],"service":"noop@internal","rule":"HostRegexp(`{host:.+}`)","priority":9223372036854775806,"status":"enabled","using":["web"]}},"middlewares":{"dashboard_redirect@internal":{"redirectRegex":{"regex":"^(http:\\/\\/(\\[[\\w:.]+\\]|[\\w\\._-]+)(:\\d+)?)\\/$","replacement":"${1}/dashboard/","permanent":true},"status":"enabled","usedBy":["dashboard@internal"]},"dashboard_stripprefix@internal":{"stripPrefix":{"prefixes":["/dashboard/","/dashboard"]},"status":"enabled","usedBy":["dashboard@internal"]},"redirect-web-to-websecure@internal":{"redirectScheme":{"scheme":"https","port":"443","permanent":true},"status":"enabled","usedBy":["web-to-websecure@internal"]}},"services":{"api@internal":{"status":"enabled","usedBy":["api@internal"]},"dashboard@internal":{"status":"enabled","usedBy":["dashboard@internal"]},"noop@internal":{"status":"enabled","usedBy":["web-to-websecure@internal"]},"ping@internal":{"status":"enabled","usedBy":["ping@internal"]},"vikunja@docker":{"loadBalancer":{"servers":[{"url":"http://192.168.0.2:3456"}],"passHostHeader":true},"status":"enabled","usedBy":["vikunja@docker"],"serverStatus":{"http://192.168.0.2:3456":"UP"}}}}

As far as I get JSON is a supported format but it seems like it miss a root http property and so the main instance isn't able to understand it properly

time="2024-11-28T17:03:58Z" level=debug msg="Configuration received: {\"http\":{},\"tcp\":{},\"udp\":{},\"tls\":{}}" providerName=http

Right now I spend an awful amount of hours working on this problem and I'd like to know a few things:

  1. it is possible to achieve?
  2. Am I using the wrong endpoint or am I missing something in my config?

Thank you

Not sure if the API endpoint for dashboard provides valid dynamic config JSON.

You could compare the Traefik debug provider output with the API output.

If it’s different, you probably need a step in between to transform.

But it’s a really interesting idea. So far the solution was usually Docker Swarm or manual config.

I just found a plugin that should do the trick Plugin sadly it's not updated and I can't figure it out how to made it works even with just the docker-compose.yml provided in the repo.

Anyone can tell me if this could be a viable way?