Install SSL Certificate for DirectAdmin hostname

To install an SSL Certificate for your DirectAdmin hostname using Let’s Encrypt, you can execute the following commands:

cd /usr/local/directadmin/scripts
./ request_single 4096

Please do keep in mind to change to your own hostname. The above commands will also install the certificate for Dovecot, Exim, FTP etc.

We now need to tell DirectAdmin to force the hostname for SSL, as well as use the carootcert. You can do so by executing the following commands:

cd /usr/local/directadmin
./directadmin set SSL 1
./directadmin set carootcert /usr/local/directadmin/conf/carootcert.pem
./directadmin set force_hostname
./directadmin set ssl_redirect_host
service directadmin restart

Leave a Reply

Your email address will not be published. Required fields are marked *