Skip to main content

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

Project description

certbot-dns-cpanel

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

How to use

1. Install

First, install certbot and the plugin using pip:

pip install certbot certbot-dns-cpanel

2. Configure

Download the file credentials.ini.exemple and rename it to credentials.ini. Edit it to set your cPanel url, username and password.

# The url cPanel url
# include the scheme and the port number (usually 2083 for https)
certbot_dns_cpanel:cpanel_url = https://cpanel.exemple.com:2083

# The cPanel username
certbot_dns_cpanel:cpanel_username = user

# The cPanel password
certbot_dns_cpanel:cpanel_password = hunter2

3. Run

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

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

To create a wildcard certificate *.exemple.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-cpanel:cpanel \
--installer apache \
--certbot-dns-cpanel:cpanel-credentials /path/to/credentials.ini \
-d '*.exemple.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 \
badjware/certbot-dns-cpanel \
certonly \
--authenticator certbot-dns-cpanel:cpanel \
--certbot-dns-cpanel:cpanel-credentials /tmp/credentials.ini \
-d exemple.com \
-d www.exemple.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-cpanel-0.2.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

certbot_dns_cpanel-0.2.1-py2.py3-none-any.whl (8.5 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file certbot-dns-cpanel-0.2.1.tar.gz.

File metadata

  • Download URL: certbot-dns-cpanel-0.2.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for certbot-dns-cpanel-0.2.1.tar.gz
Algorithm Hash digest
SHA256 2863a1d2d932596a7c5d05199475cae36f4e4f582c22f53b4dcb7e7c507cde50
MD5 162505be17ee91815c3f964436b667cb
BLAKE2b-256 9570595a8defb7df60771bcdac7ddb0353b29b1389c9f51a3a1e10b20b0c517a

See more details on using hashes here.

File details

Details for the file certbot_dns_cpanel-0.2.1-py2.py3-none-any.whl.

File metadata

  • Download URL: certbot_dns_cpanel-0.2.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.5 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for certbot_dns_cpanel-0.2.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 de1b15af2ba8bb8a6ca7ca62a42e6c76af953d54eadeb3a55ce9dd1980487fef
MD5 3f667f2da78055a86cfd4c7b2c1f32bf
BLAKE2b-256 f36eebd5359efc6353e0620f327882a8f8997c31e52be0c7d95b7e2bc528da76

See more details on using hashes here.

Supported by

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