1.5 KiB
1.5 KiB
Pi-hole v6 API & CLI Quirks
CLI Changes from v5
| v5 command | v6 equivalent | Notes |
|---|---|---|
pihole -w <domain> |
pihole allow <domain> |
Whitelist/allow |
pihole -b <domain> |
pihole deny <domain> |
Blacklist/deny |
pihole -c |
REMOVED | Use PADD instead |
pihole -g |
pihole updateGravity |
Same, but -g still works |
API Endpoints
| Old (v5) | New (v6) |
|---|---|
/admin/api.php |
/api |
| Query string auth | POST /api/auth with {"password":"..."} |
| No auth needed for some endpoints | Auth required for most endpoints |
Password & Auth
- Password stored as hash in
/etc/pihole/pihole.toml→pwhash - Temporary CLI password at
/etc/pihole/cli_pw(regenerated on FTL restart, limited permissions) - Docker env
WEBPASSWORDsets the password but is masked indocker inspect - App passwords for 2FA: set
app_pwhashin pihole.toml
FTL Telnet API
- Port 4711 inside container (
127.0.0.1:4711) - Not exposed outside the container by default
- Commands like
>stats,>recentwork vianc 127.0.0.1 4711inside container - May require authentication in newer versions
Database Schema (v6)
Key tables:
queries— all DNS queries (timestamp, domain, client, status)gravity— no longer exists as separate table; integrated differentlydomainlist— may not exist; allow/deny lists stored in different structurenetwork,network_addresses— client trackingcounters— summary stats