acme.sh icon indicating copy to clipboard operation
acme.sh copied to clipboard

Cron job for certificate renewal

Open Zeni241 opened this issue 1 year ago • 2 comments

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.

Zeni241 avatar Jul 05 '24 15:07 Zeni241

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.

github-actions[bot] avatar Jul 05 '24 15:07 github-actions[bot]

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

szhu25 avatar Aug 22 '24 05:08 szhu25

please use the default cronjob:

acme.sh  --installcronjob

Neilpang avatar Sep 13 '24 12:09 Neilpang