From fb21649e840d4822e3aa0d5645c5801d8cc2c1c6 Mon Sep 17 00:00:00 2001 From: michivonah Date: Sun, 7 Jan 2024 21:15:20 +0100 Subject: [PATCH] create documentation --- README.md | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 07f8104..d666291 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,33 @@ -# adguard-ddns-client -A script for adding a dynamic ip address as allowed client to AdGuard Home if hosted on a VPS. +# 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 and change the enviromental variables to your server + + ```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 adguard-ddns-client``` + +4. Finished. Now the cronjobs runs every hour and adds the clients ip address if it is missing. + +## Enviormental variables +These environment variables are supported + +| Variable | Description | Example | +| --- | --- | --- | +| API_BASE_URL | The url of your AdGuard Home Server | ``https://example.com`` | +| API_USERNAME | The username of your AdGuard Home Administrator Account | ``admin`` | +| API_PASSWORD | The password of your AdGuard Home Administrator Account | ``admin123`` (use a secure password) | +| DOMAIN_NAME | Your DDNS Domain name with the ip address you want to whitelist | ``ddns.example.com`` | + +> Required enviromental variables: API_BASE_URL, API_USERNAME, API_PASSWORD, DOMAIN_NAME +