Adguard Docker

Im about ready to throw a wrench at my damn server over this docker build. I can not for the life of me figure out how to get Ad Guard to install. I have followed the docker instructions to the LETTER and there is no solution given for the problem that exists when the server is already using port 68 and 53.

Error starting userland proxy: listen udp 0.0.0.0:68: bind: address already in use.

I’ve tried

sudo kill systemd-resolve

it always restarts and fails to install Ad Guard. Every. Time.

Any expert Docker enthusiasts out there wanna save my day?

Same here, I am also running on Docker

I discovered the solution and I apologize for not posting it here but it is:

docker run --name adguardhome -v /my/own/workdir:/opt/adguardhome/work -v /my/own/confdir:/opt/adguardhome/conf --net=host -p 67:67/udp -p 80:80/tcp -p 443:443/tcp -p 853:853/tcp -p 3000:3000/tcp -d adguard/adguardhome

1 Like

To get adguard home or PiHole to work on an existing docker server if you port conflicts two things worked for me

You can check any port usage with this command :

 sudo ss -tulpn | grep ':53' 

To resolve :

1st You need to set a static IP address in OS

2nd Stop systemD or whichever network manager you are using doing name resolution

1 Like

I am new to ubuntu, yet from my research I would suggest editing your resolved.conf to free up the port imho.

1, Edit /etc/systemd/resolved.conf with a text editor (as root), e.g. open it with Nano console text editor

And uncomment (remove # from the front of the line) the DNS= line and the DNSStubListener= line. Next, change the DNS= value in this file to the DNS server you want to use (e.g. 127.0.0.1 to use a local proxy, 1.1.1.1 to use the Cloudflare DNS, etc.), and also change the DNSStubListener= value from yes to no.

This is how the file should look after you’ve made these changes (I’m using 1.1.1.1 as the DNS server here, which is the Cloudflare DNS):

[Resolve]
DNS=1.1.1.1
#FallbackDNS=
#Domains=
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#DNSOverTLS=no
#Cache=no
DNSStubListener=no
#ReadEtcHosts=yes

To save the file using Nano text editor, press Ctrl + x, then type y and press Enter.

2. Create a symbolic link for /run/systemd/resolve/resolv.conf with /etc/resolv.conf as the destination:

Here, -s is for creating a symbolic and not hard link, and -f is for removing any existing destination files (so it removes /etc/resolv.conf if it exists).

3. Reboot your system.

Port 53 should now be free on your Ubuntu system, and you shouldn’t be getting errors like “listen tcp 127.0.0.1:53: bind: address already in use” anymore.

You can check to see if port 53 is in use or not by running sudo lsof -i :53 - if port 53 is not in use, this command shouldn’t show any output.

Full guide from https://www.linuxuprising.com/2020/07/ubuntu-how-to-free-up-port-53-used-by.html