Here’s how to run Pi-hole automatically on boot with a Quadlet file. No manual enabling required. This assumes Fedora CoreOS as of February 2025 with a recent Podman.
No CoreOS yet? Start with the Beginner’s Guide to Fedora CoreOS or the 2026 version: Beginner’s Guide to Fedora CoreOS (with Bitwarden SSH Keys). Using AdGuard instead? See Running AdGuard Home as a Podman Quadlet.
Why Quadlets instead of podman run in a crontab?
A Quadlet is a small .container unit in /etc/containers/systemd/ that Podman turns into a systemd service at boot. You get systemctl start/stop/status pihole.service, restart policies, and volumes and ports in one file you can copy to the next machine. No SSHing in after a reboot to start DNS, and no Docker Compose. podman generate systemd is the older way. CoreOS docs expect Quadlets now.
Prerequisites
- Fedora CoreOS, SSH as
core(or root via sudo). Podman is included. - Ports 53, 80, 443, and optionally 67 free. systemd-resolved’s stub listener on 127.0.0.53:53 won’t collide with published 0.0.0.0:53, but a host process bound to
:53will. If you followed the beginner CoreOS + Pi-holepodman runguide, stop and remove that container first. - A static IP. I use
192.168.1.8in examples. Use yours. - Your real timezone, or logs will be in UTC.
Check for port conflicts first:
sudo ss -tulpn | grep -E ':53|:80|:443|:67'sudo podman ps -aIf an old pihole container exists:
sudo podman stop piholesudo podman rm piholeKeep the named volumes (pihole_pihole, pihole_dnsmasq) if they have blocklists you want. The Quadlet reuses those names.
Step 1: Create the Quadlet file
Quadlet files live in /etc/containers/systemd/. Create pihole.container:
sudo nano /etc/containers/systemd/pihole.containerPaste this (modify the password and network info with yours):
[Unit]Description=Pi-hole ContainerAfter=network-online.targetWants=network-online.target
[Container]ContainerName=piholeImage=docker.io/pihole/piholeAddCapability=NET_ADMINDNS=127.0.0.1DNS=1.1.1.1Environment=TZ=America/DenverEnvironment=SERVERIP=192.168.1.8Environment=FTLCONF_webserver_api_password=pwd_please_change_thisEnvironment=FTLCONF_dns_listeningMode=allEnvironment=DNS1=1.1.1.1Environment=DNS2=1.0.0.1Environment=DNSSEC=trueEnvironment=CONDITIONAL_FORWARDING=trueEnvironment=CONDITIONAL_FORWARDING_IP=192.168.1.1Environment=CONDITIONAL_FORWARDING_DOMAIN=lanVolume=pihole_pihole:/etc/pihole:ZVolume=pihole_dnsmasq:/etc/dnsmasq.d:ZPublishPort=80:80/tcpPublishPort=443:443/tcpPublishPort=67:67/udpPublishPort=53:53/tcpPublishPort=53:53/udp
[Service]Restart=alwaysTimeoutStartSec=900
[Install]WantedBy=multi-user.targetSave and exit (Ctrl+O, Enter, Ctrl+X in nano).
Why these keys exist
After=/Wants=network-online.target: don’t bind DNS before the NIC has an address (matters more on Wi-Fi).AddCapability=NET_ADMIN: needed for DHCP (port 67). You can drop it later if you never use Pi-hole DHCP.DNS=127.0.0.1plus an upstream: the container needs a resolver before FTL owns port 53, or it can hang on pulls and list updates.FTLCONF_*: Pi-hole v6 config. Older tutorials usedWEBPASSWORD. If your password is ignored, you mixed v5 and v6 names.Volume=name:/path:Z::Zrelabels for SELinux so CoreOS doesn’t deny writes.TimeoutStartSec=900: the first pull ofdocker.io/pihole/piholeon a slow link exceeds systemd’s default timeout.Restart=always: FTL restarts if it crashes.
Replace pwd_please_change_this, SERVERIP, TZ, and the conditional forwarding IP (your LAN router). Don’t leave the sample password on a network other people can reach.
Optionally pre-create the volumes (Podman will otherwise):
sudo podman volume create pihole_piholesudo podman volume create pihole_dnsmasqStep 2: Reload systemd
Tell systemd to run Podman’s quadlet generator:
sudo systemctl daemon-reloadThis generates a transient pihole.service in /run/systemd/generator/.
No output is good. A typo (missing section, bad PublishPort) won’t stop daemon-reload, but start will fail. Check:
systemctl cat pihole.servicels /run/systemd/generator/pihole.serviceNo generated unit? The file must be *.container under /etc/containers/systemd/ (or ~/.config/containers/systemd/ for rootless, which I do not recommend for port 53).
Step 3: Start the container
Kick it off manually the first time:
sudo systemctl start pihole.serviceWatch the first pull:
sudo journalctl -u pihole.service -fCtrl+C leaves the service running. Check it:
sudo podman ps -asudo systemctl status pihole.serviceYou should see your pihole container up and humming, and the unit active (running). Open the admin UI from a browser on the LAN:
http://192.168.1.8/admin(or the hostname) and log in. If it never loads, see troubleshooting.
Step 4: Test autostart on reboot
The WantedBy=multi-user.target line ensures Pi-hole starts on boot. Test it:
sudo rebootAfter reboot, SSH back in and verify:
sudo podman ps -asudo systemctl status pihole.serviceIf pihole is running, you’re set. No systemctl enable needed, since Quadlets handle autostart.
Test DNS from one client:
dig @192.168.1.8 google.comdig @192.168.1.8 doubleclick.netThe first should return A records. The second should return a blocked address (0.0.0.0 or NULL). Once that works, have your router’s DHCP hand out this DNS.
Notes
- Why no enable? Generated services in
/run/are transient and can’t be enabled. The[Install]section ties it to boot instead. - Tweaks: Older Quadlet guides mention
HostnameorRestartPolicy, but these are unsupported now. Stick to the basics above. - Hostname: Defaults to
piholefromContainerName. Forpi-hole, you’d need a workaround or a classic systemd service. - Image tag: in production, pin
docker.io/pihole/pihole:2025.x.xinstead of:latest. I leave the tag out of the sample to keep it simple. - Firewall: if you layered firewalld (see the beginner guide), open 53/tcp+udp, 80, 443, and 67 if you use Pi-hole DHCP. If you used nftables like the AdGuard post, restrict sources to your LAN subnet.
- Nightly reboots: that’s a host timer, not a Quadlet: How to Schedule Nightly Reboots on Fedora CoreOS. DNS is down during the reboot, so pick 03:00, not 19:00.
Troubleshooting
start fails with port already allocated
Something else owns 53 or 80. Run sudo ss -tulpn. Usually it’s a leftover podman run Pi-hole, AdGuard, or the systemd-resolved stub. Don’t run Pi-hole and AdGuard on the same IP and ports.
Container is exited immediately
Check sudo podman logs pihole and journalctl -u pihole.service before wiping volumes. Wrong-version password variables or a v5 volume needing migration show up there.
Clients have no DNS after a CoreOS update
A Podman or netavark update can change CNI behavior. Check systemctl status pihole.service, then daemon-reload and start. Don’t reinstall CoreOS.
SELinux denials on volumes
You left off :Z, or bind-mounted a host path without it. Named volumes with :Z are easiest on FCOS.
I want this in Ignition instead of nano after boot
Put the same contents in your Butane storage.files for /etc/containers/systemd/pihole.container, like the AdGuard example in the 2026 CoreOS guide. Then DNS works on first boot.
Wrap-up
That’s it! Your Pi-hole is now managed by Podman Quadlets on Fedora CoreOS. Enjoy ad-free browsing.
Best regards,
The Linux IT Guy