Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
badjware committed Apr 27, 2018
1 parent 4afb310 commit e04fd3c
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 25 deletions.
34 changes: 15 additions & 19 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
Copyright 2018 Massaki Archambault

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Expand Down Expand Up @@ -52,22 +66,4 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
END OF TERMS AND CONDITIONS
47 changes: 42 additions & 5 deletions README.md
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/
2 changes: 1 addition & 1 deletion credentials.ini.exemple
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# The url cPanel url
# including the scheme and the port number (usually 2083 for https)
# include the scheme and the port number (usually 2083 for https)
certbot_dns_cpanel:authenticator_url = https://cpanel.exemple.com:2083

# The cPanel username
Expand Down

0 comments on commit e04fd3c

Please sign in to comment.