I have some old mini-PC in my living room that's running a hypervisor and a few VMs. One of those VMs is used for pihole. I used docker and docker compose for this.
My docker-compose.yaml
is a little more fancy than that because I deploy it via GitLab CI, but here's the kind of config you can expect:
# More Info and full example docker-compose here:
# https://github.com/pi-hole/docker-pi-hole/#running-pi-hole-docker
services:
pihole:
container_name: pihole
hostname: pihole
image: pihole/pihole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
- "80:80/tcp"
- "443:443/tcp"
environment:
PIHOLE_UID: '1000'
PIHOLE_GID: '1000'
TZ: 'YOUR_SERVER_TIMEZONE'
FTLCONF_webserver_api_password: "YOUR_PIHOLE_ADMIN_PASSWORD"
FTLCONF_dns_listeningMode: 'all'
volumes:
- etc-pihole:/etc/pihole
restart: unless-stopped
I mostly copy-pasted that from the official pihole docker compose quick-start example.
To update, you would just need to run the following in the same directory as the docker-compose.yml
file.
docker compose stop
docker compose pull
docker compose up -d
If pihole is the only thing you really want to run, a new machine and hypervisor are too much for just that. If ad-free surfing is all you want, you can just get a raspberry pi and setup pihole on that thing. You can still use docker compose, as the pihole images are available for ARMv6, ARMv7 and ARM64.