What is the Certbot plugin?
The Certbot plugin automates Let’s Encrypt certificate issuance with Gcore DNS API. How it works. To issue a Let’s Encrypt certificate for a domain, you need to confirm that you are its owner. You can do this in several ways (you can find more info in Let’s Encrypt documentation). One of the most common ways is a DNS-01 challenge that asks you to prove that you control the DNS for your domain name by creating a specific value in a TXT record under that domain name. You can use the Certbot plugin to send a request to issue a certificate. It automatically creates TXT records and subsequently removes them for obtaining, renewing, or revoking certificates. You can get more information about this in the Certbot documentation. To use the Certbot plugin, you’ll need:- A domain with Gcore name servers (ns1.gcorelabs.net and ns2.gcdn.services) that the certificate is hosted on or delegated to
- A Gcore account
Install the Certbot plugin
Below, we provide the commands for Certbot plugin installation on Ubuntu 22.04. If you have a different OS, the commands you need may differ a little. 1. Connect to your server via SSH. 2. Download and install the updates for outdated packages using the sudo command for package manager privileges. You need to upgrade to avoid errors when installing the plugin.
Create credentials for the Certbot plugin
To use the Certbot plugin, you’ll need Gcore DNS API credentials. Without them, the Certbot plugin won’t be able to issue a certificate for your domain. You can use two types of credentials: a permanent API token or the e-mail address and password associated with your Gcore account. We recommend using the first one because it’s the preferred option for integration via API. To receive the token, follow the “How to create, use and delete permanent token” guide. 1. Go to the home/user_name directory:Acquire a certificate via the Certbot plugin
1. Run the following command to acquire the certificate:

Renew a certificate
You need to renew the issued Let’s Encrypt certificate every 90 days. It can be done in two ways:- Manually with a command that attempts to renew any previously issued certificates that expire within 30 days. The working directory and the rest of the parameters should be the same for issuing.
- (recommended) Automatically with the cron daemon that maintains automated renewal in the background. You can find the commands for this method in Certbot documentation.