-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
58 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,49 @@ | ||
# certbot-dns-cpanel | ||
|
||
Plugin to allow acme dns-01 authentication of a name managed in 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. | ||
|
||
TODO: Proper readme | ||
## 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:authenticator_url = https://cpanel.exemple.com:2083 | ||
# NOTES | ||
# The cPanel username | ||
certbot_dns_cpanel:authenticator_username = user | ||
running: | ||
# The cPanel password | ||
certbot_dns_cpanel:authenticator_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 --staging certonly -a certbot-dns-cpanel:authenticator -d exemple.com | ||
certbot certonly \ | ||
--authenticator certbot-dns-cpanel:authenticator \ | ||
--certbot-dns-cpanel:authenticator-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:authenticator \ | ||
--installer apache \ | ||
--certbot-dns-cpanel:authenticator-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 | ||
|
||
## Additional documentation | ||
* https://documentation.cpanel.net/display/DD/Guide+to+cPanel+API+2 | ||
* https://certbot.eff.org/docs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters