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 12:23 pm

dietpi-letsencrypt Auto renew?

Post by fleaplc » Mon Jan 23, 2017 9:25 am

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: 2789
Joined: Tue Feb 06, 2007 12:36 pm

Re: dietpi-letsencrypt Auto renew?

Post by Fourdee » Mon Jan 23, 2017 12:27 pm

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 and Bitcoin.

fleaplc
Posts: 14
Joined: Tue Oct 25, 2016 12:23 pm

Re: dietpi-letsencrypt Auto renew?

Post by fleaplc » Mon Jan 23, 2017 1:55 pm

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: 2789
Joined: Tue Feb 06, 2007 12:36 pm

Re: dietpi-letsencrypt Auto renew?

Post by Fourdee » Mon Jan 23, 2017 5:10 pm

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 and Bitcoin.

fleaplc
Posts: 14
Joined: Tue Oct 25, 2016 12:23 pm

Re: dietpi-letsencrypt Auto renew?

Post by fleaplc » Tue Jan 24, 2017 7:15 am

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 10:06 pm

Re: dietpi-letsencrypt Auto renew?

Post by ThAr » Mon Aug 05, 2019 10:11 pm

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: 1871
Joined: Sat Nov 18, 2017 5:21 pm

Re: dietpi-letsencrypt Auto renew?

Post by MichaIng » Sat Aug 10, 2019 6:01 pm

@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: 119
Joined: Thu Jan 12, 2017 8:23 pm

Re: dietpi-letsencrypt Auto renew?

Post by baz123 » Sun Aug 11, 2019 1:02 pm

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 10:06 pm

Re: dietpi-letsencrypt Auto renew?

Post by ThAr » Tue Aug 13, 2019 4:44 pm

@MichaIng @baz123

Thank you very much!

Post Reply