Skip to content

Self-host Pi-hole

updated Jul 2026prices checked · Aug 2026Install verified on Ubuntu 26.04 · Jul 2026 · how we test

A DNS sinkhole that blocks ads and trackers for every device on your network — no client software needed. Runs on almost nothing and gives you a tidy dashboard of what your network is really talking to.

Key facts

CategoryNetwork-wide ad blocking
LicenseEUPL-1.2
StackC (FTLDNS), PHP
Min RAM512 MB
Dockeryes
Difficulty

What you need

  • Any VPS with at least 512 MB of RAM
  • A domain you control — most self-hosted setups need HTTPS in front of them
  • Under an hour if you've used Docker before

Install with Docker Compose

Save this as compose.yml and run docker compose up -d:

# Pi-hole — network-wide DNS ad blocking
services:
  pihole:
    image: pihole/pihole:latest
    ports: ["53:53/tcp", "53:53/udp", "80:80/tcp"]
    environment:
      TZ: Etc/UTC
      FTLCONF_webserver_api_password: changeme
    volumes:
      - ./etc-pihole:/etc/pihole
    restart: unless-stopped
# On Ubuntu, free port 53 first: set DNSStubListener=no in
# /etc/systemd/resolved.conf, then sudo systemctl restart systemd-resolved
# docker compose up -d  →  http://SERVER_IP/admin

Head-to-head

More self-hosted tools

We use analytics cookies (Google Analytics, PostHog) to see which guides are useful. No ad networks, no cross-site tracking. See our privacy policy.