Letsencrypt auto renew?

Dear QB.

I just received an email today from LE that my cert will expire in 19 days.
I got the certificate installed by Bate :slight_smile: , but how in the world do I renew it? :slight_smile:

Cheers

Morphy

It auto-renews on the date of expiration. There is a cron entry within your crontab and you can check it with crontab -e.

Nope I checked… nothing in crontab -e

If you used the Wiki here at QuickBox, or you used box install letsencrypt, there most certainly should be a cron entry, unless it was manually removed. Are you checking your crontab as your user, or as root? It’s in the root users crontab -e

I will check as root - but as I recall its empty . I got Bate to install it from QB :slight_smile:

Yes, please do check, as once more - Our installer does place a cronjob in the form of acme.sh

Just rebooted my server ( the system said it required a restart ) .

Logged in as root, but crontab -e is empty

Well, we’ll need to know if @bate setup your certs via the Wiki or with the builtin installer, which I bet he used the builtin. Interesting there is nothing in your crontab as it is added by the installer, I just ran a test and it adds. You can add the cron by running the command below:

line="30 2 * * 1 "~/acme.sh"/acme.sh --cron --home "~/acme.sh" > /dev/null"
(crontab -u root -l; echo "$line" ) | crontab -u root -

is it two lines i have to enter as root ?
Or just 1?

line=“30 2 * * 1 “~/acme.sh”/acme.sh --cron --home “~/acme.sh” > /dev/null” (crontab -u root -l; echo “$line” ) | crontab -u root -

I’ll make this simpler. The above is intended to be used as a command to add it to the file for you… not within the crontab.

Just add this line to crontab -e

"30 2 * * 1 "~/acme.sh"/acme.sh --cron --home "~/acme.sh" > /dev/null"

DevilBox:/home# crontab -e
no crontab for root - using an empty one
crontab: installing new crontab
"/tmp/crontab.6hE5OD/crontab":22: bad minute
errors in crontab file, can’t install.
Do you want to retry the same edit? (y/n)

Sorry, remove the quotes…

30 2 * * 1 "~/acme.sh"/acme.sh cron home "~/acme.sh" > /dev/null

added and rebooting brb :slight_smile:

There’s really no need to reboot after adding the cron entry :wink:

Oh well … :slight_smile: can’t stop it now :stuck_out_tongue: heheheh

This was installed using box install letsencrypt
Is your sudo crontab -e completely empty?

Yep … but now I added the line as JMsolo showed me.

Crontab -e usually holds

# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h  dom mon dow   command

ahh well that info was there but not the cronjob :slight_smile: