Self-host Pi-hole with Levelrail
Network-wide ad blocking that works as a DNS sinkhole for your whole network.
- Authorpi-hole
- LicenceEUPL-1.2
- Memory256 MiB
- Archarm64
- Services1
How to self-host Pi-hole
-
Pull the images
One image is pulled on your server.
Show images
pihole/pihole:2024.07.0
-
Create the app
One service starts in a single Compose app, with 1 named volume mount for your data, on port 80.
-
Fill in the secrets
1 secret is generated and stored encrypted, you do not have to fill in anything.
-
Open it
Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.
Pi-hole requirements
- Memory
- About 256 MiB
- Architectures
- amd64 image published, arm64 image published
- Ports
- 80
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- EUPL-1.2, copyleft license
- Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.
- Host ports. It publishes port 80 on the host, so open them in the VPS firewall only if you want that.
Install Levelrail first
On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then Pi-hole. New to Levelrail? Install it on a fresh VPS first.
docker pull ghcr.io/glincker/levelrail:latest Then levelrail-cli login --device. See Getting started and the Pi-hole docs page.
Deploy Pi-hole your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy Pi-hole from the CLI
levelrail-cli templates deploy pi-hole --name my-pi-hole Deploy Pi-hole with the API
curl -X POST -H "Authorization: Bearer $TOKEN" \
https://levelrail.example.com/api/v1/service-templates/pi-hole/deploy Pi-hole configuration
Pi-hole services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| pihole | pihole/pihole:2024.07.0 | 80 | pihole_data -> /etc/pihole |
Pi-hole environment variables
| Variable | Service | Value |
|---|---|---|
| FTLCONF_webserver_api_password | pihole | Generated at deploy |
Ports and volumes
- Ports
- 80
- Volumes
- 1 named mount: pihole_data -> /etc/pihole
Pi-hole FAQ
How much memory does Pi-hole need?
The catalog lists about 256 MiB of memory for Pi-hole.
Does Pi-hole run on arm64?
For Pi-hole, an arm64 image is published; amd64 is image published.
What licence is Pi-hole under?
Pi-hole is licensed under EUPL-1.2, which is copyleft, so changes you distribute must be shared under the same terms.
Does Pi-hole need configuration before it starts?
No. The template fills in its own defaults and generates secrets at deploy time.
Which ports does Pi-hole use?
Pi-hole listens on port 80 inside the stack.
Where does Pi-hole keep its data?
In a named volume: pihole_data mounted at /etc/pihole.
Can I deploy Pi-hole on Dokploy or Dokku?
The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Pi-hole, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image pihole/pihole:2024.07.0 is what you deploy there.