Adguard Home and Ubuntu DNS conflict

Hello, I’m hoping someone can help me.

I’m running Linux Server 18.04 and used the excellent scripts provided by the legend Franck Nijhof that can be found here.

I’m trying to run the Adguard Home component that is also managed by Franck Nijhof which can be found here.

The problem is when I try and run Adguard Home after it has been installed successfully I get a Bad Gateway 502 error. After looking into this and I’m no Linux expert it looks like Ubuntu wants to be the DNS server and as a result Adguard Home is conflicting with it.

Can anyone suggest what I need to do please because as I said I’m no expert and I really would rather not cock-up my install which is running lovely at the moment, touch wood!

Thanks

Hi,

Try stopping the systemd-resolved service.

sudo systemctl stop systemd-resolved

Restart Adguard addon.
Should be working now.

If it is working then disable the service so it will not start after a reboot.

sudo systemctl disable systemd-resolved.service
2 Likes

Thanks you for this help. So I did as you suggested and stopped systemd-resolved and I can now connect to Adguard Home, excellent. However while I was in the Addon section I noticed that NodeRed had an update so I clicked to update it and it failed with error “Temporary failure in name resolution”. So I restarted systemd-resolved and it installed however Adguard Home once again won’t load.

Thank again.

Thats correct.

Once you stop systemd-resolved the local system doesnt have a dns server to check dns queries.

You need to edit the dns settings for the ubuntu server or add this info in your dhcp server to automatically add the dns server to all the devices in your network.

Generally you can set this settings in your router.

Thanks again for your suggestions. I had already set a static IP and DNS settings which I initially configured when I installed Ubuntu.

In my router I have set the DNS IP addresses to that of the Adguard Home on Hassio which is sitting on the Ubuntu Server which I am having problems with.

I’m thinking this is where I’m going wrong, however I want any internet connection from my house to use the Adguard Home benefits so I’m a little lost at to what I should do now?

Thanks

I think I managed to do it.

This is what I did

I ran this command to edit this file
sudo nano /etc/systemd/resolved.conf

And made these changes to the file unhashing and amended / added to the lines here
DNS=1.1.1.1
FallbackDNS=1.0.0.1
DNSStubListener=no

I then disable the service as described above with this command
sudo systemctl disable systemd-resolved.service

Then I rebooted with
reboot now

This seems to allow Adguard to work and allow me to update the other services and addons both on ubuntu and hassio.

Thanks for your help.

2 Likes