AdGuard Home Docker
Pinned FeaturedI tweaked the Pi-Hole doc's and another users contribution to get adguard home running with persistence. You can set DoH, DoT inside adguard home settings. here are the instructions.
create this directory
/home/pi/.firewalla/run/docker/AdGuardHome
create this file in that directory docker-compose.yaml
--------------paste the following in that file-----------------------
version: "3"
# More info at https://github.com/r/adguard/adguardhome
services:
adguardhome:
container_name: adguardhome
image: adguard/adguardhome
volumes:
- '/data/adguardhome/work/:/opt/adguardhome/work'
- './adguardhome/conf/:/opt/adguardhome/conf'
restart: unless-stopped
networks:
default:
# static IP address for adguardhome
ipv4_address: 172.16.0.2
networks:
default:
driver: bridge
ipam:
config:
# your chosen docker network here
- subnet: 172.16.0.0/24
///////////////END OF file-do not include this line////////////////////////////
----next go to this directory-----
cd /home/pi/.firewalla/run/docker/adguardhome
run these commands(you can paste them all in or run them single command at time. Prob run single if you are learning)
sudo systemctl start docker
sudo docker-compose pull
sudo docker-compose up --no-start
sudo ip route add 172.16.0.0/24 dev br-$(sudo docker network inspect adguardhome_default |jq -r '.[0].Id[0:12]') table lan_routable
sudo ip route add 172.16.0.0/24 dev br-$(sudo docker network inspect adguardhome_default |jq -r '.[0].Id[0:12]') table wan_routable
sudo docker-compose up --detach
-----make this directory--- -----------
/home/pi/.firewalla/config/post_main.d/
------make this file in that directory-------
start_AdGuard_home.sh
----post this in that file--------------
sudo systemctl start docker
sudo ipset create -! docker_lan_routable_net_set hash:net
sudo ipset add -! docker_lan_routable_net_set 172.16.0.0/24
sudo ipset create -! docker_wan_routable_net_set hash:net
sudo ipset add -! docker_wan_routable_net_set 172.16.0.0/24
sudo systemctl start docker-compose@adguardhome
---------If you need to restart service----------------
restart
sudo systemctl restart docker-compose@adguardhome
----note Adguard home installs on port 3000.. so to get to main web browser try 172.16.0.2:3000 if after initial setup this doesn't work anymore first try 172.16.0.2:80 as well.
-
Thx for this. It worked. Only thing is Docker and YAML is new to me. Had to figure out that YAML is formatted. Use the one below with formatting needed.
version: "3"
services:
adguardhome:
container_name: adguardhome
image: adguard/adguardhome
volumes:
- '/data/adguardhome/work/:/opt/adguardhome/work'
- './adguardhome/conf/:/opt/adguardhome/conf'
restart: unless-stopped
networks:
default:
# static IP address for adguardhome
ipv4_address: 172.16.0.2
networks:
default:
driver: bridge
ipam:
config:
# your chosen docker network here
- subnet: 172.16.0.0/24 -
Does anyone have trouble with failing IPv6 tests at sites like internet.nl and https://test-ipv6.com/ with this setup?
-
Hi,
I have the service up&running and the system seems using that. But there is no stats seems and to be honest i'm not sure if it's working or it's my firewalla that act as AdBlocker.
If i do a nslookup my win is using 172.16.0.2 ad dns resolver but as i said the no stats seems weird.
Any hint?
-
On 22.04 docker compose needs a custom network name specified in the yaml for the configs above to work. Easy enough, just add a line and specify the name under the networks element, ex:
networks:
default:
name: adguardhome_default
driver: bridge
ipam:
config:
# your chosen docker network here
- subnet: 172.16.0.0/24
Please sign in to leave a comment.
Comments
5 comments