GithubHelp home page GithubHelp logo

ducker's Introduction

Ducker

This set of scripts allow to periodically renew DuckDNS IP, painlessly obtain ONE cert for primary and wildcard DuckDNS domain and renew it over time as needed. It is designed to be run in Docker, but nobody prevents you to use it without it.

DISCLAIMER: This is very raw set of scripts written overnight and still in testing phase

TL;DR

git clone https://github.com/rmrfus/ducker
cd ducker
docker build -t ducker:latest .
docker run --name ducker --restart always \
    -v /opt/letsencrypt:/etc/letsencrypt \
    -e DUCKDNS_DOMAIN=[put your duckdns FQDN here (i.e. mycool.duckdns.org)] \
    -e DUCKDNS_TOKEN=[put your duckdns token here] \
    -e ACME_EMAIL=[email for letsencrypt notifications] \
    -e ACME_TEST=YES \
    ducker

If everything looks sane, delete exported volume (/opt/letsencrypt in this example) and run same command without ACME_TEST=YES to request valid certificates.

Long story

All recipes in the internet didn't work. Any flavor of letsencrypt client (except Traefik) attempted to run two DNS challenges sequentially and miserably failed because DuckDNS cannot keep two TXT records at the same time. Of course you can maintain 2 different certs -- one for primary domain and one for wildcard, but this is just not fair.

The trick is to obtain cert for primary domain, for example mycool.duckdns.org and then extend it to mycool.duckdns.org,*.mycool.duckdns.org. This way cert will contain SANs for both domains.

Notes

  • Initial run of script will request both certs if needed. Otherwise it will attempt to renew them daily.
  • Because DuckDNS TXT record has TTL equal to 60 seconds hook_auth.sh will sleep 60 seconds before continue. Be patient.
  • It is recommended to check if you got proper SANs in cert by running openssl x509 -in cert.pem -text | grep DNS as root from proper directory.

ducker's People

Contributors

lizzygrynova avatar rmrfus avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

lizzygrynova

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.