Skip to content
Dorian FINKEL
AdGuard HomeDNSDockerTutorial · 2026 · 3 min read · Updated 9 October 2026
Level · BeginnerDuration · 20 min

Install AdGuard Home with Docker

A filtering DNS resolver for the whole network: ads and malicious domains blocked, local names for your services, and encrypted DNS upstream.

Prerequisites

  • Docker and Docker Compose installed
  • Port 53 free on the host
  • A fixed IP address for the host

01Free port 53

On Ubuntu in particular, systemd-resolved already listens on 127.0.0.53:53: the container couldn’t start. The AdGuard Home documentation disables its local listener and points /etc/resolv.conf to its real configuration.

Example · Shell
sudo mkdir -p /etc/systemd/resolved.conf.d
printf '[Resolve]\nDNS=127.0.0.1\nDNSStubListener=no\n' | sudo tee /etc/systemd/resolved.conf.d/adguardhome.conf
sudo mv /etc/resolv.conf /etc/resolv.conf.backup
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
sudo systemctl reload-or-restart systemd-resolved

02The Compose file

Only useful ports are published: DNS, the first-run setup wizard (3000) and the web interface afterwards. The documentation also lists 853/tcp (DNS-over-TLS), 853/udp (DNS-over-QUIC), 443 (DNS-over-HTTPS) and 67-68/udp (if AdGuard also serves DHCP), to add only if you need them.

Pin a specific image version rather than latest: an update is a decision, not something that lands on restart.

Example · compose.yaml
services:
  adguardhome:
    image: adguard/adguardhome:<version>   # see the releases on GitHub
    container_name: adguardhome
    restart: unless-stopped
    volumes:
      - ./work:/opt/adguardhome/work
      - ./conf:/opt/adguardhome/conf
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "3000:3000/tcp"   # setup wizard
      - "80:80/tcp"       # web interface

03Start and configure

The wizard, on port 3000, picks the listening interfaces and creates the admin account.

Example · Shell
docker compose up -d
# then http://<host-ip>:3000/

04The settings that matter

DNS settings › upstream servers: a DNS-over-HTTPS resolver, for example https://dns.quad9.net/dns-query: your ISP no longer sees the queries.

Filters › DNS rewrites: one local name per service. Don’t invent a suffix: .home, .box or .maison look private, but .maison is a real public domain. Use home.arpa, reserved for this by RFC 8375, or a subdomain of your own domain (nextcloud.home.arpa → 192.168.20.11).

DNS settings: the rate limit (20 queries per second by default) can be disabled on a resolver only the local network can reach.

Finally, hand out AdGuard’s address as the DNS server through the router’s DHCP: the whole network benefits with nothing to configure.

Key takeaways

  • Free port 53 from systemd-resolved first.
  • A pinned image version, only the useful ports.
  • DNS-over-HTTPS upstream: the ISP sees nothing.
  • Local names under home.arpa or your own domain, never an invented TLD.
  • Handed out by DHCP: zero configuration on devices.

Example addresses.

Official sources