Coder Social home page Coder Social logo

adguardhome_certinjector's Introduction

AdGuardHome Certificate Injector


It's a simple ruby script that automates AdGuardHome certificate injection

Usually, you'd run this after your certbot renewal as part of your --post-hook, allowing you to automatically inject the new key and cert chain into AdGuardHome's YAML config file (example below).

Usage

Usage: ./adguardhome_certinjector.rb [options]
    -c, --config CONFIGFILE          Path to the AdGuardHome config file
    -d, --domain yoursite.com        Domain name for cert/key - LetsEncrypt (certbot) mode only
    -p, --privatekey privkey.pem     Path to your private key - Manual mode
    -i, --certchain fullchain.pem    Path to your public certificate chain - Manual mode

Examples

Use with a certbot post hook (LetsEncrypt mode)

Ideally, the chained commands would end up in a script to be passed as the single --post-hook 'command' to be run, but I've chained all three here to demonstrate the usual renewal workflow:

certbot renew --post-hook '/path/to/AdGuardHome -s stop ; /path/to/adguardhome_certinjector.rb -c /path/to/AdGuardHome.yaml -d yoursite.com ; /path/to/AdGuardHome -s start'

Use with a certificate chain and key (Manual mode)

/path/to/AdGuardHome -s stop
/path/to/adguardhome_certinjector.rb -c /path/to/AdGuardHome.yaml -p /path/to/privkey.pem -i /path/to/fullchain.pem
/path/to/AdGuardHome -s start

adguardhome_certinjector's People

Contributors

vt0r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

omoeba

adguardhome_certinjector's Issues

Allow the manual specification of cert path

Some non-certbot ACME clients like acme.sh let you install the certificate in anywhere you want. It would be great if this script had a "manual mode" where you can manually specify the path to the fullchain and private key files.

Features request

Hi there,

That would be grate to add a feature for auto renewal or at least add into readme how to do it with cron

Thanks !

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.