| name | adguard |
| description | Inspect and manage my self-hosted AdGuard Home DNS sinkhole. Use when the user asks about AdGuard, DNS blocking, query logs, blocklists/filters, top queried or blocked domains, DNS clients, or wants to toggle protection. |
| allowed-tools | Bash, WebFetch |
AdGuard Home
Manage my self-hosted AdGuard Home (DNS sinkhole / ad-blocker) instance. Inspect
status, query logs, stats, configured clients, and filter lists. Toggle DNS
protection (mutation — confirm first).
Environment
Credentials come from sops-nix (see modules/programs/shell.nix):
ADGUARD_URL — base URL (no trailing slash), e.g. http://192.168.1.109
ADGUARD_USERNAME — HTTP basic auth user
ADGUARD_PASSWORD — HTTP basic auth password
The adguard CLI reports a JSON error envelope when they are missing. All API
calls hit the /control/ base path and pass HTTP basic auth.
CLI
Use the installed adguard CLI for common operations. It always emits a single
JSON envelope with ok, command, result or error, and next_actions.
scripts/adguard.sh remains as a compatibility shim for older workflows.
adguard status
adguard version
adguard stats
adguard stats-info
adguard query-log --limit 50
adguard query-log-search example.com --limit 200
adguard clients
adguard clients-active <ip>
adguard filters
adguard rules
adguard dns-config
adguard dhcp-status
adguard protection-toggle on --confirm-toggle
For anything not covered, call the API directly with $ADGUARD_URL plus
-u "$ADGUARD_USERNAME:$ADGUARD_PASSWORD" — see references/api-endpoints.md
and references/quick-reference.md.
Workflow: investigating a blocked domain
adguard query-log-search example.com — see when/who hit it.
adguard filters — see which list flagged it (the rules
field in querylog points to filter ID + line).
adguard rules — check custom user rules for overrides.
Workflow: who is querying
adguard stats — top clients by query count.
adguard clients-active <ip> — resolve an IP to its
configured client profile and per-client overrides.
Mutations: confirm first
Always confirm with the user before:
adguard protection-toggle on|off --confirm-toggle (disables DNS filtering globally — every device
on the LAN loses ad/tracker blocking until re-enabled)
- Any custom POST/PUT against
/control/* (filter add/remove, DNS config
changes, DHCP changes, client edits)
References
references/api-endpoints.md — endpoints used by the CLI, with response
shapes verified against the live instance (v0.107.67)
references/quick-reference.md — copy-paste curl recipes
references/troubleshooting.md — 401/403, connection, DNS-side issues
Notes