Pi-hole

Jose Massón Publisher

Platform:

Ubuntu
26.04
Channel Revision Published Runs on
latest/stable 3 20 Oct 2026
Ubuntu 26.04
latest/candidate 3 20 Oct 2026
Ubuntu 26.04
latest/beta 3 20 Oct 2026
Ubuntu 26.04
latest/edge 3 20 Oct 2026
Ubuntu 26.04
juju deploy pi-hole

Network-wide DNS sinkhole and ad blocker for Ubuntu machines.

Pi-hole is a DNS sinkhole. It answers DNS for a whole network and refuses to resolve the domains that serve advertisements and trackers, so every device behind it is filtered without installing anything on the device itself.

This charm deploys and operates Pi-hole v6 on Ubuntu machines — LXD, MAAS, or a public cloud — using the pihole-by-rajannpatel snap. It provides one optional relation, cos-agent: relate it to opentelemetry-collector and the subordinate takes the snap's logs (through its read-only logs content slot) and host metrics, forwarding them to your observability backends.

What the charm does for you:

  • Installs the snap at a revision the charm's release defines, held against auto-refresh — the snap never updates itself — and starts the FTL daemon, which the snap does not start by itself. The admin UI serves on 80 and 443, the latter with a self-signed certificate.
  • Takes port 53 away from systemd-resolved on deployment, and gives it back on removal, so the machine is never left without a resolver.
  • Closes the NTP server the snap opens on 123/udp by default.
  • Generates the admin UI password itself, stores it in a Juju secret, and applies it before the daemon ever serves; actions retrieve and rotate it. There is no configuration option for the password.
  • Reports health from the Pi-hole API, not from the service manager, so active means "answering queries" — and runs the snap's own snap-check diagnostic when collecting status on an installed unit, so a port conflict or a broken config shows up as blocked naming the remedy.
  • Connects the snap's diagnostic plugs (system-observe, hardware-observe, mount-observe, time-control, process-control), keeping FTL's log free of capability warnings.
  • Gives the operator escape hatches as actions: snap-check (run the diagnostic on demand), update-gravity (refresh blocklists now, optionally a full rebuild), and free-port-53 (recover the port).
  • Optionally sets the blocklist refresh schedule (gravity-schedule, a systemd OnCalendar string) through a host drop-in, because the snap cannot manage its own timer.
  • Optionally serves DHCP from the FTL server (dhcp-enabled and the pool options), gated so an unservable pool or an occupied 67/udp shows up as blocked naming the remedy.

A single unit is the supported shape. Two Pi-holes are two independent resolvers with independently drifting blocklists, not a cluster.

Note that the underlying snap is unofficial: the Pi-hole project does not support snap-based installations. See this charm's documentation before deploying it anywhere you care about.