• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

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