Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/damianiglesias/pihole-ubuntu-deploy/llms.txt

Use this file to discover all available pages before exploring further.

Before running the Pi-hole Ubuntu Deploy installer, make sure your environment meets the requirements below. The Bash script is designed to be largely self-contained — it installs its own dependencies automatically — but it does expect a compatible hardware platform, a supported Ubuntu Server release, an active internet connection, and root-level access. Taking five minutes to verify these prerequisites now will prevent the most common installation failures.

Hardware

Pi-hole Ubuntu Deploy is intentionally lightweight and runs well on modest hardware. Any of the following platforms are suitable:
  • Virtual Machine — tested on VirtualBox (Host-Only and Bridged adapter modes) and compatible with other hypervisors.
  • Raspberry Pi — any model with sufficient RAM is ideal for a dedicated, always-on deployment.
  • Old PC or repurposed laptop — any x86-64 machine with a wired network interface works well.
Minimum resource requirements:
ResourceMinimum
RAM512 MB
CPU1 core
Disk~2 GB free (for OS, Pi-hole, and optional components)

Operating System

The installer targets Ubuntu Server only. The following LTS releases are supported and tested:
  • Ubuntu Server 20.04 LTS (Focal Fossa)
  • Ubuntu Server 22.04 LTS (Jammy Jellyfish)
  • Ubuntu Server 24.04 LTS (Noble Numbat)
Always use an LTS (Long-Term Support) release for a production Pi-hole server. LTS releases receive security updates for five years, ensuring your DNS resolver stays patched without requiring frequent OS upgrades.

Network

An active internet connection is required during installation. The script needs to reach the Ubuntu package mirrors (apt), the official Pi-hole installer endpoint (install.pi-hole.net), the Internic root hints file, and optionally GitHub and Codeberg for PADD and the DNS Manager. The project has been tested in two specific VirtualBox network configurations:
Host-Only Adapter creates a private network between your host machine and the VM, completely isolated from your main LAN.Best for: Development and testing the installer via SSH from your host machine.Limitations:
  • The VM cannot reach the internet directly through this adapter alone — you will need a second adapter (e.g. NAT) for internet access during installation.
  • Pi-hole will not be reachable by other devices on your LAN; it can only serve DNS to the host machine.
  • Not recommended as a production configuration for network-wide ad blocking.
Typical IP range: 192.168.56.0/24 (VirtualBox default).

Access

The script must be executed with root privileges. Always run it using sudo:
sudo ./deploy.sh
Running without sudo will trigger an immediate error and exit:
ERROR: Please run as root (sudo ./deploy.sh)
Standard sudo access on your Ubuntu user account is sufficient — you do not need to log in directly as the root user.

Dependencies

You do not need to pre-install any dependencies. The script runs apt-get install automatically during Step 2 and installs everything it needs:
PackagePurpose
curlDownloads the Pi-hole installer and other remote resources
net-toolsNetwork interface utilities (ifconfig, etc.)
ufwUncomplicated Firewall — configured automatically by the script
sqlite3Injects blocklists directly into Pi-hole’s gravity database
wgetDownloads PADD, root hints, and the Log2Ram signing key
python3Required by the optional Python DNS Manager
python3-venvCreates an isolated virtual environment for the DNS Manager
python3-pipInstalls Python dependencies (requests) for the DNS Manager
gitClones the DNS Manager source from Codeberg
The installer stops and permanently disables systemd-resolved to free port 53 for Pi-hole’s DNS listener. As part of this process, /etc/resolv.conf is overwritten with temporary nameservers (8.8.8.8 and 1.1.1.1) for the duration of the installation. DNS resolution on the server will rely on Google’s and Cloudflare’s public resolvers until Pi-hole takes over. Plan accordingly if this server is running other services that depend on DNS.

Build docs developers (and LLMs) love