acme.sh icon indicating copy to clipboard operation
acme.sh copied to clipboard

Localhost deploy hook mimicking certbot behavior.

Open Github-Citizen opened this issue 3 years ago • 3 comments

Deploys cert files to centralized cert directory mimicking certbot behavior, allowing multiple services to share certs.

Github-Citizen avatar Aug 06 '22 15:08 Github-Citizen

why not use the --install-cert command instead ?

https://github.com/acmesh-official/acme.sh#3-install-the-cert-to-apachenginx-etc

Neilpang avatar Aug 06 '22 15:08 Neilpang

why not use the --install-cert command instead ? https://github.com/acmesh-official/acme.sh#3-install-the-cert-to-apachenginx-etc

Because using --install-cert requires hard coding four full paths for each cert. If you are setting up multiple domains you have then change the paths for each domain needing lots of manual editing.

The localhost hook does not require manual editing per certificate/domain. You just set the root path once when you install acme.sh, for example /etc/letsencrypt/live, and not have to worry about it anymore or change it when you issue new certs. Just like certbot it will auto create sub-directories for each domain and place the certificates accordingly. For example:

/etc/letsencrypt/live/example.com/*.pem
/etc/letsencrypt/live/domain.com/*.pem

No skin off my back if no one wants to use this, i can just save it for myself and drop it in. I was just sharing with the community because i assumed there must be others like me who use certs for multiple services such as httpd, postfix, dovecot and i didn't want to manually man-handle multiple certs for multiple services.

Github-Citizen avatar Aug 06 '22 17:08 Github-Citizen

just copying the certs is ok, but there is no way to restart/reload the services when the cert is renewed.

The install-cert has a --reload-cmd to restart all the services.

Anyway, please fix the ci checks first. we will see who need this.

Neilpang avatar Aug 07 '22 02:08 Neilpang