Focus on cloud service provider activities
Notes on website operation and maintenance

Record Oneinstack One click environment cannot update Let's Encrypt certificate Solution

It is really convenient to add SSL certificates for website projects nowadays. For example, there are many certificate applications that are free for one year, even if they are purchased for a fee, it is only a few tens of yuan a year. Or when we use LNMP, Oneinstack, pagoda panel and other one button package environments, we can see that they are automatically installed by one button Let's Encrypt The certificate is free of charge, and it supports automatic renewal by default (because the certificate needs to be renewed after 90 days).

However, in some cases, the Oneinstack one key package used by a netizen today is automatically configured Let's Encrypt The certificate is not automatically renewed 30 days before expiration. Sometimes Lao Zuo has met this problem before without automatic update, and then manually input the update script to update the renewal.

 Record Oneinstack One click environment cannot update Let's Encrypt certificate Solution

You can see that there is an error and the automatic renewal cannot be performed.

The following certs are not due for renewal yet:
/etc/letsencrypt/live/****/fullchain.pem (skipped)
No renewals were attempted.

The search for relevant solutions did not find the right one. Due to the limited time, we quickly found a stupid solution.

First, backup website

Here I directly package the files in the root directory of the website, and then drag them to the local and other sites and servers for backup. If we are worried about data and system problems, we can also back up the database.

Second, clean up the existing certificate files

/etc/letsencrypt

In this directory, manually delete the site folders in several directories.

 Clean the existing certificate file

Third, delete the site

./vhost.sh del

Here is the Oneinstack one click package. We can delete the site, including the directory, because we have all backed up (you have to make sure that the backup is true), so we can delete it.

Fourth, recreate the site

./vhost.sh

To recreate the site, of course, you need to choose to automatically install the Let's Encryption certificate.

Fifth, migration data recovery

We will migrate the backed up data to the added site directory. Since I have not moved the database, the migration package decompression and adjustment directory can be opened normally, and you can see that the certificates are up to date.

 Migration data recovery

In this way, the problem will be solved in a stupid way. The author has consulted the oneinstack script author and mentioned that it should be caused by a problem with the server connection certificate party, or the nginx configuration script has been modified. If there is a good solution in the future, it will be troublesome to add data manually every time.

Domain name host preferential information push QQ group: six hundred and twenty-seven million seven hundred and seventy-five thousand four hundred and seventy-seven Get preferential promotion from merchants.
Like( zero )
Do not reprint without permission: Lao Zuo's Notes » Record Oneinstack One click environment cannot update Let's Encrypt certificate Solution


Scan the code to follow the official account

Get more news about webmaster circle!
Entrepreneurship, operation and new knowledge