Adguard integration behind a Traefik reverse proxy

I’ve got a Docker server in which both HA and several other apps including Adguard are installed in containers. When I try to set up the Adguard integration it can’t connect to my Adguard instance, with the below error in my logs.

Basically, Traefik reverse proxies Adguard such that I can go to to interact with it. During setup the installer for Adguard changed itself to port 80 and my Traefik labels represent that. I can use Adguard itself just fine (53 is directly exposed for DNS). The domain is a real one with a valid LE SSL certificate and I have DNS entries set up in Adguard so that my clients point to the internal lan IP address.

I’m not sure what is happening. It could be trying to connect to port 3000 despite having a port field which might result in the 404 error. Any help is appreciated.

Config screen for the intergation:

Traefik log (included for thoroughness, from another attempt): - - [30/May/2021:17:14:54 +0000] "GET /control/status HTTP/1.1" - - "-" "-" 86 "-" "-" 0ms - - [30/May/2021:17:14:54 +0000] "POST /api/config/config_entries/flow/d73ab95d89a945b6a0ebb25797066d92 HTTP/2.0" 500 55 "-" "-" 85 "[email protected]" "" 7ms

Home Assistant log:

Logger: aiohttp.server
Source: components/adguard/
First occurred: 12:35:13 AM (36 occurrences)
Last logged: 2:27:09 AM

Error handling request
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/aiohttp/", line 422, in _handle_request
    resp = await self._request_handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/", line 499, in _handle
    resp = await handler(request)
  File "/usr/local/lib/python3.8/site-packages/aiohttp/", line 119, in impl
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/", line 56, in security_filter_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/", line 18, in request_context_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/", line 74, in ban_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/", line 135, in auth_middleware
    return await handler(request)
  File "/usr/src/homeassistant/homeassistant/components/http/", line 131, in handle
    result = await result
  File "/usr/src/homeassistant/homeassistant/components/config/", line 155, in post
    return await super().post(request, flow_id)
  File "/usr/src/homeassistant/homeassistant/components/http/", line 63, in wrapper
    result = await method(view, request, *args, **kwargs)
  File "/usr/src/homeassistant/homeassistant/helpers/", line 109, in post
    result = await self._flow_mgr.async_configure(flow_id, data)
  File "/usr/src/homeassistant/homeassistant/", line 199, in async_configure
    result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
  File "/usr/src/homeassistant/homeassistant/", line 257, in _async_handle_step
    result: FlowResult = await getattr(flow, method)(user_input)
  File "/usr/src/homeassistant/homeassistant/components/adguard/", line 93, in async_step_user
    await adguard.version()
  File "/usr/local/lib/python3.8/site-packages/adguardhome/", line 223, in version
    response = await self.request("status")
  File "/usr/local/lib/python3.8/site-packages/adguardhome/", line 164, in request
    raise AdGuardHomeError(
adguardhome.exceptions.AdGuardHomeError: (404, {'message': '404 page not found\n'})

As soon as I typed this all out and submitted I thought hey, lets try port 443 and of cause it now works.

Ah well, thanks for reading anyway. :grin:

I’m having a problem almost like yours … Can you share your docker-compose.yaml?

I got the same Setup:
2 times AdGuard Home behind Traefik Reverse Proxy on 2 Raspberry Pis to protect my home network.

I can confirm that port 443 works (as long you are using HTTPS/SSL:

Port: 443

If you’ve got it setup in docker-compose you could probably route to the adguard container directly from home assistant without going through ‘my’. e.g. by using the adguard container name as the host address, or by pointing the host address to and the port to the one exposed by adguard.

(that last option is the one I chose)