• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Let's Encrypt Saving New Certificates under different Name

smpnjn

New Pleskian
Hi there,

I am not sure if this is solvable, but I have a website encrypted with Let's Encrypt. I use these certificates somewhere else in my application (within the Javascript itself). My Let's Encrypt certificates go out of date about every 3 months, and every time the new certificate is named differently in the /usr/local/psa/var/modules/letsencrypt/etc/archive/ directory. So when I got the first one, it was privkey1.pem, and now I'm onto privkey9.pem.

Whenever this changes, I have to change my application so that the file name is correct. So for example, when privkey8.pem expired, I updated my application to use privkey9.pem. As you can imagine this is manual, and quite annoying to do.

I'd prefer if Let's Encrypt overwrote the previous key, so I only ever had one privkey.pem/fullchain.pem/chain.pem. Is this possible? I would've thought there was a setting somewhere to update how old certificates are dealt with.
 
You could simply use the automatically created symlink to the current certificate files. You'll find the symlinks here:
/usr/local/psa/var/modules/letsencrypt/etc/live/yourdomain.tld

In there, there is a symlink to /usr/local/psa/var/modules/letsencrypt/etc/archive/yourdomain.tld/fullchainXX.pem etc.
The name of the symlink never changes, so you won't have to do any manual work when a cert was renewed.
 
Back
Top