Skip to content

Running Pi-hole as a Podman Quadlet on Fedora CoreOS

Run Pi-hole as a Podman Quadlet on Fedora CoreOS so systemd starts DNS on every boot. No podman run and no manual enable.

On this page
  1. Why Quadlets instead of podman run in a crontab?
  2. Prerequisites
  3. Step 1: Create the Quadlet file
  4. Why these keys exist
  5. Step 2: Reload systemd
  6. Step 3: Start the container
  7. Step 4: Test autostart on reboot
  8. Notes
  9. Troubleshooting
  10. start fails with port already allocated
  11. Container is exited immediately
  12. Clients have no DNS after a CoreOS update
  13. SELinux denials on volumes
  14. I want this in Ignition instead of nano after boot
  15. Wrap-up

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 :53 will. If you followed the beginner CoreOS + Pi-hole podman run guide, stop and remove that container first.
  • A static IP. I use 192.168.1.8 in examples. Use yours.
  • Your real timezone, or logs will be in UTC.

Check for port conflicts first:

Terminal window
sudo ss -tulpn | grep -E ':53|:80|:443|:67'
sudo podman ps -a

If an old pihole container exists:

Terminal window
sudo podman stop pihole
sudo podman rm pihole

Keep 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:

Terminal window
sudo nano /etc/containers/systemd/pihole.container

Paste this (modify the password and network info with yours):

[Unit]
Description=Pi-hole Container
After=network-online.target
Wants=network-online.target
[Container]
ContainerName=pihole
Image=docker.io/pihole/pihole
AddCapability=NET_ADMIN
DNS=127.0.0.1
DNS=1.1.1.1
Environment=TZ=America/Denver
Environment=SERVERIP=192.168.1.8
Environment=FTLCONF_webserver_api_password=pwd_please_change_this
Environment=FTLCONF_dns_listeningMode=all
Environment=DNS1=1.1.1.1
Environment=DNS2=1.0.0.1
Environment=DNSSEC=true
Environment=CONDITIONAL_FORWARDING=true
Environment=CONDITIONAL_FORWARDING_IP=192.168.1.1
Environment=CONDITIONAL_FORWARDING_DOMAIN=lan
Volume=pihole_pihole:/etc/pihole:Z
Volume=pihole_dnsmasq:/etc/dnsmasq.d:Z
PublishPort=80:80/tcp
PublishPort=443:443/tcp
PublishPort=67:67/udp
PublishPort=53:53/tcp
PublishPort=53:53/udp
[Service]
Restart=always
TimeoutStartSec=900
[Install]
WantedBy=multi-user.target

Save 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.1 plus 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 used WEBPASSWORD. If your password is ignored, you mixed v5 and v6 names.
  • Volume=name:/path:Z: :Z relabels for SELinux so CoreOS doesn’t deny writes.
  • TimeoutStartSec=900: the first pull of docker.io/pihole/pihole on 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):

Terminal window
sudo podman volume create pihole_pihole
sudo podman volume create pihole_dnsmasq

Step 2: Reload systemd

Tell systemd to run Podman’s quadlet generator:

Terminal window
sudo systemctl daemon-reload

This 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:

Terminal window
systemctl cat pihole.service
ls /run/systemd/generator/pihole.service

No 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:

Terminal window
sudo systemctl start pihole.service

Watch the first pull:

Terminal window
sudo journalctl -u pihole.service -f

Ctrl+C leaves the service running. Check it:

Terminal window
sudo podman ps -a
sudo systemctl status pihole.service

You 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:

Terminal window
sudo reboot

After reboot, SSH back in and verify:

Terminal window
sudo podman ps -a
sudo systemctl status pihole.service

If pihole is running, you’re set. No systemctl enable needed, since Quadlets handle autostart.

Test DNS from one client:

Terminal window
dig @192.168.1.8 google.com
dig @192.168.1.8 doubleclick.net

The 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 Hostname or RestartPolicy, but these are unsupported now. Stick to the basics above.
  • Hostname: Defaults to pihole from ContainerName. For pi-hole, you’d need a workaround or a classic systemd service.
  • Image tag: in production, pin docker.io/pihole/pihole:2025.x.x instead 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