dietpi-letsencrypt Auto renew?

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
fleaplc
Posts: 14
Joined: Tue Oct 25, 2016 1:23 pm

dietpi-letsencrypt Auto renew?

Post 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?
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: dietpi-letsencrypt Auto renew?

Post 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
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
fleaplc
Posts: 14
Joined: Tue Oct 25, 2016 1:23 pm

Re: dietpi-letsencrypt Auto renew?

Post 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
User avatar
Fourdee
Site Admin
Posts: 2788
Joined: Tue Feb 06, 2007 1:36 pm

Re: dietpi-letsencrypt Auto renew?

Post 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
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
fleaplc
Posts: 14
Joined: Tue Oct 25, 2016 1:23 pm

Re: dietpi-letsencrypt Auto renew?

Post 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!
ThAr
Posts: 2
Joined: Mon Aug 05, 2019 11:06 pm

Re: dietpi-letsencrypt Auto renew?

Post 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
User avatar
MichaIng
Site Admin
Posts: 2259
Joined: Sat Nov 18, 2017 6:21 pm

Re: dietpi-letsencrypt Auto renew?

Post 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
baz123
Posts: 166
Joined: Thu Jan 12, 2017 9:23 pm

Re: dietpi-letsencrypt Auto renew?

Post 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.
ThAr
Posts: 2
Joined: Mon Aug 05, 2019 11:06 pm

Re: dietpi-letsencrypt Auto renew?

Post by ThAr »

@MichaIng @baz123

Thank you very much!
Post Reply