Cron job for certificate renewal
I have successfully installed SAN as well as wildcard SSL certificate for my domain as root user following this site (https://github.com/acmesh-official/acme.sh/blob/master/README.md).
The problem is that every time I have to manually renew the certificates.
I have created a cron job using command crontab –e from root folder as a root user.
My entry is as bellow:
0 0 * * */root/.acme.sh/ acme.sh --renew -d mydomain.con --force && /root/ systemctl restart nginx && echo "SSL certigicate renewed at $(date )" >> /root/ sslrenewalhistory.txt;
But this is not working. I don’t know where I am wrong.
Please upgrade to the latest code and try again first. Maybe it's already fixed. acme.sh --upgrade If it's still not working, please provide the log with --debug 2, otherwise, nobody can help you.
Typically acme.sh should install a cronjob to the executing user, and it's also documented in the README.md file.
0 0 * * * "/home/user/.acme.sh"/acme.sh --cron --home "/home/user/.acme.sh" > /dev/null
Have you tried to run acme.sh --cron manually and check its output?
Edit: didn't realize this is a two months old thread. Hopefully you found a solution or it might be the right time to process the new renewal
please use the default cronjob:
acme.sh --installcronjob