Homelab Plan

Network and DNS

How to install Pi-hole on your home server

Pi-hole blocks adverts and trackers for every device by filtering DNS. The admin page is on port 80. It has steps for Debian, TrueNAS and Proxmox.

What the steps install, and how it connects

Connects to it

  • Every device on your networkonce your router points devices at it53/udp53/tcp
  • Browser80/tcp

Your server, in Docker

container pihole

image pihole/pihole:latest

  • 53/tcpDNS
  • 53/udpDNS
  • 80/tcpadmin page
  • 443/tcpnot opened by these steps

Its data on the server

  • ./etc-piholeto /etc/piholesettings

On TrueNAS the app’s web page is on 20720/tcp. Drawn from step 7 of the Debian + Docker steps. Ports are the ones in those steps and in the table below.

The diagram in words

The Debian + Docker steps install the container pihole, with ports 53/tcp, 53/udp and 80/tcp; 443/tcp is not opened by these steps. Connects to it: Every device on your network (once your router points devices at it) on 53/udp and 53/tcp; Browser on 80/tcp. Its data: ./etc-pihole (settings).

What it needs

Ports53/tcp, 53/udp, 80/tcp (web page), 443/tcpTrueNAS app web page: 20720/tcp
Memory512 MBdocs.pi-hole.net/main/prerequisites/ read 25 Nov 2026
CPUNo figure. The project says Pi-hole needs little processing power.docs.pi-hole.net/main/prerequisites/ read 25 Nov 2026
Disk2 GB free minimum, 4 GB recommendeddocs.pi-hole.net/main/prerequisites/ read 25 Nov 2026
LicenceEUPL-1.2
Project pagepi-hole/pi-hole

Ports are the project's defaults. Memory and disk figures are the project's own, with the page and the date read. Estimates only.

The one thing to know before you start

Port 53 must be free on the host before you start, or Pi-hole cannot answer DNS. Keep the listening mode on ALL, because the default Docker bridge network needs it, and do not use --privileged.

Install steps

These steps follow the project's own pages and have not been tried on real hardware yet.

They start from a server that runs Docker: set up an old laptop or PC first. Docker or bare metal for Pi-hole: what each method needs.

Debian + Docker

  • WARNINGFree port 53 on the host before you start.
  • WARNINGKeep FTLCONF_dns_listeningMode set to 'ALL'. Docker's default bridge network needs it.
  • WARNINGDo not use --privileged. Add only the capabilities that you need.
  1. Install Docker Engine with the Compose plugin. Use the Docker page for Debian.

  2. Type this command to create the docker group. If the group exists, go to the next step.

    sudo groupadd docker
  3. Type this command to add your user to the docker group.

    sudo usermod -aG docker $USER
  4. Log out and log in again so that the group change takes effect.

  5. Type this command to test Docker.

    docker run hello-world
  6. If port 53 is in use, stop.

  7. Save the compose file below as docker-compose.yml.

    services:
      pihole:
        container_name: pihole
        image: pihole/pihole:latest
        ports:
          - "53:53/tcp"
          - "53:53/udp"
          - "80:80/tcp"
        environment:
          TZ: 'Europe/London'
          FTLCONF_webserver_api_password: 'change-me'
          FTLCONF_dns_listeningMode: 'ALL'
        volumes:
          - './etc-pihole:/etc/pihole'
        cap_add:
          - NET_ADMIN
        restart: unless-stopped
  8. Set TZ to your time zone.

  9. Replace the value of FTLCONF_webserver_api_password with your own password.

  10. Type this command in the folder of the file.

    docker compose up -d
  11. Open http://<server address>:80 in a browser.

  12. Type the password from FTLCONF_webserver_api_password.

TrueNAS app

checking Some details are still being checked.

  • WARNINGThis app is in the stable train. iXsystems supports it.
  • WARNINGUpdate TrueNAS to version 24.10.2.2 or newer before you start.
  1. Open Apps > Discover Apps.

    Apps > Discover Apps > search 'pihole' > Install (train: stable)
  2. Search for 'pihole'.

  3. Click Install.

  4. Open http://<server address>:20720 in a browser.

Proxmox VE (VM + Docker)

checking Some details are still being checked.

  • WARNINGUse a VM, not an LXC container. Proxmox says: "nesting containers inside a Proxmox QEMU VM remains a recommended practice".
  • WARNINGFree port 53 on the host before you start.
  • WARNINGKeep FTLCONF_dns_listeningMode set to 'ALL'. Docker's default bridge network needs it.
  • WARNINGDo not use --privileged. Add only the capabilities that you need.
  1. Create a Debian VM in Proxmox VE.

  2. Sign in to the VM.

  3. Install Docker Engine with the Compose plugin. Use the Docker page for Debian.

  4. Type this command to create the docker group. If the group exists, go to the next step.

    sudo groupadd docker
  5. Type this command to add your user to the docker group.

    sudo usermod -aG docker $USER
  6. Log out and log in again so that the group change takes effect.

  7. Type this command to test Docker.

    docker run hello-world
  8. If port 53 is in use, stop.

  9. Save the compose file below as docker-compose.yml.

    services:
      pihole:
        container_name: pihole
        image: pihole/pihole:latest
        ports:
          - "53:53/tcp"
          - "53:53/udp"
          - "80:80/tcp"
        environment:
          TZ: 'Europe/London'
          FTLCONF_webserver_api_password: 'change-me'
          FTLCONF_dns_listeningMode: 'ALL'
        volumes:
          - './etc-pihole:/etc/pihole'
        cap_add:
          - NET_ADMIN
        restart: unless-stopped
  10. Set TZ to your time zone.

  11. Replace the value of FTLCONF_webserver_api_password with your own password.

  12. Type this command in the folder of the file.

    docker compose up -d
  13. Open http://<server address>:80 in a browser.

  14. Type the password from FTLCONF_webserver_api_password.

Licences and credits: Sources and licences.

What will it cost to run?

This page gives no power figure for Pi-hole. The planner adds up the box it runs on, where the power goes splits that figure part by part, and the guide gives idle watts and a yearly cost at your own price.

Plan an ad-blocking box in the planner, or read the home server hardware guide.

Related apps

All 18 apps