Home Assistant Community Add-on: AdGuard Home

I’m running it on debian so I just ssh to my server. I don’t use home assistant os. But I believe that you can open terminal, not in home assistant, and ssh to your hassio.
Just tried in ha terminal. It works. You probably doesnt have installed netstat. So install it.

I have a similiar error when trying to clear the logs, previous version of Adguard worked fine:

SOLVED BY RESTORING ADGUARD 4.7.4

@frenck are you aware of this problem :sunglasses:

1 Like

You made my day!! Looked everywhere to find out why I was unable to get AdGuard and ESPhome to show in the frontend. You provided the solution!

Setting up the add-on works well. However, I cannot manage to get it running with the integration:

image

I did set the port for the webinterface
image

and use that for the integration, but it just doesn’t work. The log says something about “authorization required”:

File "/usr/local/lib/python3.10/site-packages/adguardhome/adguardhome.py", line 164, in request
raise AdGuardHomeError(
adguardhome.exceptions.AdGuardHomeError: (401, {'message': '<html>\r\n<head><title>401 Authorization Required</title></head>\r\n<body>\r\n<center><h1>401 Authorization Required</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n'})

Any ideas?

Answering my own question:

the web interface setting is not needed. Looking at the AdGuard Home log, I found the following:

2022/11/19 22:50:14.796051 [info] AdGuard Home is available at the following addresses:
2022/11/19 22:50:14.796112 [info] Go to http://127.0.0.1:45158

using port 45158 for the integration did the trick.

Hey, anyone have a similar problem? Custom blocking rules doesn’t work, ||example.org^ enters the page and nothing, it still works. everything according to the documentation. I tested it some time ago and it was ok, I wanted to try again and this time it didn’t work.

Hello, what credentials shoul I use to log in the web interface (after enabling the port in the configuration)? Tried with HA user credentials but not accepted. Thanks

Dear gieljnssnsGiel,
Many thanks. I was looking for this for long until finding your repository. It works like a charm!
I am now finding links from Garena (an online game) to block to prevent my son from playing all time!
Minh Chau

1 Like

You can use with automation to block or remove block to specific websites/ services

Kindly give an example…

Please see the full repo on this link

Special thanks Gieljnssns for his repo
It’s something like this (In Gieljnssns repo):
So, you can easily to enable/ disable access to Facebook by switching on/ off the Facebook button created as the below example.

input_boolean:
  allowfacebook:
    name: Allow Facebook
    # initial: on
    icon: mdi:facebook


automation:
  - id: enable_facebook
    alias: Enable Facebook
    hide_entity: true
    initial_state: 'on'
    trigger:
      platform: state
      entity_id: input_boolean.allowfacebook
      to: 'on'
    action:
    - service: adguard.remove_url
      data:
        url: https://raw.githubusercontent.com/gieljnssns/Block_facebook_dns/master/adguard-facebook.txt

  - id: disable_facebook
    alias: Disable Facebook
    hide_entity: true
    initial_state: 'on'
    trigger:
      platform: state
      entity_id: input_boolean.allowfacebook
      to: 'off'
    action:
    - service: adguard.add_url
      data:
        url: https://raw.githubusercontent.com/gieljnssns/Block_facebook_dns/master/adguard-facebook.txt

On a RPI HA OS platform, IPV6 link-local address for HA as name server no longer works on the LAN. The global address for HA works fine as the name server on the LAN. I don’t know which update (to HA OS, AdGuard or other) broke it since I have dual stack and didn’t notice until today that AdGuard was not resolving IPV6 dns request.

Hi all,

Have you installed the new 4.7.6 release? In my HA instance, the update is not recognized and I’m stuck on 4.7.5, do you know how to force the update? I have tried clicking on search for updates but it didn’t work.

It’s only available in Edge community add-ons against the last commit.

Thanks in advance :slight_smile:

The build for 4.7.6 did not complete successfully, so while the GitHub release exists, no update to the Docker image was issued I believe.

Thanks for the info @Alec much appreciated :slight_smile:

Hey guys, anyone having issues with the 4.8.0 release? Seems it has a conflict with systemd-resolve when trying to listen on 127.0.0.1:53. I’m running two separate boxes with the Supervised install on Debian 11, had the same issue with both. Rollback solved the issue, but I’m still on previous version.

2 Likes

This is driving me nuts!! ADGuard was working fine and now it can’t start…

[13:27:12] INFO: Starting AdGuard Home server...
2023/01/21 13:27:12.286869 [info] AdGuard Home, version v0.107.22
2023/01/21 13:27:12.288010 [info] AdGuard Home updates are disabled
2023/01/21 13:27:12.291712 [info] tls: using default ciphers
2023/01/21 13:27:12.307280 [info] Initializing auth module: /data/adguard/data/sessions.db
2023/01/21 13:27:12.309102 [info] auth: initialized.  users:0  sessions:0
2023/01/21 13:27:12.309694 [info] web: initializing
2023/01/21 13:27:12.775535 [info] dnsproxy: cache: enabled, size 4096 b
2023/01/21 13:27:12.775765 [info] MaxGoroutines is set to 300
2023/01/21 13:27:12.775925 [info] AdGuard Home is available at the following addresses:
2023/01/21 13:27:12.775988 [info] Go to http://127.0.0.1:45158
[13:27:12] INFO: Starting NGinx...
[13:27:14] INFO: Successfully send discovery information to Home Assistant.
s6-rc: info: service discovery successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
2023/01/21 13:27:20.746343 [info] Starting the DNS proxy server
2023/01/21 13:27:20.747002 [info] Ratelimit is enabled and set to 20 rps
2023/01/21 13:27:20.747519 [info] The server is configured to refuse ANY requests
2023/01/21 13:27:20.747986 [info] dnsproxy: cache: enabled, size 4194304 b
2023/01/21 13:27:20.748430 [info] MaxGoroutines is set to 300
2023/01/21 13:27:20.748863 [info] Creating the UDP server socket
2023/01/21 13:27:20.749455 [info] Listening to udp://192.168.0.5:53
2023/01/21 13:27:20.750055 [info] Creating the UDP server socket
2023/01/21 13:27:20.750749 [info] Listening to udp://192.168.0.65:53
2023/01/21 13:27:20.751220 [info] Creating the UDP server socket
2023/01/21 13:27:20.751909 [info] Listening to udp://192.168.0.166:53
2023/01/21 13:27:20.752522 [info] Creating the UDP server socket
2023/01/21 13:27:20.753338 [info] Listening to udp://192.168.0.180:53
2023/01/21 13:27:20.753880 [info] Creating the UDP server socket
2023/01/21 13:27:20.755499 [info] Listening to udp://172.30.32.1:53
2023/01/21 13:27:20.756071 [info] Creating the UDP server socket
2023/01/21 13:27:20.792336 [fatal] couldn't start forwarding DNS server: listening to udp socket: listen udp 127.0.0.1:53: bind: address already in use
[13:27:20] INFO: Service Adguard Home exited with code 1 (by signal 0)
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service discovery: stopping
s6-rc: info: service nginx: stopping
s6-rc: info: service discovery successfully stopped
[13:27:21] INFO: Starting AdGuard Home server...
2023/01/21 13:27:21.087346 [info] AdGuard Home, version v0.107.22
2023/01/21 13:27:21.088018 [info] AdGuard Home updates are disabled
2023/01/21 13:27:21.095928 [info] tls: using default ciphers
2023/01/21 13:27:21.142646 [info] Initializing auth module: /data/adguard/data/sessions.db
2023/01/21 13:27:21.143378 [info] auth: initialized.  users:0  sessions:0
2023/01/21 13:27:21.143938 [info] web: initializing
[13:27:21] INFO: Service NGINX exited with code 0 (by signal 0)
s6-rc: info: service nginx successfully stopped
s6-rc: info: service init-nginx: stopping
s6-rc: info: service adguard: stopping
s6-rc: info: service init-nginx successfully stopped
2023/01/21 13:27:21.202401 [info] Received signal "terminated"
2023/01/21 13:27:21.202448 [info] stopping AdGuard Home
2023/01/21 13:27:21.202454 [info] stopping http server...
2023/01/21 13:27:21.205965 [info] stopped http server
2023/01/21 13:27:21.229972 [info] stopped
[13:27:21] INFO: Service Adguard Home exited with code 0 (by signal 0)
s6-rc: info: service adguard successfully stopped
s6-rc: info: service init-adguard: stopping
s6-rc: info: service init-adguard successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

What do you guys think it’s the problem here?
It makes HA run VERY slow and doesn’t start.

Perhaps this is your problem

2023/01/21 13:27:20.792336 [fatal] couldn't start forwarding DNS server: listening to udp socket: listen udp 127.0.0.1:53: bind: address already in use

it seems that something else is already listening to port 53.