Code Monkey home page Code Monkey logo

agh-updater's Introduction

AdGuard Home Settings Updater

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

AdGuard Home + 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 🫵

Usage [with docker 🐳]

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

Usage [with docker compose 🐳]

See the example setup here!

Usage [bash]

  ./agh-updater.sh -u exampleuser -p asecret \
    -d adguard.example.com -f /services/traefik/certs/acme.json

Configuration

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)

agh-updater's People

Contributors

willfantom avatar

Stargazers

Arbal avatar Alessandro Del Prete avatar

Watchers

James Cloos avatar  avatar

Forkers

andjones132

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.