software:service:adguardhome
This is an old revision of the document!
Table of Contents
Infos
Following Pi-Hole's update to v6 that creates amazing lags and performance issues:
dig google.com @8.8.8.8 | grep time ;; Query time: 7 msec dig google.com @192.168.1.1 -p 53 | grep time #SwisscomBox ;; Query time: 10 msec dig google.com @192.168.1.10 | grep time #Raspberry Pi 2... ;; Query time: 1316 msec dig google.com @192.168.1.11 | grep time #BeagleBoneBlack ;; Query time: 12 msec
Now the same after moving both to AdGuard:
dig google.com @8.8.8.8 | grep time ;; Query time: 10 msec dig google.com @192.168.1.1 | grep time ;; Query time: 6 msec dig google.com @192.168.1.10 | grep time ;; Query time: 13 msec dig google.com @192.168.1.11 | grep time ;; Query time: 10 msec dig google.com @192.168.1.15 | grep time #Docker container see below ;; Query time: 4 msec
Install
~straightforward once you have the correct archive…
- Raspberry Pi:
wget https://static.adguard.com/adguardhome/release/AdGuardHome_linux_armv6.tar.gz
- BeagleBoneBlack:
wget AdGuardHome_linux_armv7.tar.gz
tar xvzf AdGuardHome_linux*.tar.gz cd AdGuardHome ./AdGuardHome -s install
And voilà … : might be better to put in /opt
Once installed, go to http://IP of your device:3000 to start the setup
In Settings/DNS Settings, put the IP of unbound + some other failover DNS:
127.0.0.1:5335
9.9.9.9
1.1.1.1
Enjoy your new DNS
Docker
Here is a Docker version:
it's a container with a fixedIP ≠ from the docker server
docker network create -d macvlan --subnet=192.168.1.0/24 --gateway=192.168.1.1 -o parent=eno1 my_macvlan
git clone https://github.com/hat3ph/docker-adguard-unbound.git cd docker-adguard-unbound vi docker-compose.yml
services:
adguard-unbound:
container_name: adguard-unbound
image: ghcr.io/hat3ph/adguard-unbound:latest
restart: unless-stopped
hostname: adguard-unbound
volumes:
- "./adguard/opt-adguard-work:/opt/adguardhome/work"
- "./adguard/opt-adguard-conf:/opt/adguardhome/conf"
- "./unbound:/opt/unbound"
networks:
my_macvlan:
ipv4_address: 192.168.1.15 # statically assign the desired LAN IP
networks:
my_macvlan:
external: true
mkdir -p ./adguard/opt-adguard-work mkdir -p ./adguard/opt-adguard-conf mkdir -p ./unbound docker compose up -d
then finish the setup in http://192.168.1.15:3000
DNS of unbound is in unbound/unbound.conf: 127.0.0.1:5053 → to be put in Settings/DNS Settings
optimisation
vi ./unbound/unbound.conf
prefetch: yes prefetch-key: yes msg-cache-size: 128m rrset-cache-size: 256m # Minimum caching time for any record (in seconds) cache-min-ttl: 300
docker rm -f adguard-unbound docker compose up -d
Better Host perfs
sysctl -w net.core.rmem_max=26214400 sysctl -w net.core.wmem_max=26214400 sysctl -w net.ipv4.tcp_rmem="4096 87380 26214400" sysctl -w net.ipv4.tcp_wmem="4096 16384 26214400"
Tweaks
Improve cache & speed :
Upstream DNS
vi /opt/AdGuardHome/conf/upstream-dns.txt systemctl restart AdGuardHome
#UncensoredDNS 91.239.100.100 89.233.43.71 #DNS.WATCH #84.200.69.80 #84.200.70.40 #OpenDNS #208.67.222.222 #208.67.220.220 # Freenom world #80.80.80.80 #80.80.81.81
software/service/adguardhome.1769766960.txt.gz · Last modified: by warnaud
