June 4, 2025

How to Install AdGuard Home in Docker on a Raspberry Pi – A Smart DNS Solution

mr rockstar

How to Install AdGuard Home in Docker on a Raspberry Pi – A Smart DNS Solution
Cheap Dedicated Server

AdGuard Home is a powerful, lightweight network-wide ad blocker that also improves privacy and browsing speed. Running it on a Raspberry Pi with Docker is one of the easiest and cleanest setups you can create. This guide walks you through installing AdGuard Home as a Docker container on a Raspberry Pi host.


Why Use AdGuard Home on Docker + Raspberry Pi?

  • Minimal footprint – Perfect for Pi’s limited resources
  • Full control – Self-hosted privacy-respecting DNS resolver
  • Docker benefits – Isolated, portable, easy-to-update

🛠️ Installation Steps

Prerequisites

  • Raspberry Pi (Pi 3, 4, or 5 recommended)
  • Raspberry Pi OS or Raspberry Pi OS Lite (Debian-based)
  • Docker and Docker Compose installed
    (Install Docker: curl -sSL https://get.docker.com | sh)

Step-by-Step Guide

1. Create a Directory for AdGuard Home

  Create a Directory for AdGuard Home

mkdir -p ~/adguardhome
cd ~/adguardhome

2. Create a docker-compose.yml File

Create a docker-compose

 

version: '3'

services:
  adguardhome:
    image: adguard/adguardhome:latest
    container_name: adguardhome
    restart: unless-stopped
    network_mode: "host"
    volumes:
      - ./work:/opt/adguardhome/work
      - ./conf:/opt/adguardhome/conf

💡 Using network_mode: host simplifies DNS setup but only works on Linux hosts like Raspberry Pi.

3. Start the Container

Start the Container

 

docker compose up -d

4. Access AdGuard Home Web UI

Go to:
http://<your_pi_ip>:3000
Follow the setup wizard to configure DNS, admin credentials, etc.


Is This a Good Idea?

Yes – running AdGuard Home in Docker on a Raspberry Pi is both efficient and privacy-friendly. You avoid cloud-based DNS logging and gain full control over your browsing environment. It’s an ideal low-power solution for home networks.


 

Install AdGuard Home in Docker on a Raspberry Pi (F.A.Q)

Can I use AdGuard Home alongside Pi-hole?

Yes, but not on the same ports. It’s simpler to use only one at a time.

 

What ports does AdGuard Home use?

By default, port 53 for DNS, 80 and 3000 for web UI (first-time setup).

 

Can I block ads on smart TVs and apps?

Yes. As a DNS-level blocker, AdGuard Home blocks ads across your entire network, including mobile apps and smart TVs.

 

Will it slow down my internet?

No – in fact, DNS-level blocking often speeds up browsing by preventing ad scripts from loading.

Popular Blog Posts