Skip to content
  • About
  • Contact
  • Docs
  • Features
  • Home

Configurations

5
  • Setup RAID Level 6
  • Setup RAID Level 5
  • How To Add Swap on RHEL or Centos based system
  • Website Migration to Non-Panel OpenLiteSpeed Server
  • Linux Server Performance Tuning

CyberPanel

9
  • Mounting /tmp on a Separate File
  • Updating CyberPanel Main VirtualHost Configuration
  • Updating CyberPanel vHosts Configuration
  • How to Change CLI PHP on CyberPanel
  • How to Update PHP Version to 8.1 in CyberPanel (From 7.3, 7.4, or 8.0)
  • CyberPanel Server Cleanup: Logs, Dumps, Backups
  • CyberPanel Full LSPHP Installation PHP 7.4 – 8.3
  • CyberPanel / OpenLiteSpeed: Clean LSPHP Session Files
  • SSL Certificate Management in CyberPanel via SSH

Hestia Control Panel

6
  • Fixing Email Bounce Back Issue in Hestia (Exim4 Blacklist Rejection)
  • Managing Fail2Ban in HestiaCP Server
  • Installing and Configuring PHP Versions in HestiaCP
  • phpMyAdmin Not Found in HestiaCP
  • Setting Up a Reverse Proxy for any Port in HestiaCP
  • How to Install Let’s Encrypt SSL in Hestia CP (Hostname, Admin Panel, and Email Server)

WHM/cPanel

6
  • Setting Up a Reverse Proxy on cPanel/WHM for Port 8081
  • How to increase the size of the cPanel-generated /tmp filesystem
  • Installing Old PHP Versions on a cPanel/WHM Server
  • Fixing “550: Your Country is Not Allowed to Connect to This Server” Error in Exim (cPanel)
  • Enable WP-CLI in CageFS on CloudLinux Servers (WHM/cPanel)
  • Securing /tmp and /var/tmp with a Dedicated Loopback Filesystem

Nagios

5
  • Service Checks
  • Uptime Checks
  • Disk Space Checks
  • Load Checks
  • Email Related Checks

WordPress

3
  • WordPress Core Reinstallation Guide
  • Managing WordPress Users via WP-CLI
  • Website Duplication, Migration, or Domain Change

Operating System

1
  • Server Reboot (RHEL or Centos based system)

AWS

1
  • How to Resize EBS Volumes on AWS

Databases

2
  • MySQL
    • Optimizing MySQL Performance
    • Recovering MySQL in Plesk When InnoDB Crashes

CloudLinux

4
  • Moving cagefs-skeleton directory
  • Enable WP-CLI in CageFS on CloudLinux Servers (WHM/cPanel)
  • Enable bc in CageFS on CloudLinux Servers(WHM/cPanel)
  • How to Upgrade MySQL 5.x to MySQL 8.0 on CloudLinux (WHM server) with MySQL Governor

Cloudflare

1
  • Configuring Security Headers in Cloudflare

ISPmanager

1
  • Install Free SSL (Let’s Encrypt) for domain.tld on ISPmanager with NGINX

Plesk

1
  • Plesk Admin Login Blocked – IP Restriction Recovery Guide

VPN

4
  • Install OpenVPN Open Source in Linux CentOS Ubuntu Debian Servers
  • Protected: OpenVPN Installation & Fix Wiki (CloudLinux / CentOS 7 & 8)
  • Outline VPN Installation & Management Guide
  • Installing AdGuard Home on Debian/Ubuntu (Docker)
View Categories
  • Home
  • Docs
  • VPN
  • Installing AdGuard Home on Debian/Ubuntu (Docker)

Installing AdGuard Home on Debian/Ubuntu (Docker)

🧠 What is AdGuard Home?

AdGuard Home is a network-wide πŸ’» DNS-based ad blocker πŸš«πŸ“° and tracker blocker πŸ•΅οΈβ€β™‚οΈ. It acts as your local DNS server, filtering ads, trackers, and malicious domains πŸ” for all devices on your network πŸ›œ.


🐳 Installing AdGuard Home on Debian/Ubuntu (Docker)


βš™οΈ Step 1: Install Docker

sudo apt update && sudo apt upgrade -y
sudo apt install -y docker.io
sudo systemctl enable --now docker

πŸ“Œ This installs Docker and ensures it starts automatically.


πŸ“ Step 2: Create AdGuard Data Directories

sudo mkdir -p /opt/adguardhome/work /opt/adguardhome/conf /opt/adguardhome/certs

πŸ—‚ These directories store AdGuard’s config, data, and SSL certs.


🧩 Step 3: Start AdGuard Home Container

sudo docker run -d \
  --name adguardhome \
  --restart unless-stopped \
  -v /opt/adguardhome/work:/opt/adguardhome/work \
  -v /opt/adguardhome/conf:/opt/adguardhome/conf \
  -v /opt/adguardhome/certs:/opt/adguardhome/certs \
  -p 53:53/tcp -p 53:53/udp \
  -p 67:67/udp -p 68:68/udp \
  -p 80:80/tcp -p 443:443/tcp \
  -p 3000:3000/tcp \
  adguard/adguardhome:latest

πŸ”Œ Port 3000 is for the initial setup UI.


🌐 Step 4: Initial Web Setup

🌍 Visit: http://<your-server-ip>:3000
πŸ“‹ Follow the on-screen wizard to configure your instance.


πŸ”’ Step 5: Enable HTTPS with Custom SSL (Optional)

  1. Place your SSL cert and key in:
/opt/adguardhome/certs/
  1. Filenames must be:
tls.crt  – Your certificate πŸ“œ
tls.key  – Your private key πŸ”‘
  1. Edit AdGuardHome.yaml (in /opt/adguardhome/conf/) to include:
tls:
  enabled: true
  server_name: "<your-domain>"
  certificate_chain: "/opt/adguardhome/certs/tls.crt"
  private_key: "/opt/adguardhome/certs/tls.key"
  1. Restart AdGuard:
docker restart adguardhome

βœ… Now your AdGuard UI should be accessible at https://your-domain


πŸ›  Repair / Reinstall AdGuard with Docker

No need to reinstall your OS ⚠️ β€” here’s a clean recovery process.


πŸ’Ύ Step 1: Backup (If Config is Valuable)

docker stop adguardhome
docker rename adguardhome adguardhome_backup_$(date +%F-%T)

πŸ” Save the contents of /opt/adguardhome/conf/ if needed.


🧹 Step 2: Remove Broken Installation

docker rm -f adguardhome
docker rmi adguard/adguardhome:latest
sudo rm -rf /opt/adguardhome

🧽 Clean slate.


πŸ”„ Step 3: Fresh Reinstall

sudo mkdir -p /opt/adguardhome/work /opt/adguardhome/conf /opt/adguardhome/certs

sudo docker run -d \
  --name adguardhome \
  --restart unless-stopped \
  -v /opt/adguardhome/work:/opt/adguardhome/work \
  -v /opt/adguardhome/conf:/opt/adguardhome/conf \
  -v /opt/adguardhome/certs:/opt/adguardhome/certs \
  -p 53:53/tcp -p 53:53/udp \
  -p 67:67/udp -p 68:68/udp \
  -p 80:80/tcp -p 443:443/tcp \
  -p 3000:3000/tcp \
  adguard/adguardhome:latest

πŸ” Step 4: Restore Configuration (Optional)

cp -r /root/old_data/allbackup/opt/adguardhome/* /opt/adguardhome/
docker restart adguardhome

πŸ“‚ Bring back your settings if you had a backup.


🧠 Step 5: Improve DNS Speed (Optional)

In AdGuardHome.yaml:

bootstrap_dns:
  - 1.1.1.1
  - 8.8.8.8

upstream_dns:
  - https://dns.cloudflare.com/dns-query
  - https://dns.google/dns-query

Then restart:

docker restart adguardhome

πŸš€ Now AdGuard uses encrypted DNS-over-HTTPS.


πŸ§ͺ Step 6: Test DNS

dig @127.0.0.1 google.com

πŸ” Ensure DNS queries resolve correctly.


πŸ“± Device DNS Configuration

🍎 iOS / macOS

Option 1: Automatic

  1. Visit: https://your-domain/admin
  2. Go to: Setup Guide β†’ iOS/macOS
  3. Download and install the MobileConfig profile.

πŸ›‘ DNS now flows through AdGuard automatically.


Option 2: Manual DNS

Settings β†’ Wi-Fi β†’ Your Network β†’ Configure DNS β†’ Manual
βž• Add: 192.168.1.X (your AdGuard IP)
βž– Remove other DNS servers


βœ… Final Checks

  • βœ… Web GUI loads at https://your-domain
  • βœ… dig works via AdGuard
  • βœ… DNS filtering active
  • βœ… SSL active (if configured)
  • βœ… Firewall unchanged (consider UFW rules)
  • βœ… docker ps shows healthy AdGuard

πŸ“¦ Bonus: Auto Backup Script (Optional)

#!/bin/bash
mkdir -p /root/adguard_backups
tar -czf /root/adguard_backups/adguard_conf_$(date +%F).tar.gz /opt/adguardhome/conf

Schedule it:

crontab -e

Add:

0 3 * * * /root/backup_adguard.sh

πŸ’‘ Daily 3 AM config backups = peace of mind.

 

Table of Contents
  • 🧠 What is AdGuard Home?
  • 🐳 Installing AdGuard Home on Debian/Ubuntu (Docker)
    • βš™οΈ Step 1: Install Docker
    • πŸ“ Step 2: Create AdGuard Data Directories
    • 🧩 Step 3: Start AdGuard Home Container
    • 🌐 Step 4: Initial Web Setup
    • πŸ”’ Step 5: Enable HTTPS with Custom SSL (Optional)
  • πŸ›  Repair / Reinstall AdGuard with Docker
    • πŸ’Ύ Step 1: Backup (If Config is Valuable)
    • 🧹 Step 2: Remove Broken Installation
    • πŸ”„ Step 3: Fresh Reinstall
    • πŸ” Step 4: Restore Configuration (Optional)
    • 🧠 Step 5: Improve DNS Speed (Optional)
    • πŸ§ͺ Step 6: Test DNS
  • πŸ“± Device DNS Configuration
    • 🍎 iOS / macOS
      • Option 1: Automatic
      • Option 2: Manual DNS
  • βœ… Final Checks
  • πŸ“¦ Bonus: Auto Backup Script (Optional)

Share This Article :

  • Facebook
  • X
  • LinkedIn
  • Pinterest

Was it helpful ?

  • Happy
  • Normal
  • Sad
  • About
  • Contact
  • Docs
  • Features
  • Home

© 2026 Panel Web Hosting

  • About
  • Contact
  • Docs
  • Features
  • Home