Sign inSign up

michivonah/adguard-ddns-client

By michivonah

Updated over 1 year ago

A script for adding a dynamic ip address as an allowed client to AdGuard Home.

Image
Integration & delivery
API management
0

530

michivonah/adguard-ddns-client repository overview

AdGuard Home Whitelist DDNS Client

A script for adding a dynamic ip address as an allowed client to AdGuard Home. Useful if you host AdGuard Home on a VPS and your router doesn't supports DNS over HTTPS (DoH) or DNS over TLS (DoT).

GitHub: https://github.com/michivonah/adguard-ddns-client

You can run this python script manually or via the docker container. I recommend using the docker container. But you also can run the python script manually when you need it.

Use as docker container on your server:

  1. Install docker on your system

    apt-get install docker.io docker-compose -y

  2. Open your cronjob

    crontab -e

  3. Add the following line to the cronjob of your server and change the enviromental variables for your needs

    0 * * * * docker run -d --rm --env API_BASE_URL="https://example.com" --env API_USERNAME=YOUR_USER --env API_PASSWORD=YOUR_PASSWORD --env DOMAIN_NAME=YOUR_DDNS_DOMAIN docker.io/michivonah/adguard-ddns-client

    Replace 0 * * * * to run the job more often than once a hour. Use 0/30 * * * * to run the job every 30 mins or 5 * * * * to run the job every 5 minutes. Customize it to your needs.

  4. Finished. Now the cronjobs runs as defined and adds the clients ip address if it is missing to AdGuard Home's Client whitelist.

Enviormental variables

These environment variables are supported

VariableDescriptionExample
API_BASE_URLThe url of your AdGuard Home Serverhttps://example.com
API_USERNAMEThe username of your AdGuard Home Administrator Accountadmin
API_PASSWORDThe password of your AdGuard Home Administrator Accountadmin123 (use a secure password)
DOMAIN_NAMEYour DDNS Domain name with the ip address you want to whitelistddns.example.com

Required enviromental variables: API_BASE_URL, API_USERNAME, API_PASSWORD, DOMAIN_NAME

Tag summary

Content type

Image

Digest

sha256:7a376a610

Size

394.1 MB

Last updated

over 1 year ago

docker pull michivonah/adguard-ddns-client