lesaff / serverpilot-letsencrypt

(NO LONGER MAINTAINED) | Bash script to generate and install Let's Encrypt certificate for your websites on your ServerPilot account (Free or Paid Plan)
MIT License
346 stars 84 forks source link

The certifications are do not renew automatic. #76

Open mikaeakerlund opened 6 years ago

mikaeakerlund commented 6 years ago

I have two servers with same problem. Im using the cronjob as in the description. But every third month i need to restart the server to get the certification to renew. Anyone else with this problem that can help me found a solution?

codethirteen commented 5 years ago

I've been having the same issue for a few weeks on two seperate servers running Ubuntu 16.04 as well. The script runs nightly but returns a not-needed message:

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

The quick and dirty fix is to add --force to the renew command. So in crontab you'll have something like:

For Ubuntu 16.04 and 18.04

0 */12 * * * letsencrypt renew --force && service nginx-sp reload