Setup instructions for Adguard Home and WireGuard
- Configure docker container
Need docker and docker-compose
Create docker-compose.yaml file in /home/user/docker folder. Replace path to match your system and user, check withpwd
command.
version: "2.1"
services:
adguard-home:
image: adguard/adguardhome
container_name: adguard-home
restart: unless-stopped
network_mode: host
dns:
- 127.0.0.1
- 1.1.1.1
ports:
- '53:53/tcp'
- '53:53/udp'
- '67:67/udp'
#- '68:68/tcp'
#- '68:68/udp'
- '80:80/tcp'
- '443:443/tcp'
- '853:853/tcp'
- '3000:3000/tcp'
- '99:99/tcp'
volumes:
- /home/preference/adguard/work:/opt/adguardhome/work
- /home/preference/adguard/conf:/opt/adguardhome/conf
- Start container
docker-compose up -d
-
Open browser at server IP:3000
-
(Disable systemd-resolved if its using port 53) https://github.com/AdguardTeam/AdGuardHome/wiki/Docker#-running-on-a-system-with-resolved-daemon
-
Add DNS filterlist
E.g. http://dbl.oisd.nl (I reccomend using only one list, as to avoid conflicts) -
Set server static IP
-
Add DNS server on devices, or directly in your router configuration
-
Enjoy AD- and trackerfree browsing
- Create or add service to previous docker-compose.yaml.
version: "2.1"
services:
wireguard:
image: ghcr.io/linuxserver/wireguard
container_name: wireguard
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Oslo
#- SERVERURL=wireguard.domain.com #optional
#- SERVERPORT=51820 #optional
- PEERS=1 #optional
- PEERDNS=auto #optional
- INTERNAL_SUBNET=10.13.13.0 #optional
- ALLOWEDIPS=0.0.0.0/0 #optional
volumes:
- /path/to/appdata/config:/config
- /lib/modules:/lib/modules
ports:
- 51820:51820/udp
sysctls:
- net.ipv4.conf.all.src_valid_mark=1
restart: unless-stopped
- Start container
docker-compose up -d
-
Port forward SERVERPORT to server IP in router
-
Setup VPN network if router requires it
E.g. 10.13.13.0/24 -
Download WireGuard app on clients
-
Create and scan QR-code
apt install qrencode
qrencode -t ansiutf8 < wireguard/config/peer1/peer1.conf
- Browse encrypted, secure and ad-free while away