How to create Let’s Encrypt certificate in DirectAdmin

1. Connect to the server via SSH

ssh root@IP_Adress -p Port_number

2. Run the following command to ensure that all installed packages are up to date:

yum -y update

3. To install the latest version of the Let’s Encrypt script, enter:

cd /usr/local/directadmin/custombuild/

./build clean all

./build update

./build letsencrypt

And make changes to the config files:

./build rewrite_confs

3. After the update is complete, open the DirectAdmin configuration file directadmin.conf and enable the Let’s Encrypt option by adding or changing the following line:

nano /usr/local/directadmin/conf/directadmin.conf




letsencrypt=1

4. To enable SNI in DirectAdmin add/change the line:

enable_ssl_sni=1

5. Save the file and restart DirectAdmin to apply changes:

echo "action=directadmin&value=restart" >> /usr/local/directadmin/data/task.queue; /usr/local/directadmin/dataskq d2000

6. Log in to your control panel at https://yourdomain:2222 with your username.

Go to SSL Certificates under Advanced Features.

how-to-create-lets-encrypt-certificate-in-directadmin

If you've enabled Let's Encrypt correctly, you will see the Free&automatic certificate from Let’s Encrypt option. Check the box next to Let’s Encrypt and enter all the required details for your domain below.

how-to-create-lets-encrypt-certificate-in-directadmin1

Then click the Save button and the free Let's Encrypt SSL certificate will be installed automatically. Let’s Encrypt certificates are valid for 90 days and DirectAdmin will automatically renew the certificate after 85 days.

Restart the web server for the changes to take effect:

systemctl restart httpd

If you have an Nginx web server, run the following command:

systemctl restart nginx

 If you have any questions, please create a ticket to technical support.