Skip to main content

certbot plugin to allow acme dns-01 authentication of a name managed in DirectAdmin.

Project description

certbot-dns-directadmin

Plugin to allow acme dns-01 authentication of a name managed in DirectAdmin. Useful for automating and creating a Let's Encrypt certificate (wildcard or not) for a service with a name managed by DirectAdmin, but installed on a server not managed in DirectAdmin.

How to use

1. Install

First, install certbot and the plugin using pip:

pip install certbot certbot-dns-directadmin

2. Configure

Download the file credentials.ini.example and rename it to directadmin-credentials.ini. Edit it to set your DirectAdmin url, username and password.

# The url DirectAdmin url
# include the scheme and the port number (usually 2222)
certbot_dns_directadmin:directadmin_url = https://directadmin.example.com:2222
# The DirectAdmin username
certbot_dns_directadmin:directadmin_username = user

# The DirectAdmin password
certbot_dns_directadmin:directadmin_password = hunter2

3. Run

You can now run certbot using the plugin and feeding the credentials file.
For example, to get a certificate for example.com and www.example.com:

certbot certonly \
--authenticator certbot-dns-directadmin:directadmin \
--certbot-dns-directadmin:panel-credentials /path/to/directadmin-credentials.ini \
-d example.com \
-d www.example.com

To create a wildcard certificate *.example.com and install it on an apache server, the installer plugin must be specified with the --installer option. You will need to install the apache plugin if it's not already present on your system.

pip install certbot-apache
certbot run \
--apache \
--authenticator certbot-dns-directadmin:directadmin \
--installer apache \
--certbot-dns-directadmin:directadmin-credentials /path/to/directadmin-credentials.ini \
-d '*.example.com'

The certbot documentation has some additionnal informations about combining authenticator and installer plugins: https://certbot.eff.org/docs/using.html#getting-certificates-and-choosing-plugins

Docker

A docker image based on certbot/certbot is provided for your convenience:

docker run \
-v /path/to/credentials.ini:/tmp/credentials.ini \
cybercinch/certbot-dns-directadmin \
certonly \
--authenticator certbot-dns-directadmin:directadmin \
--certbot-dns-cpanel:cpanel-credentials /tmp/directadmin-credentials.ini \
-d example.com \
-d www.example.com

Additional documentation

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-directadmin-0.0.3.win32.zip (15.4 kB view details)

Uploaded Source

File details

Details for the file certbot-dns-directadmin-0.0.3.win32.zip.

File metadata

  • Download URL: certbot-dns-directadmin-0.0.3.win32.zip
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for certbot-dns-directadmin-0.0.3.win32.zip
Algorithm Hash digest
SHA256 c8e8dd04b7effcfe90eb37530c974521af7296e16a67a6e58ddb25aa2f6122a4
MD5 2cb833f6aa3265be4c7d329294cafeeb
BLAKE2b-256 2175bac1d44a7ac7fe9ea970c1625eaf1a8143b0e29ba03154849c3b66fb4d9f

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