Code Monkey home page Code Monkey logo

certbot-dns-cpanel's Introduction

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.

Named Arguments

Argument Description
--certbot-dns-cpanel:cpanel-credentials <file> cPanel credentials INI file (required)
--certbot-dns-cpanel:cpanel-propagation-seconds <seconds> The number of seconds to wait for DNS to propagate before asking the ACME server to verify the DNS record (Default: 30)

Install

pip install certbot-dns-cpanel

Credentials

Download the file credentials.ini.example 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.example.com:2083

# The cPanel username
certbot_dns_cpanel:cpanel_username = user

# The cPanel password
certbot_dns_cpanel:cpanel_password = hunter2

Example

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

certbot certonly \
--authenticator certbot-dns-cpanel:cpanel \
--certbot-dns-cpanel:cpanel-credentials /path/to/credentials.ini \
-d 'example.com' \
-d '*.example.com'

You can also specify a installer plugin with the --installer option:

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

You may also install the certificate onto a domain on your cPanel account:

certbot run \
--authenticator certbot-dns-cpanel:cpanel \
--installer certbot-dns-cpanel:cpanel \
--certbot-dns-cpanel:cpanel-credentials /path/to/credentials.ini \
-d 'example.com' \
-d '*.example.com'

Depending on your provider you may need to use the --certbot-dns-cpanel:cpanel-propagation-seconds option to extend the DNS propagation time.

Docker

A docker image badjware/certbot-dns-cpanel, based on certbot/certbot is provided for your convenience:

docker run -it \
-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 'example.com' \
-d '*.example.com'

Additional documentation

certbot-dns-cpanel's People

Contributors

aptalca avatar badjware avatar guisea avatar mrtimp avatar oliverdowling avatar znuff avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.