1. Install & run Certbot docker:

// all command below needs root privilege
$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sh get-docker.sh
$ service docker start

// Replace example.com with your domain
$ sudo docker run -it --rm --name certbot -v "/etc/letsencrypt:/etc/letsencrypt" -v "/var/lib/letsencrypt:/var/lib/letsencrypt" certbot/certbot -d *.example.com -d example.com --server https://acme-v02.api.letsencrypt.org/directory --preferred-challenges dns --manual certonly

2. Configuration steps:

  1. Console message: Are you OK with your IP being logged?
  2. Enter Y
  3. Console message: Please deploy a DNS TXT record under the name
    _acme-challenge.example.com with the following value:
    a_random_value_generated
  4. Add a TXT record for your domain using DNS management
    Domain: _acme-challenge.example.com
    Value: a_random_value_generated
  5. Wait 30 sec, then ENTER
  6. IF SUCCESS then it will show this console message:
    IMPORTANT NOTES:
    – Congratulations! Your certificate and chain have been saved at:
    /etc/letsencrypt/live/example.com/fullchain.pem

Please note that it only generates the cert files so you must manually configure Apache/Nginx.

 

0 0 votes
Article Rating