Receive and update LET'S Encrypt certificates using dehydrated.

 

Getting free SSL certificate from Let's Encrypt and it the subsequent update with dehydrated is extremely simplified and requires only the instructions of the domain in configuration file.

 

 

Installation in the FreeBSD operating system is performed using the command:

 

pkg Install dehydrated

 

Dehydrated is also available in other BSD systems and GNU/Linux.

 

In file /usr/local/etc/dehydrated/domains.txt we register the domain names to get a SSL certificate.

 

For example, so:

 

Example.com www.example.com.

Example2.com www.example2.com test.example2.com

 

Create additional two directory where your website or sites are stored.

 

mkdir /var/www/htdocs/.well-known.

mkdir /var/www/htdocs/.well-known/acme-challenge.

 

In the configuration file /usr/local/etc/dehydrated/config, we view the correct way to the directory and register email for communications, the remaining parameters can be left by default:

 

WELLKNOWN="/var/www/htdocs/.well-known/acme-challenge"

CONTACT_EMAIL="example@examplemail.com"

 

 

For registration in Let's encrypt and receive free SSL certificate Follow the command:

 

dehydrated -c

 

 

If the verification has passed successfully, ready-made certificates will be saved to the catalog /var/lib/dehydrated/certs/example.com, /etc/dehydrated/certs/ depending on your system.

 

 

In case of repeated launch of "dehydrated -c", the period will be checked certificate actions and if until the end of its action remains less than 30 days update will be requested. To automate the maintenance of certificates, you can add "dehydrated -c" in Cron.