Skip to main content

Obtain certificates using a DNS TXT record for ISPConfig domains with DDNS module tokens

Project description

certbot-dns-ispconfig-ddns

ISPConfig DNS Authenticator plugin for Certbot using tokens from the ISPConfig DDNS module

This plugin automates the process of completing a dns-01 challenge by creating, and subsequently removing, TXT records.

Test/Build/Publish Tests Status Coverage Status Lint Status

Configuration of ISPConfig

In the DNS -> Dynamic DNS -> Tokens you need to have a token with the following rights:

  • Allowed zones: all DNS zones for which you want to create ssl certificates
  • Allowed record types: TXT
  • Limit records: _acme-challenge

If you want to create certificates for subdomains, they must be included in the Limit records: _acme-challenge,_acme-challenge.subdomain1,_acme-challenge.subdomain2

Installation

pip install certbot-dns-ispconfig-ddns

Usage

Credentials file or cli parameters

You can either use cli parameters to pass authentication information to certbot:

...
--dns-ispconfig-ddns-endpoint <your-ispconfig-url (e.g. https://server.example.com:8080>
--dns-ispconfig-ddns-token <your-ddns-token>

Or to prevent your credentials from showing up in your bash history, you can also create a credentials-file ispconfig-ddns.ini (the name does not matter) with the following content:

dns_ispconfig_ddns_endpoint=<your-ispconfig-url (e.g. https://server.example.com:8080>
dns_ispconfig_ddns_token=<your-ddns-token>

And then instead of using the --dns-ispconfig-ddns-* parameters above, you can use

...
--dns-ispconfig-ddns-credentials </path/to/your/ispconfig-ddns.ini>

You can also mix these usages, though the cli parameters always take precedence over the ini file.

Examples

To acquire a single certificate for both example.com and *.example.com:

certbot certonly \
    --non-interactive \
    --agree-tos \
    --email <your-email> \
    --preferred-challenges dns \
    --authenticator dns-ispconfig-ddns \
    --dns-ispconfig-ddns-endpoint <https://server.example.com:8080> \
    --dns-ispconfig-ddns-token <your-ddns-token> \
    --dns-ispconfig-ddns-propagation-seconds 60 \
    -d 'example.com' \
    -d '*.example.com'

Docker

In order to create a docker container with a certbot-dns-ispconfig installation, create an empty directory with the following Dockerfile:

    FROM certbot/certbot
    RUN pip install certbot-dns-ispconfig-ddns

Proceed to build the image::

    docker build -t certbot/dns-ispconfig-ddns .

Once that's finished, the application can be run as follows::

docker run --rm \
    -v /var/lib/letsencrypt:/var/lib/letsencrypt \
    -v /etc/letsencrypt:/etc/letsencrypt \
    --cap-drop=all \
    certbot/dns-ispconfig-ddns certonly \
    --non-interactive \
    --agree-tos \
    --authenticator dns-ispconfig-ddns \
    --dns-ispconfig-ddns-propagation-seconds 60 \
    --dns-ispconfig-ddns-credentials /etc/letsencrypt/.secrets/domain.tld.ini \
    -d example.com -d '*.example.com'

Project details


Download files

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

Source Distribution

certbot_dns_ispconfig_ddns-1.0.8.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

certbot_dns_ispconfig_ddns-1.0.8-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file certbot_dns_ispconfig_ddns-1.0.8.tar.gz.

File metadata

File hashes

Hashes for certbot_dns_ispconfig_ddns-1.0.8.tar.gz
Algorithm Hash digest
SHA256 ace28e46a5de02abfbe4d5c0f97e68b30ff18c97efe7fcdd1bcbe3e31c4eaaee
MD5 c2b71330265c0d2d1d87f05d074f2aa5
BLAKE2b-256 23d915b1c7d8c1db204e8797613630636ad5e392993ddfa0fbcf6d6ad4a762ab

See more details on using hashes here.

File details

Details for the file certbot_dns_ispconfig_ddns-1.0.8-py3-none-any.whl.

File metadata

File hashes

Hashes for certbot_dns_ispconfig_ddns-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 c06b28377ad81592cbe086cb7f84c35d8866e69efdee284124e1a55809fa4610
MD5 a33381ebe44f168c0d6aab482bd561f1
BLAKE2b-256 e29dba776caee726665a10c702cc56d45fc386a970163c7c302d91d498ab86f7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page