This script can manage your AdGuard Home settings at regular intervals:
- Keep your block/allow lists updated, executing the list refresh on each run
- Sync your TLS cert settings with Træfik
Always ensure your AdGuard Home TLS settings are in sync with your Træfik generated certs!
If you use AdGuard Home for DoH/DoQ/DoT, and you use Træfik Proxy + Lets Encrypt to automatically generate certs for your AdGuard domain, you will know that it can be annoying when your certs expire and you have to go diving in your Træfik certs file to find and decode your cert and key for AdGuard... It's a whole 2-minute task every few months!! If you just can't deal with that pain, this is for you 🫵
Simply run the container with your credentials and paths set up:
docker run --rm -d --name agh-updater -v /services/traefik/certs:/traefikcerts:ro \
-e ADGUARD_USERNAME=exampleuser -e ADGUARD_PASSWORD=asecret \
-e ADGUARD_DOMAIN=adguard.example.com -e TRAEFIK_CERT_JSON=/traefikcerts/acme.json \
ghcr.io/willfantom/agh-updater:latest
See the example setup here!
./agh-updater.sh -u exampleuser -p asecret \
-d adguard.example.com -f /services/traefik/certs/acme.json
ENV Variable | CLI Parameter | Description | Default | Required |
---|---|---|---|---|
ADGUARD_USERNAME |
-u <> |
Your AdGuard Home admin username for API access | N/A | ✅ |
ADGUARD_PASSWORD |
-p <> |
Your AdGuard Home admin password for API access | N/A | ✅ |
ADGUARD_DOMAIN |
-d <> |
Your AdGuard Home domain (without scheme or port) | N/A | ✅ |
TRAEFIK_CERT_JSON |
-f <> |
Path to your Træfik cert storage file | N/A | ✅ |
INTERVAL (Docker only) |
-i <> |
ReUpdate the certs every X seconds (0 if do only once) |
0 (60 in Docker) |
❌ |
-e |
Exit update loop if an error is encountered | not-set | ❌ | |
ADGUARD_API_SCHEME |
Scheme to use to access your AdGuard instance API | https |
❌ | |
ADGUARD_API_PORT |
Port to access your AdGuard instance API | 443 |
❌ | |
-h |
Print CLI Help | ❌ | ||
TRAEFIK_CERT_RESOLVER (Docker only) |
Name of the certificate resolver used for the adguard domain | [] (any) |
❌ |