Last Updated:

LetsEncrypt 400 account registration - Solved

I won't go into too much detail because this is an article aimed at system administrators and therefore at people who know what they are doing and who are able to understand the contents of this article and decide whether it is appropriate to apply these changes to servers.

In any case, please read the entire article before deciding whether it is appropriate to apply its contents to your server. At the time of writing this article, when updating vestacp, errors are encountered when generating and renewing certificates with letsencrypt.

Sometimes this happens because you have a cdn such as cloudflare, sometimes it occurs when the server is misconfigured. In our case, I found a way to bypass the problem which I explain below.

You have to install certbot (I will explain how to do this in another article) and then you have to type the command certbot, an automatic procedure will start where you are asked for the information needed to generate the certificate. Once the certificate has been generated, you will find the files with the extension pem inside the folder /etc/letsencrypt/live/nominio.tlc

Then open your control panel in vestacp, click on domains under the web category. Select edit next to your domain name and after checking the box for SSL support, open the files inside the folder /etc/letsencrypt/live/nominio.tlc

- The contents of the cert.pem file must be pasted into the SSL Certificate field then in the first box;

- The contents of the privkey.pem file must be pasted in the SSL Key field, i.e. in the second box;

- The contents of the chain.pem file must be pasted into the SSL Certificate Authority / Intermediate field.

At this point, if you have done everything correctly, you will find that no error message will be issued and that the certificates have been accepted perfectly.

This trick is especially useful in emergency cases where you want to avoid making a bad impression on customers or site users. For a definitive and professional solution, you should contact vestacp support.

It should also be pointed out that this solution is temporary because I have not indicated any method for automatically renewing the certificate. In reality, a script would be sufficient, but we will discuss this later in another article.

Remember that vestacp by default may create problems if you want to manually modify the files in the folder containing the apache or nginx configuration files. So if you want to set up an automatic script that can regenerate the certificate, remember that vestacp ‘s default settings do not favour reading directly into the /etc folder, so you will need to copy the files inside the /etc folder and then retrieve them from the configuration files.

I am not writing this in this article, because the insertion of certificate strings inside the appropriate boxes of vestacp is a standard operation contemplated by the developers of vestacp and therefore should not interfere too much with the operation of the server.