• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

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