Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A letsencrypt certbot auth/cleanup hook program engineered to handle hostname ownership authentication via DigitalOcean's DNS system.

Project Description

This program’s purpose is to function as a manual authentication and cleanup hook for the Let’s Encrypt EFF’s certbot client program when you wish to use ACME-DNS authentication during the certificate authentication process, while also using DigitalOcean’s DNS infrastructure for the creation and removal of the ACME-DNS required DNS TXT records. This program also supports being passed a command string that will be called during the cleanup hook stage of the authentication process.


Installation of this program is quite easy, as it only has one external dependency, and this program includes this dependency in its file.

That said, there are 4 ways that you can install this program;

  • The first is via the normal means, that is, PyPI via PIP as so:

    pip install lets-do-dns
  • You can also install this program from a clone of the source repository, as so (remember, if you want to modify the source code without re-installing, pass the -e flag to PIP):

    pip install .
  • You can also use Docker to install/run this program. You can do this like so when grabbing from the Docker Hub:

    docker pull jitsusama/lets-do-dns
  • Finally, you can build the image from a clone of the source repository like so:

    docker build -t jitsusama/lets-do-dns .


Make sure you pass the DO_APIKEY and DO_DOMAIN environment variables to certbot when it is called. Tell certbot to load this program by passing its name to certbot via the --manual-auth-hook and the --manual-cleanup-hook CLI arguments.

If you would also like for this program to call your own program during the cleanup hook stage, make sure you pass the LETS_DO_POSTCMD environment variable to certbot as well, specifying the invocation string of your program.

Here’s an example of how you can use this program from the CLI when you installed the program via PIP:

DO_APIKEY=super-secret-key \ \
LETS_DO_POSTCMD='echo ${CERTBOT_DOMAIN} > command_output.txt' \
certbot certonly --manual -d \
    --preferred-challenges dns \
    --manual-auth-hook lets-do-dns \
    --manual-cleanup-hook lets-do-dns

Here’s an example of how you can use this program from Docker when you pulled the image from the Docker Hub:

docker run -v "$(pwd)/my-cert-dir:/etc/letsencrypt" \
    -e "DO_APIKEY=super-secret-key" \
    -e "" \
    -e 'LETS_DO_POSTCMD="echo ${CERTBOT_DOMAIN} > /etc/letsencrypt/command_output.txt"' \
    jitsusama/lets-do-dns \
    certonly --manual -d \
        --preferred-challenges dns \
        --manual-auth-hook lets-do-dns \
        --manual-cleanup-hook lets-do-dns

Release History

This version
History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(13.4 kB) Copy SHA256 Hash SHA256
Wheel py2.py3 Jul 21, 2017
(7.5 kB) Copy SHA256 Hash SHA256
Source None Jul 21, 2017

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Google Google Cloud Servers DreamHost DreamHost Log Hosting