Control Web Panel

WebPanel => SSL => Topic started by: seco on June 13, 2017, 08:13:33 AM

Title: autorenew ssl is enabled yet my certificates will expired after 6 days
Post by: seco on June 13, 2017, 08:13:33 AM
Hi
My SSL certificate was renewed automatically, now I have 6 days remaining and still, it did not auto-renewed.
I checked the Letsencrypt Manager, I found this message NOT IN USE ANYMORE, PLEASE USE c and AutoSSL
I went to the SSL Cert Manager and found nothing regarding the auto renew !!
I think I will force renew this time, but what about the next times?
how to auto renew the certificate one month before expired?
Thank in advance.
Title: Re: autorenew ssl is enabled yet my certificates will expired after 6 days
Post by: Sandeep on June 13, 2017, 09:07:49 AM
uninstall LE manager an use auto ssl

auto ssl create a cron job for auto renew of ssl certs
Title: Re: autorenew ssl is enabled yet my certificates will expired after 6 days
Post by: seco on June 13, 2017, 04:17:20 PM
sorry how to uninstall LE manager?
Title: Re: autorenew ssl is enabled yet my certificates will expired after 6 days
Post by: 6Sense on June 30, 2017, 01:29:52 PM
I'm using AutoSSL for my SSLs (LetsEncrypt is unistalled) but they are not auto updating and are now less than 30 days till expiring.

The cron job is there (15 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null) but it doesn't seem to have any effect. I can see the SSLs in the SSL vHost Manager & they work but if i run
Code: [Select]
acme.sh --list 
I get a blank output list
Code: [Select]
Main_Domain  KeyLength  SAN_Domains  Created  Renew
I've also tried to force renew them using
Code: [Select]
acme.sh --renew -d mydomain.com.au --force
which returns
Code: [Select]
'mydomain.com.au' is not a issued domain, skip.
I want the SSL's to auto update themselves but I'm not sure how to progress.

Title: Re: autorenew ssl is enabled yet my certificates will expired after 6 days
Post by: cockers on July 13, 2017, 02:10:44 PM
Hi Guys,

I have the same problem as 6sense. I can't get it to renew any certificates even with LE Manager uninstalled? I have this cron job 46 0 * * * "/root/.acme.sh"/acme.sh --cron --home "/root/.acme.sh" > /dev/null but nothing is happening and I have 10 days left before doom on a couple of domains :( Any help would be much appreciated because I'm stumped.

Cheers, Mark
Title: Re: autorenew ssl is enabled yet my certificates will expired after 6 days
Post by: seco on July 13, 2017, 04:48:08 PM
Nobody is answering here
Title: Re: autorenew ssl is enabled yet my certificates will expired after 6 days
Post by: cockers on July 13, 2017, 06:37:36 PM
That's a shame. Did you get it fixed your end seco?
Title: Re: autorenew ssl is enabled yet my certificates will expired after 6 days
Post by: seco on July 13, 2017, 07:10:08 PM
Nop !!
Title: Re: autorenew ssl is enabled yet my certificates will expired after 6 days
Post by: 6Sense on July 15, 2017, 11:15:52 AM
Yep I'm in the same boat. I think the AutoSSL installs the certs in a different folder than acme.sh (eg: the cron job is pointed at) is expecting it to be in.

Thus we'll need an admin to have a look and provide a fix.
Title: Re: autorenew ssl is enabled yet my certificates will expired after 6 days
Post by: cockers on July 15, 2017, 02:42:46 PM
Oh, is this the end of CWP? That's a shame :(
Title: Re: autorenew ssl is enabled yet my certificates will expired after 6 days
Post by: 6Sense on July 16, 2017, 05:52:59 AM
You can manually delete the SSL cert and re-create it via the SSL manager which is a work around for now.

Obviously it would be much better if we could have the auto renew working correctly in the near future  ;)
Title: Re: autorenew ssl is enabled yet my certificates will expired after 6 days
Post by: 6Sense on July 19, 2017, 07:42:15 AM
OK so given that my SSL certs were soon to expire and were yet to auto renew I took a look & developed a work around. It seems that the SSL's weren't set up using acme.sh which is what runs the auto renew cron job.

To fix this we need to firstly issue the certs using acme.sh & then install them into our default cert folders. They should then auto renew for us via the cron job when less than 30 days.

Instructions:
Code: [Select]
acme.sh  --issue  -d your-domain.com -w /home/folder-name/public_html
Code: [Select]
acme.sh --install-cert -d your-domain.com --cert-file /etc/pki/tls/certs/your-domain.com.cert --key-file  /etc/pki/tls/private/your-domain.com.key --fullchain-file /etc/pki/tls/certs/your-domain.com.bundle
Code: [Select]
acme.sh --install-cronjob
Code: [Select]
acme.sh --cron
You should now have successfully set up CWP/CentOS to auto renew all your SSL's via the cron job. The below image illustrates that the cron job auto renewed them on my server at 04:51:00.

(https://6sense.com.au/wp-content/uploads/2017/07/ssl-certs.jpg)

Hoping this helps someone faced with the same issue and be nice if our admins sees and incorporates a fix in CWP  :)

Some tips:

- If you receive an (Accessing .well-known/acme-challenge/...) error, delete and recreate the .well-known folder ensuring it has the right permissions.
- If you need to do more than 5 auths or issues on the same domain while you're sorting something out include (--staging) in the command to prevent getting locked out after 5 attempts (this points the request to the Let's Encrypt sandbox).

***Please note: This work around is good with both my servers (CWP6 & CWP7) however as SSL failures can result in complete loss of site access  I strongly advise you to have a working backup that you can simply revert back to if it's not right for you.
Title: Re: autorenew ssl is enabled yet my certificates will expired after 6 days
Post by: cockers on July 19, 2017, 07:03:30 PM
6Sense, you are a legend!! Thank you so much for sharing those instructions, you've helped me to squeeze out of a bit of a tight spot there :)
Title: Re: autorenew ssl is enabled yet my certificates will expired after 6 days
Post by: studio4host on August 09, 2017, 10:34:45 AM
forced renewal of all certs can be done with this command:
Code: [Select]
/root/.acme.sh/acme.sh --home /root/.acme.sh/cwp_certs --cron --force
or single domain
Code: [Select]
/root/.acme.sh/acme.sh --home /root/.acme.sh/cwp_certs --renew -d www.domain.com --force