How to Install and Configure AdGuard Home on Ubuntu (Complete Network-Wide Ad Blocker Guide)
Last Updated: July 11th, 2026
This comprehensive tutorial shows you how to install, configure, secure, and use AdGuard Home on an Ubuntu server. AdGuard Home is a powerful network-wide software for blocking ads and tracking. By intercepting DNS requests across your entire local network before they ever hit the public internet, it cleans up web pages, stops malicious domains, accelerates browsing speeds, and shields all connected devices—smart TVs, phones, tablets, and computers—automatically.
What Is AdGuard Home?
AdGuard Home is an open-source, self-hosted DNS sinkhole similar to Pi-hole. When you load a website, your device asks a DNS server to translate domain names into numerical IP addresses. AdGuard Home acts as your private local DNS resolver. When it spots a request matching known advertising networks, trackers, or malware domains, it blocks the request instantly and returns an empty response. Self-hosting your DNS filtering stack grants you granular logging, parental control options, and complete privacy over your home or office network traffic.
AdGuard Home Features
- Network-Wide Filtering: Blocks ads, trackers, and telemetry on devices that cannot run native ad-blocking extensions (like smart TVs and IoT appliances).
- Custom Blocklists & Whitelists: Easily import community-driven filter lists (AdGuard SDNS, EasyList, etc.) or add individual custom blocking rules.
- Built-in Parental Controls: Enforces safe search on major search engines, blocks adult domains globally, and restricts access to specific services on a schedule.
- Encrypted DNS Support: Supports modern secure protocols including DNS-over-HTTPS (DoH) and DNS-over-TLS (DoT) upstream to protect your DNS lookups from ISP snooping.
- Detailed Query Analytics: Inspect live query logs, review top blocked domains, and monitor request volumes per client device.
Requirements & Prerequisites
You will need an Ubuntu server (22.04, 24.04 LTS, or newer) with static local IP configuration, sudo privileges, port 53 (DNS) availability, and optionally an Nginx reverse proxy with TLS certificates if you want remote web dashboard access.
Step 1: Download and Run the Automated AdGuard Home Installer
AdGuard Home provides an official automated script that handles architecture detection and service initialization out of the box. Log into your Ubuntu server and run:
curl -s -S -L https://raw.githubusercontent.com/AdguardTeam/AdGuardHome/master/scripts/install.sh | sh -s -- -v
The script downloads the compiled binary, configures systemd integration, and starts the service automatically. Look at the terminal output for the specific web interface listening port (typically port 3000 for initial setup and port 80/443 or web UI port 8080 thereafter).
Step 2: Complete the Initial Web Setup Wizard
Open a web browser on your local network and navigate to your Ubuntu server's IP address on port 3000:
http://<your-ubuntu-server-ip>:3000
Follow the interactive setup configuration steps:
- Select the network interface and port for the **Admin Web Interface** (default port 80/3000).
- Select the network interface and port for the **DNS Server** (ensure port
53is selected for all interfaces). - Create your administrative username and secure password.
- Review instructions on how to configure your home router's DHCP/DNS settings to point devices to your new Ubuntu AdGuard server IP address.
Step 3: Configuring Advanced Upstream DNS Servers
To ensure secure and high-performance name resolution, configure encrypted upstream resolvers inside your AdGuard Home dashboard:
- Log into your main AdGuard admin portal (typically moved to port
80or your chosen configured port, e.g.,http://<server-ip>/). - Navigate to **Settings > DNS Settings**.
- In the **Upstream DNS servers** field, input secure encrypted endpoints or high-speed resolvers. For example:
https://dns.quad9.net/dns-query tls://1.1.1.1 9.9.9.9 - Enable **DNSSEC** validation to verify response signatures and protect against cache poisoning attacks. Click **Save**.
Step 4: Adding Blocklists and Custom Filtering Rules
Maximize your blocking efficiency by adding reputable filter subscriptions:
- Go to **Filters > Blocklists** in your admin dashboard.
- Click **+ Add blocklist**, select **Add a custom list**, and input lists like the official AdGuard DNS filter or OISD tracking protection lists.
- To block a specific domain manually for individual testing, go to **Filters > Custom filtering rules** and input rules like:
||annoying-ads-domain.com^ @@||whitelisted-service.com^ - Click **Save** to apply rules instantly across the DNS engine.
Step 5: Configuring Your Router or Client Devices
To let AdGuard Home process traffic for your entire home network:
- Log into your home broadband router's administrative settings panel.
- Locate the **DHCP Server** or **LAN/WAN DNS Settings** section.
- Change the primary DNS server address from your provider's default values to the static local IP address of your Ubuntu AdGuard Home server.
- Reboot or renew the network lease on your connected household devices. They will now seamlessly route all DNS queries through your private blocker.