Page 1 of 1

dietpi-letsencrypt Auto renew?

Posted: Mon Jan 23, 2017 10:25 am
by fleaplc
Hi all
I've configured the ssl using dietpi-letsencrypt on a domain. The ssl certificate renew should be automatically done according to this:
SSL1.jpg
But I received mail about ssl certificate expiring soon.. why? How to check / perform the ssl renew?

Re: dietpi-letsencrypt Auto renew?

Posted: Mon Jan 23, 2017 1:27 pm
by Fourdee
Hi,

DietPi creates a cron.monthly job for this:

Code: Select all

/etc/cron.monthly/dietpi-letsencrypt
Logs are generated at:

Code: Select all

/var/log/dietpi-letsencrypt.log
If you have DietPi-RAMlog mode 1, logs will be cleared every 1 hour.

You can check when cron.monthly will run with:

Code: Select all

dietpi-cron
You can force run a manual renew at any time with. If you run this, check for any errors and paste results please:

Code: Select all

/DietPi/dietpi/dietpi-letsencrypt 1

Re: dietpi-letsencrypt Auto renew?

Posted: Mon Jan 23, 2017 2:55 pm
by fleaplc
Thanks Fourdee! I run your code:

/DietPi/dietpi/dietpi-letsencrypt 1

and this is the result (it seems no renewal has been performed yet..why?)
SSL_Renew.jpg
now my certificates expires in 23 April 2017

Re: dietpi-letsencrypt Auto renew?

Posted: Mon Jan 23, 2017 6:10 pm
by Fourdee
fleaplc wrote:and this is the result (it seems no renewal has been performed yet..why?)
Looks fine, so in theory the cron.monthly job would succeed when its triggered.

When is your cron.monthly set to trigger?:

Code: Select all

dietpi-cron
And lets confirm the cron job exists:

Code: Select all

ls -lha /etc/cron.monthly/dietpi-letsencrypt

Re: dietpi-letsencrypt Auto renew?

Posted: Tue Jan 24, 2017 8:15 am
by fleaplc
Fine thanks, I did as you suggest and into the /etc/cron.monthly/dietpi-letsencrypt that what I see (should be correct)
24-01-2017 08-14-09.jpg
thanks again!

Re: dietpi-letsencrypt Auto renew?

Posted: Mon Aug 05, 2019 11:11 pm
by ThAr
Hello,

is autorenew gone in DietPi v6.25.3?
pic.jpg
I cannot find dietpi-letsencrypt in /etc/cron.monthly/

btw: great work :D

Re: dietpi-letsencrypt Auto renew?

Posted: Sat Aug 10, 2019 7:01 pm
by MichaIng
@ThAr
It is a fix part of CertBot so it is applied automatically. It is done not via cron job anymore but via systemd timer.
See: systemctl cat certbot.timer and systemctl cat certbot.service

Re: dietpi-letsencrypt Auto renew?

Posted: Sun Aug 11, 2019 2:02 pm
by baz123

Code: Select all

systemctl list-timers
will show you the active times and when they last fired.

Code: Select all

certbot renew
will attempt the renewal manually, but will only renew if it needs it. If there are errors you will see them.

Re: dietpi-letsencrypt Auto renew?

Posted: Tue Aug 13, 2019 5:44 pm
by ThAr
@MichaIng @baz123

Thank you very much!