I want to create SSL certificate using azure dns refering to this tutoriel : https://medium.com/@jibinpb/lets-encrypt-certificate-with-azure-dns-b9ed32ae5aee The problem that when i run
sudo certbot certonly --dns-azure-config ~/azure_certbot.ini -d "mydomain.com"
Any suggestions please ?
This error due to certbot not recognizing the --dns-azure-config the DNS plugin for Azure in certbot may not be installed properly.
Error:usage: certbot [SUBCOMMAND] [options] [-d DOMAIN] [-d DOMAIN] ... Certbot can obtain and install HTTPS/TLS/SSL certificates. By default, it will attempt to use a webserver both for obtaining and installing the certificate. certbot: error: unrecognized arguments: --dns-azure-config /home/xxxx/azure_certbot.ini
To resolve this issue, make use of below command:
Install sudo apt install certbot
use the manual mode of certbot with DNS challenges to obtain a certificate for your domain with below command.
sudo certbot --manual --preferred-challenges dns certonly -d Mydomain.com
This certbot will prompt you with instructions to add DNS TXT record like below:
Please deploy a DNS TXT record under the name
_acme-challenge.Mydomain.com with the following value:
abcdefghijklmXXXXXXXXXX
In your DNS management add TXT
record with the provided name (_acme-challenge.MYdomain.com
) and value
.
Wait for the DNS records to propagate it takes time and press enter
in certbot terminal to continue after you add the DNS TXT record.
Once verified the record it issues the certificate successfully like below:
Waiting for verification... Cleaning up challenges
IMPORTANT NOTES:
Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/cert.xxxxx/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/cert.xxxxprivkey.pem Your cert will expire on . To obtain a new or tweaked version of this certificate in the future, simply run certbot again. To non-interactively renew *all* of your certificates, run "certbot renew"
- Your account credentials have been saved in your Certbot configuration directory at /etc/letsencrypt. You should make a secure backup of this folder now. This configuration directory will also contain certificates and private keys obtained by Certbot so making regular backups of this folder is ideal