change the acme.sh install home to a persistent location

master
florid2 2017-06-28 22:20:25 +10:00
parent 15f9010fee
commit 11aad0d432
1 changed files with 9 additions and 10 deletions

@ -14,25 +14,24 @@ I've used https://github.com/Neilpang/acme.sh which is a 3rd party client for Le
I've also used it with the DNS-01 protocol, which means, I don't have any ports open on the router to do the validation, instead it uses the [Cloudflare API](https://api.cloudflare.com/), where I host my domain. I've also used it with the DNS-01 protocol, which means, I don't have any ports open on the router to do the validation, instead it uses the [Cloudflare API](https://api.cloudflare.com/), where I host my domain.
Install: Install acme.sh manually.
``` ```
$ export FORCE=1 $ wget https://github.com/Neilpang/acme.sh/archive/master.tar.gz
$ wget -O - https://get.acme.sh | sh $ tar xvf master.tar.gz
$ cd acme.sh-master/
$ ./acme.sh --install --nocron --home /usr/local/sbin/acme.sh
``` ```
It will ask you to logout and login back again.
so install is done :) so install is done :)
It will ask you to logout and login back again, to set shell settings.
next step is to do the configuration: next step is to do the configuration:
``` ```
$ cd ~/.acme.sh/ $ cd /usr/local/sbin/acme.sh
``` ```
set your email, cloudflare account and API (https://www.cloudflare.com/a/account/my-account) set your email, cloudflare account and API (https://www.cloudflare.com/a/account/my-account)
``` ```
@ -67,7 +66,7 @@ Configure crontab for root
Add the following line to the crontab. Remember to use tab for spacing. Add the following line to the crontab. Remember to use tab for spacing.
For example, 10:00 am of the 2nd day every month run the cronjob to check if due to renew the certificates (You can modify the cronjob schedule according to your needs) For example, 10:00 am of the 2nd day every month run the cronjob to check if due to renew the certificates (You can modify the cronjob schedule according to your needs)
`0 10 2 * * root /root/.acme.sh/acme.sh --cron --home /root/.acme.sh/` `0 10 2 * * root /usr/local/sbin/acme.sh/acme.sh --cron --home /usr/local/sbin/acme.sh/`
The last step is to setup a schedule task to copy renewed certificates in cert library to system default directory and restart the Nginx service. The last step is to setup a schedule task to copy renewed certificates in cert library to system default directory and restart the Nginx service.