GithubHelp home page GithubHelp logo

legoagh's Introduction

legoagh

A simple script for automating using lego with AdGuard Home. It downloads the latest available release of lego, runs it and obtains a wildcard certificate for the specified domain.

Prepare:

mkdir /opt/lego
curl -s https://raw.githubusercontent.com/ameshkov/legoagh/master/lego.sh --output lego.sh
chmod +x lego.sh

If you're using CloudFlare, you need to create an API token first.

Then run the script:

DOMAIN_NAME="example.org" \
    EMAIL="you@email" \
    DNS_PROVIDER="cloudflare" \
    CLOUDFLARE_DNS_API_TOKEN="yourapitoken" \
    ./lego.sh

If you're using GoDaddy, you need to create the API credentials.

Then run the script:

DOMAIN_NAME="example.org" \
    EMAIL="you@email" \
    DNS_PROVIDER="godaddy" \
    GODADDY_API_KEY="yourapikey" \
    GODADDY_API_SECRET="yourapisecret" \
    ./lego.sh

If you're using DigitalOcean, you need to create an API token first.

Then run the script:

DOMAIN_NAME="example.org" \
    EMAIL="you@email" \
    DNS_PROVIDER="digitalocean" \
    DO_AUTH_TOKEN="yourapitoken" \
    ./lego.sh

If you're using DuckDNS, you need to copy the API from duckdns.

Then run the script:

DOMAIN_NAME="example.duckdns.org" \
    EMAIL="you@email" \
    DNS_PROVIDER="duckdns" \
    DUCKDNS_TOKEN="yourduckdnstoken" \
    ./lego.sh

By default, it uses Let's Encrypt to generate the certificate.

Alternatively, you can use a different provider. For instance, ZeroSSL.

To do this, you need to sign up for a ZeroSSL account and obtain your EAB credentials. Then just pass it to the script:

SERVER="https://acme.zerossl.com/v2/DV90" \
    EAB_KID="xxxx" \
    EAB_HMAC="xxxx" \
    ...
    ...
    ./lego.sh

legoagh's People

Contributors

ameshkov avatar farktronix avatar meanderfox avatar wes1993 avatar

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.