Skip to main content

Plugin for certbot to obtain certificates using a DNS TXT record for Porkbun domains

Project description

Certbot DNS Porkbun Plugin

Plugin for certbot to obtain certificates using a DNS TXT record for Porkbun domains


PyPI PyPI - Python Version GitHub Downloads GitHub Workflow Status


Table of Contents

  1. About
  2. Installation
    1. Prerequirements
    2. With pip (recommend)
    3. From source
  3. Usage
  4. FAQ
  5. Third party notices
  6. License

About

certbot_dns_porkbun is a plugin for certbot. It handles the TXT record for the DNS-01 challenge for Porkbun domains. The plugin takes care of the creation and deletion of the TXT record using the Porkbun API.

Installation

Prerequirements

You need at least version 3.6 of Python installed. If you want to install the plugin with pip, then you must also have pip installed beforehand.

If you already have certbot installed, make sure you have at least version 1.1.0 installed.

You can check what version of certbot is installed with this command:

certbot --version

If you don't have certbot installed yet, then the PyPI version of certbot will be installed automatically during the installation.

Note: If you want to run certbot with root privileges, then you need to install the plugin as root too. Otherwise, certbot cannot find the plugin.

With pip (recommend)

Use the following command to install certbot_dns_porkbun with pip:

pip3 install certbot_dns_porkbun

You can also very easily update to the newest version:

pip3 install certbot_dns_porkbun -U

From source

If you prefer to install the plugin from the source code:

git clone https://github.com/infinityofspace/certbot_dns_porkbun.git
cd certbot_dns_porkbun
pip3 install .

Usage

To check if the plugin is installed and detected properly by certbot, you can use the following command:

certbot plugins

The resulting list should include dns-porkbun if everything went fine.

Examples

Below are some examples of how to use the plugin.

Generate a certificate with a DNS-01 challenge for the domain example.org:

certbot certonly \
  --non-interactive \
  --agree-tos \
  --email <your-email-address> \
  --preferred-challenges dns \
  --authenticator dns-porkbun \
  --dns-porkbun-key <your-porkbun-api-key> \
  --dns-porkbun-secret <your-porkbun-api-secret> \
  --dns-porkbun-propagation-seconds 60 \
  -d "example.com"

Generate a wildcard certificate with a DNS-01 challenge for all subdomains *.example.com (Note: the wildcard certificate does not contain the root domain itself):

certbot certonly \
  --non-interactive \
  --agree-tos \
  --email <your-email-address> \
  --preferred-challenges dns \
  --authenticator dns-porkbun \
  --dns-porkbun-key <your-porkbun-api-key> \
  --dns-porkbun-secret <your-porkbun-api-secret> \
  --dns-porkbun-propagation-seconds 60 \
  -d "*.example.com"

Generate a certificate with a DNS-01 challenge for the domain example.com without an account (i.e. without an email address):

certbot certonly \
  --non-interactive \
  --agree-tos \
  --register-unsafely-without-email \
  --preferred-challenges dns \
  --authenticator dns-porkbun \
  --dns-porkbun-key <your-porkbun-api-key> \
  --dns-porkbun-secret <your-porkbun-api-secret> \
  --dns-porkbun-propagation-seconds 60 \
  -d "example.com"

Generate a staging certificate (i.e. temporary testing certificate) with a DNS-01 challenge for the domain example.com:

certbot certonly \
  --non-interactive \
  --agree-tos \
  --email <your-email-address> \
  --preferred-challenges dns \
  --authenticator dns-porkbun \
  --dns-porkbun-key <your-porkbun-api-key> \
  --dns-porkbun-secret <your-porkbun-api-secret> \
  --dns-porkbun-propagation-seconds 60 \
  -d "example.com" \
  --staging

You can find al list of all available certbot cli options in the official documentation of certbot.

Third party notices

All modules used by this project are listed below:

Name License
certbot Apache 2.0
requests Apache 2.0
zope.interface ZPL-2.1
setuptools MIT
pkb_client MIT

Furthermore, this readme file contains embeddings of Shields.io and PePy.

License

MIT - Copyright (c) Marvin Heptner

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_porkbun-0.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

certbot_dns_porkbun-0.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file certbot_dns_porkbun-0.1.tar.gz.

File metadata

  • Download URL: certbot_dns_porkbun-0.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for certbot_dns_porkbun-0.1.tar.gz
Algorithm Hash digest
SHA256 c4df711017648af159e09c11f737a45f79f93e212192348b5dc5b11d18343dcd
MD5 24f7ff13255dacb53fa9589b86ab35e8
BLAKE2b-256 a2456985c5ed9245af4799cecbb6c388783f86b34e58accbf3ac916ed0d40b31

See more details on using hashes here.

File details

Details for the file certbot_dns_porkbun-0.1-py3-none-any.whl.

File metadata

  • Download URL: certbot_dns_porkbun-0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for certbot_dns_porkbun-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4846a6bef53d9415c0d58f48519e797253d310306f6d9c78ce72c5c8c474a572
MD5 42e015d2c780a5848ab5db9765e28343
BLAKE2b-256 4755b42721f36121a86b049ab709635c8101265718181887fe674f48c5870847

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