EasyEngine v4 is packed in a Docker container and it does not create cronjob for automatic renewal of your SSL certificates.
They have also slightly changed the command for the SSL creation in ee v4.
First, update to the current version of EE
ee cli update
Then you need to create the cronjob at the host.
sudo ee cron create host --command=‘ee site ssl-renew --all’ --schedule=’@weekly’
This should do the trick.
However, if your certificate expires, the ee site ssl-renew /on/off commands will no longer work.
It could throw this error as well: SSL Renewal Error PHP Fatal error: Uncaught GuzzleHttp
What you need to do is to rename the certificates for the domain name at /opt/easyengine/services/nginx-proxy/certs
cd /opt/easyengine/services/nginx-proxy/certs
to find all the names of the certificates.
tip: renaming in linux is simply mv old.filename new.filename
Then run
ee site ssl-renew yoursite.com
and it should work.
Hi, may I know when will the SSL being renew? is it 1 day ahead before the certificate expires?
It depends on the certificate. With LetsEncrypt I think you can renew it if there are 30 days or less left until the expiry date. You can set up a cron job on the server to automate this.
I’ve added the cron job, but it doesn’t work even though it only lefts few days to expire. Is it because of the EE version? Currently my EE version is 4.0.14.
I was trying to renew using the cronjob command but here is the error showing up
Error: Too many positional arguments: site ssl-renew
Can you help me out how to proceed to create a cronjob?