29 Nov 2022
Switching to AdGuard Home
Sahil KokamkarTable of content
I have been a long term Pi-hole user, and it worked flawless over the years. But it lacks a lot of native features such as DOH, DOT etc. Though you can enable it but requires additional packages.
Installing AdGuard Home
Running AdGuard Home is simple and can run natively or via docker. I prefer running it via docker. So if you are planning to do the same, here are the steps:
Create Directory for Configs and Storage
mkdir {workdir, config}
Now run the docker command
docker run --name adguardhome\
--restart unless-stopped\
-v /workdir:/opt/adguardhome/work\
-v /config:/opt/adguardhome/conf\
-p 53:53/tcp -p 53:53/udp\
-p 67:67/udp -p 68:68/udp\
-p 80:80/tcp -p 443:443/tcp -p 443:443/udp -p 3000:3000/tcp\
-p 853:853/tcp\
-p 784:784/udp -p 853:853/udp -p 8853:8853/udp\
-p 5443:5443/tcp -p 5443:5443/udp\
-d adguard/adguardhome
It will pull the docker image and should run in background. You can also remove unnecessary mapped port which you're not going to use. For e.g: -p 853:853/tcp
which is for Dns-Over-TLS.
If you plan to use AdGuard DHCP server, add --network host
and you can also remove the port mapping as it's going to use host network.
![Installing AdGuard Home via Docker](/image/blog/installing-adguard-home.png "Installing AdGuard Home via Docker" =680×474)
You can now visit the AdGuard Dashboard by navigating to http://127.0.0.1:3000/
or ip address along with port 3000.
Create your Username and password.
After finishing the setup, you should be able to see the dashboard.
You can now see the DNS Query if it's configured correctly.
If you plan to use it with DOH go to Settings>Encryption
. And your domain and check the Enable Encryption checkbox.
Once you're done generate Let's Encrypt certificate by stopping the running container and running the following command:
sudo certbot certonly --standalone --preferred-chain "ISRG Root X1"
Once it's done, you can either copy the certificate content and paste it manually or copy it to workdir and start the container.
Now you can aslo configure and use DOH via Android through Private DNS settings or via browser just add your DNS domain. I will miss Pi-hole UI for sure.