Server TLS certificate.

fbarajas

New member
Joined
Nov 12, 2025
Messages
2
Hi, I'm a complete newbie in Directadmin (I come from a cPanel backgroud). How can I fix the Server TLS certificate?

I'm getting this error: "x509: certificate is valid for localhost, not servidor.dametuip.com".

Of course, the certificate shows as "not trusted".

I'd like to use a free (letsencrypt or similar) certificate.

Thanks!
 
Hello,

Run as user:

Bash:
/usr/local/directadmin/scripts/hostname.sh servidor.dametuip.com
/usr/local/directadmin/scripts/letsencrypt.sh server_cert servidor.dametuip.com

replace servidor.dametuip.com with a real hostname, in case you masked it here.
 
Last edited:
navigate to:

https://[your-domain]:2222/evo/admin/server-tls

1762952938052.png



Options are here.
 
Thanks! It's working now. The correct second line should be:

/usr/local/directadmin/scripts/letsencrypt.sh server_cert servidor.dametuip.com
 
/usr/local/directadmin/scripts/letsencrypt.sh server_cert servidor.dametuip.com
and
/usr/local/directadmin/scripts/letsencrypt.sh server_cert servidor.dametuip.com

Normally no need to replace, just use /usr/local/directadmin/scripts/letsencrypt.sh server_cert which is the correct command according to the docs and the script will autodetect the correct hostname which is provided to DA. Will prevent typo's too.
Code:
 grep -Fvx "$(da config-get servername)"
provided you pasted the correct hostname to DA. ;)
 
grep -Fvx "$(da config-get servername)"

What is this command for? It does not return anything on my end, as it expects an input from a user

I guess you wanted to show that the hostname is autodetected in the script. In this case the correct line is 349 from the script:

Bash:
DA_HOSTNAME=$(da config-get servername)

In any case it has no any difference for solving the issue
 
Last edited:
In any case it has no any difference for solving the issue
I had the wrong line, but that it has no difference to the solution was not my intend to write it.

As sais, this is the reason for my writing that line.
the script will autodetect the correct hostname which is provided to DA. Will prevent typo's too.
Easier/shorter and prevents typo's.
 
Back
Top