AdGuard Home on a Linux server: a gotcha

When you are running AdGuard Home on Ubuntu Server, you may run into an issue which I have recently encountered. It turned out that for some reason, rebooting the whole system does not bring AdGuard back. This came as a surprise, since I set Docker to automatically load and the AdGuard container to turn on.

However, Ubuntu has its own DNS resolver inbuilt: systemd-resolved, which may occupy port 53. It boots first, takes the port, and then prevents Docker from binding. To fix this issue, we may do the following:

1) Open the configuration file with `sudo vim /etc/systemd/resolved.conf`

2) Uncomment (or add) the following lines:

[Resolve]
DNSStubListener=no

3) Restart systemd-resolved:

sudo systemctl restart systemd-resolved

4) Restart your AdGuard container:

docker restart adguardhome

From now on, the port binding should be correct: port 53 should belong to AdGuard. To verify, you may run the following command:

sudo ss -tulpn | grep :53

Marcin

Poland