m00grin/ph-intercept
About
A real-time visualizer and dashboard for Pi-hole, AdGuard Home, Technitium, and Blocky. Blocking is represented by an interceptor ship destroying 'blocked query' baddies, space invaders style.
Systems & InfrastructureMeasured star growth
- in 24h
- +6
- in 7 days
- +17
- in 15 days
- +56
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalph-intercept
A visualizer and dashboard for Pi-hole v6, AdGuard Home, Technitium DNS, and Blocky that runs as a single container on Docker, Podman, or any other OCI runtime. It streams live DNS queries from your server and renders them as pixel-art friendlies and enemies. Blocked queries are destroyed by the ship, allowed queries fly through. Toggle blocking, set timed disables, update block lists, and switch ships from the HUD.
Designed to be dropped in alongside an existing DNS setup with no extra dependencies. Two ad-blockers, even different kinds, can run side by side in local 2-player split-screen.
Try the live demo in your browser first, no install needed.

Backgrounds: Starfield (above), Nebula, Outrun, or your own image with BG_IMAGE. You can switch live from Background in the settings menu.

One compose for every ad-blocker. Pi-hole, AdGuard Home, Technitium DNS, and Blocky all use the compose below. ph-intercept works out which one you run. A few servers need one extra step: see Your ad-blocker.
Quick Start
1. Have your ad-blocker's address and login ready (see Your ad-blocker for what each one needs):
Pi-hole: an app password (not your web login password), from Settings → Web interface / API → Configure app password.
AdGuard Home: your username and password.
Technitium DNS: an API token (Administration → Sessions → Create Token), or your username and password.
Blocky: no login. It needs its query log shared instead: see Blocky setup.
CLI users: Create a
.envfile in the same directory as yourcompose.yaml:BLOCKER_PASSWORD=your_passwordWith a Technitium API token, put
BLOCKER_TOKEN=your_tokenthere instead. Blocky needs no.env.Portainer users: Skip the
.envfile. AddBLOCKER_PASSWORDas an environment variable directly in the Portainer stack config.
2. Create a compose.yaml (copy the example below or grab compose.yaml from the repo) and set BLOCKER_URL to the address you open in a browser to manage your ad-blocker. For AdGuard Home, also uncomment BLOCKER_USERNAME. For Technitium, uncomment BLOCKER_TOKEN and delete the BLOCKER_PASSWORD line, or uncomment BLOCKER_USERNAME. For Blocky, delete the BLOCKER_PASSWORD line and uncomment its log volume:
services:
ph-intercept:
image: ghcr.io/m00grin/ph-intercept:latest
hostname: ph-intercept
container_name: ph-intercept
restart: unless-stopped
deploy:
resources:
limits:
memory: 128m
cpus: "1"
pids: 20
environment:
# The address you open to manage your ad-blocker: Pi-hole v6, AdGuard Home, Technitium, or Blocky
BLOCKER_URL: "http://CHANGE.ME"
# Pi-hole: an app password. AdGuard Home or Technitium: your login password. Blocky: remove this line.
BLOCKER_PASSWORD: ${BLOCKER_PASSWORD}
# AdGuard Home and Technitium: your login username
# BLOCKER_USERNAME: "admin"
# Technitium: an API token instead of a username and password
# BLOCKER_TOKEN: ${BLOCKER_TOKEN}
# Where ESC goes, like your dashboard. Blank turns ESC off.
RETURN_URL: ""
# Default background (viewers can switch in the menu): starfield, nebula, outrun, or dark
BG_MODE: starfield
# Starfield sky: summer_triangle, orion, scorpius, or southern_cross
SKY_PRESET: summer_triangle
# Custom background: an image URL, or /bg/your-file.jpg from the bg folder
BG_IMAGE: ""
# "false" if your ad-blocker uses HTTPS with a self-signed certificate
BLOCKER_VERIFY_SSL: "true"
# Every other setting, and 2-player mode: see Configuration in the README
volumes:
- ./bg:/app/static/bg
- data:/app/data
# Blocky only: the folder Blocky writes its CSV query log to
# - /path/to/blocky/logs:/blocky-logs:ro
cap_drop:
- ALL
security_opt:
- "no-new-privileges:true"
read_only: true
# The image's own healthcheck, repeated because Podman ignores it
healthcheck:
test: ["CMD", "wget", "--spider", "-q", "-T", "2", "http://127.0.0.1:4653/api/2p/status"]
interval: 30s
timeout: 3s
start_period: 20s
retries: 3
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
ports:
# Change the left side if 4653 is taken
- "4653:4653"
volumes:
data:
3. Start the container:
docker compose up -d
On Podman, podman compose up -d runs the same file; see Podman for starting it at boot.
Open http://your-host:4653.
Image Tags
| Tag | What it is |
|---|---|
:latest |
Latest stable release. |
:X.Y.Z |
Pinned release (e.g. 1.7.1). |
:X.Y |
Newest patch of a release line (e.g. 1.7). |
:develop |
GHCR only. Built automatically on every push to the develop branch. May be unstable. Good for trying out what I'm working on. |
Other Ways to Get It
Registries
GitHub is where the work happens and where every image is built. Each release is published, unchanged, to every registry below, so the digest is identical everywhere. Pull from whichever you prefer.
| Registry | Image | Notes |
|---|---|---|
| GitHub (GHCR) | ghcr.io/m00grin/ph-intercept |
Home. Also carries :develop. |
| Docker Hub | docker.io/m00grin/ph-intercept |
Release tags. |
| Codeberg | codeberg.org/m00grin/ph-intercept |
:latest and every release since the mirror started. |
| GitLab | registry.gitlab.com/m00grin/ph-intercept |
Release tags. |
| Quay | quay.io/m00grin/ph-intercept |
Release tags. |
Use the tags from Image Tags.
Other platforms
The Quick Start is for Docker. Each of these has its own page, tested on the version named:
| Platform | Guide |
|---|---|
Podman 5.4 (rootless, podman compose or Quadlet) |
Podman |
| Kubernetes 1.37 (kind, k3s, any cluster) | Kubernetes |
| TrueNAS 25.10 | TrueNAS |
| Proxmox VE 9.3 | Proxmox VE |
| Incus 7.7 | Incus |
| NixOS 26.11 | NixOS |
Build from source
Prefer to build it yourself? Clone a release tag, check that I signed it, and build. The image builds natively for whatever architecture your machine is. It needs BuildKit, Docker's default builder since 23.0 (on some distributions that's the docker-buildx package).
git clone https://github.com/m00grin/ph-intercept.git && cd ph-intercept
tag=$(git tag -l 'v*' --sort=-v:refname | head -n1) && git checkout -q "$tag"
echo '* ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMdnYVfo4t2Ag1LkmaQ5nKiN66g23hyHHfWRlsaV93tZ' > .git/allowed_signers
git -c gpg.ssh.allowedSignersFile=.git/allowed_signers tag -v "$tag"
docker build -t ph-intercept .
tag -v should report a good signature with key SHA256:34Xm5zcAM5p/n6QZD3nJ7p/bbzp21Mh3/e8sHkGk+co. The second line checks out the newest release. To build a specific one, use tag=v1.7.1 && git checkout -q "$tag" instead.
On Podman, use podman build --format docker -t ph-intercept . to keep the image's healthcheck.
Then use the Quick Start compose file, replacing its image: line with image: ph-intercept. Compose uses the image you just built, so there is nothing to pull. Then run docker compose up -d (or podman compose up -d).
What you'll see
Allowed queries fly past as friendlies. A domain that keeps coming back turns into a bigger ship.

Blocked queries are enemies your ship locks on to and shoots down.

Scan any ship with a click or tap to see how often its domain was asked for, which devices asked, and what blocked it.

The HUD along the bottom: blocking on and off (with timers), your stats, your block list, and seven ships to pick from.

2-player: two ad-blockers, even different kinds, side by side. See 2-player mode.
Configuration
All configuration is via environment variables in compose.yaml.
Upgrading? Your compose keeps working: every earlier setting (
PIHOLE_URL,PROVIDER, and the rest) is still read, and wins over its new name. Older settings maps old to new.
Required
| Variable | Description |
|---|---|
BLOCKER_URL |
The address you open in a browser to manage your ad-blocker, e.g. http://192.168.1.2. A pasted /admin or /api on the end is fine. |
BLOCKER_PASSWORD |
Pi-hole: app password. AdGuard Home or Technitium: login password. Not used by Blocky. CLI: set in a .env file. Portainer: add as an environment variable in the stack. |
Optional
| Variable | Default | Description |
|---|---|---|
BLOCKER_USERNAME |
"" |
AdGuard Home or Technitium username. |
BLOCKER_TOKEN |
"" |
Technitium API token, instead of a username and password. |
BLOCKER_TYPE |
(detected) | pihole, adguard, technitium, or blocky. Detected when left out. If set and the server is something else, that side doesn't start and the log says why. |
BLOCKER_VERIFY_SSL |
true |
false for an ad-blocker on HTTPS with a self-signed certificate. |
BLOCKER_DASHBOARD |
(derived) | Where the settings-menu link goes. Defaults to the ad-blocker's own web interface. |
RETURN_URL |
"" |
Where ESC goes, like your dashboard: http(s)://, //, a relative path, or an app scheme. Blank turns ESC off. |
BG_MODE |
starfield |
Default background: starfield · nebula · outrun · dark. Viewers can switch live. |
SKY_PRESET |
summer_triangle |
Default sky region: summer_triangle · orion · scorpius · southern_cross. Viewers can switch live. |
BG_IMAGE |
"" |
An image URL or /bg/filename.jpg. Becomes the default and adds CUSTOM to the background menu. |
READ_ONLY |
false |
true for a wall display or a shared page: anything that changes your ad-blocker or 2-player mode is refused (HTTP 403), and those controls are disabled or hidden. Scans are off; status and stats stay. |
HIDE_CLIENT |
false |
true keeps client names and IPs out of the browser. Scans show only a device count. |
HIDE_DOMAIN |
false |
true swaps every domain for a token before it reaches the browser (a keyed hash with a new random key each start, so tokens can't be matched to known domains). Ships still group by domain; scans work without the domain, CNAMEs, and list patterns. |
IGNORE_DOMAINS |
(unset) | Comma-separated regex patterns; matching domains spawn no ships, on both sides. Case-insensitive; escape dots: .*\.local$,.*\.internal$ |
IGNORE_CLIENTS |
(unset) | The same for client names and IPs: ^uptime-kuma$,^10\.0\.0\.5$ |
BLOCKER_IGNORE_DOMAINS, BLOCKER_IGNORE_CLIENTS |
(unset) | The same, for one side only (BLOCKER2_IGNORE_* for player 2). |
BLOCKER_PASSWORD_FILE |
(unset) | Read the password from a file: Docker secrets (/run/secrets/...) or any secret mounted as a file. Also BLOCKER_TOKEN_FILE and BLOCKER_USERNAME_FILE. |
LOG_LEVEL |
info |
info, debug for more detail, warning for problems only, or error. See Troubleshooting. |
Older settings
The names from before 1.6 (each ad-blocker's own) still work, exactly as before. Blocky, new in 1.6, has its own names too. Use whichever you like; if both are set, the ad-blocker's own name wins.
- Pi-hole:
PIHOLE_URL(ends in/api),PIHOLE_PASSWORD,PIHOLE_VERIFY_SSL - AdGuard Home:
ADGUARD_URL(ends in/control),ADGUARD_USERNAME,ADGUARD_PASSWORD,ADGUARD_VERIFY_SSL - Technitium:
TECHNITIUM_URL,TECHNITIUM_USER,TECHNITIUM_PASSWORD,TECHNITIUM_TOKEN,TECHNITIUM_VERIFY_SSL - Blocky:
BLOCKY_URL,BLOCKY_VERIFY_SSL,BLOCKY_DASHBOARD - Any of them:
PROVIDER, the older name forBLOCKER_TYPE
Each one stands for the BLOCKER_* setting with the same ending (TECHNITIUM_USER is BLOCKER_USERNAME).
BLOCKER2_* maps to PIHOLE2_*, ADGUARD2_*, and so on. BLOCKER2_TYPE is new and has no older name: an older *2_URL on its own pairs with a second server of the same kind as player 1. The per-provider ignore lists (PIHOLE_IGNORE_DOMAINS and the rest) still apply to any side running that provider, together with IGNORE_*. Settings only one server has keep that server's name: TECHNITIUM_TOTP, TECHNITIUM_QUERY_LOG_APP, TECHNITIUM_QUERY_LOG_CLASS, and BLOCKY_LOG_DIR, with TECHNITIUM2_* and BLOCKY2_LOG_DIR for player 2.
Your ad-blocker
| Server | BLOCKER_URL |
Login | Also needed |
|---|---|---|---|
| Pi-hole v6 | Its web address, e.g. http://192.168.1.2 |
BLOCKER_PASSWORD: an app password |
Nothing |
| AdGuard Home | Its web address, e.g. http://192.168.1.2:3000 |
BLOCKER_USERNAME and BLOCKER_PASSWORD |
Its query log turned on (it is by default) |
| Technitium DNS 13+ | Its web console, e.g. http://192.168.1.2:5380 |
BLOCKER_TOKEN, or BLOCKER_USERNAME and BLOCKER_PASSWORD |
The Query Logs (Sqlite) app from Technitium's App Store |
| Blocky | Its HTTP port, e.g. http://192.168.1.2:4000 |
None | Its CSV query log, shared read-only, so the same machine |
More on each: AdGuard Home · Technitium DNS · Blocky.
Requirements
- One of: Pi-hole v6 (v5 is not compatible), AdGuard Home 0.107.52 or newer (1.0 included), Technitium DNS 13 or newer, or Blocky 0.28 or newer
- A container runtime: Docker with Compose, Podman, or any other OCI runtime
- Network route from the container to your ad-blocker
- Architecture:
linux/amd64·linux/arm64·linux/arm/v7·linux/arm/v6·linux/386·linux/riscv64·linux/ppc64le
The container listens on port 4653.
Curious what everyone runs it on? I'm asking in a quick poll instead of collecting any data.
Troubleshooting
Start with the log:
docker logs ph-intercept
On Podman, podman logs ph-intercept.
How the log works. It opens with a banner and one line per ad-blocker. A healthy start looks like this:
version 1.7.1 log level info
P1 Pi-hole http://192.168.1.2/api ● detected
BLOCKER_* settings, password set
P2 not configured
● detected means it found your ad-blocker (● confirmed if you set BLOCKER_TYPE, ● detected after 6 s if it had to wait for it to start). From then on it stays quiet: one line when a problem starts, one when it clears. ph-intercept only logs in to your ad-blocker while the page is open, so open it before checking for login problems. If nothing follows the report, it's working. For more detail, set LOG_LEVEL: debug and restart (it's chatty, so set it back after); the compose caps the log at 30 MB.
| What you see | What to do |
|---|---|
The page at http://your-host:4653 won't open |
Use the IP of the machine running ph-intercept, and the port your compose publishes (4653, or 4663, 4673, or 4683 with the AdGuard Home, Technitium, or Blocky compose). Check the container is running (docker ps) and nothing else uses that port (change the left side of ports:). |
still no answer from ... after 1 min, or could not reach ... |
ph-intercept can't reach BLOCKER_URL. If it says localhost or 127.0.0.1: inside the container that's ph-intercept itself, so use your ad-blocker's IP, even on the same machine. |
Pi-hole: login rejected (password incorrect) |
Use an app password, not your web login: Settings → Web interface / API → Configure app password. Make a fresh one and paste it as is. |
AdGuard Home: login rejected (HTTP 401) or (HTTP 403) |
Check BLOCKER_USERNAME and BLOCKER_PASSWORD. After 5 wrong tries AdGuard Home locks the login for 15 minutes, so once fixed, wait that out or restart AdGuard Home. |
not started: Technitium needs BLOCKER_TOKEN ... |
Set an API token, or a username and password. |
not started: Technitium: set BLOCKER_TOKEN, or ... not both |
With a token, remove BLOCKER_PASSWORD from the compose and .env. |
| Stats work, but no ships fly | AdGuard Home: turn its query log on. Technitium: install the Query Logs (Sqlite) app from its App Store. Blocky: share its log folder, writable by Blocky (Blocky setup). Either way the log names the problem. Otherwise, check your devices really use this ad-blocker for DNS. |
not started: ... has an HTTPS certificate this container doesn't trust, or the HTTPS certificate at ... isn't trusted |
For a self-signed certificate, set BLOCKER_VERIFY_SSL: "false". |
not started: could not tell which ad-blocker is at ..., or points at port 53 |
Use the address you open to manage your ad-blocker, with its web port (not DNS port 53). |
not started: BLOCKER_TYPE says ..., but ... answers like ... |
Fix BLOCKER_TYPE, or leave it out. |
Pi-hole: login refused by rate limiting |
Pi-hole slows down quick repeat logins. It clears on its own. |
waiting for ... to answer |
Normal while your ad-blocker is still starting. |
Lines start with P1 or P2 for the side, and name the settings you actually used, older ones like PIHOLE_URL included. Still stuck? Ask in Discussions or open an issue with the first lines of the log; it never prints passwords or tokens.
Privacy
ph-intercept only talks to your own ad-blocker(s). It never phones home, has no analytics, and collects nothing. Your display settings (ship, background, toggles) are saved in your browser's local storage and never leave it. Requests from other websites to the blocking controls are refused, so a page you visit can't toggle your ad-blocker through ph-intercept.
Shared screens: on a wall display or a page other people can open, READ_ONLY stops anyone from changing your ad-blocker, and HIDE_CLIENT and HIDE_DOMAIN keep client names and domains out of the browser. See Optional settings.
Testing
I may have gone a little overboard: how it's tested.
Explore related projects
Loading…