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
./letsencrypt.sh request_single your.hostname.nl 4096

Please do keep in mind to change your.hostname.nl 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 your.hostname.nl
./directadmin set ssl_redirect_host your.hostname.nl
service directadmin restart

Leave a Reply

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