Skip to content
This repository has been archived by the owner on Mar 15, 2022. It is now read-only.

A docker container to automatically renew certificates with the desec.io certbot hook.

License

Notifications You must be signed in to change notification settings

arctic-alpaca/desec-hook-certbot-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚠️ The dedyn.io certbot hook has been archived in favor of the certbot plugin. This repo was based on the cerbot hook and should no longer be used. ⚠️

desec-hook-certbot-docker

A (unofficial) docker container to automatically renew certificates with the desec.io certbot hook via dns challenge.

Usage

Notes

PLEASE BE AWARE THAT A COMPROMISED, VALID DESEC.IO TOKEN CAN PUT YOUR DOMAINS AT RISK. HARDCODING A TOKEN LIKE IN THIS CONTAINER ISN'T RECOMMENDED UNTIL SCOPED TOKENS ARE FULLY IMPLEMENTED!

I'm using this container to get a wildcard certificate with a raspberry pi in my local network. Don't deploy this container directly to the internet.

Build

Clone this repo and inside the project folder: sudo docker image build -t desec-hook-certbot-docker .

RUN

  docker run \
    -d \
    --restart unless-stopped \
    -v "/etc/letsencrypt:/etc/letsencrypt" \
    -v "/var/log/letsencrypt:/var/log/letsencrypt" \
    -e "TZ=Europe/Berlin" \
    --env "DEDYN_TOKEN={DEDYN_TOKEN}" \
    --env "DEDYN_NAME={DEDYN_NAME}" \
    --env "DOMAINS={DOMAINS}" \
    --env "DOMAIN_EMAIL={DOMAIN_EMAIL}" \
    certbot-test
  • Volumes and timezone (TZ) can be configured as you wish. Timezone is used for cron renewal.
  • {DEDYN_TOKEN} a dedyn/desec token that's valid for the planned runtime of the container.
  • {DEDYN_NAME} The domain you want a certificate for, "yourdomain.dedyn.io" or "example.com" depending on whether you use managed dns or dyndns.
  • {DOMAINS} The domains you want a certificate for, seperated by space.
  • {DOMAIN_EMAIL} An email address where you can be reached to supply to Let's Encrypt.

Cron

The crontab file can be configured to run the renewal check at any time. Currently 04:00 (at night) is the default.

Example

  docker run \
    -d \
    --restart unless-stopped \
    -v "/etc/letsencrypt:/etc/letsencrypt" \
    -v "/var/log/letsencrypt:/var/log/letsencrypt" \
    -e "TZ=Europe/Berlin" \
    --env "DEDYN_TOKEN=abcxyzabcxyzabcxyz" \
    --env "DEDYN_NAME=example.com" \
    --env "DOMAINS=example.com *.example.com" \
    --env "[email protected]" \
    certbot-test

Note, the email doesn't need to be the same domain. You can use gmail or whatever you want.

More info

About

A docker container to automatically renew certificates with the desec.io certbot hook.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published