Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Letsencrypt auto renewal instructions do not work on centos 7 #478

Closed
Laurelai opened this issue Dec 9, 2017 · 8 comments
Closed

Letsencrypt auto renewal instructions do not work on centos 7 #478

Laurelai opened this issue Dec 9, 2017 · 8 comments

Comments

@Laurelai
Copy link

Laurelai commented Dec 9, 2017

The commands put in the cron job
"#!/usr/bin/env bash
letsencrypt renew
systemctl reload nginx"

Do not work as the script will fail to renew when nginx is running.

Should be
#!/usr/bin/env bash
letsencrypt renew --pre-hook "service nginx stop" --post-hook "service nginx start"

@coreyreichle
Copy link

This might be an upstream bug, as you should be able to renew with nginx running, and just affecting a reload after completion (To prevent downtime).

@Laurelai
Copy link
Author

Regardless centos 7 users should be made aware that the given cron job will not function as it would on other distros within the documentation until its fixed.

@coreyreichle
Copy link

Pull request waiting approval.

@nightpool
Copy link
Member

nightpool commented Dec 10, 2017

@Laurelai can you describe the bug for us? I think it's likely that this is actually a problem with the way you originally set up certbot.

did you originally register using the standalone or webroot method?

@Laurelai
Copy link
Author

I dont remember.

@nightpool
Copy link
Member

you can check the renewal configuration file at /etc/letsencrypt/renewal/CERTNAME.

@Laurelai
Copy link
Author

Ah looks like it was standalone

@nightpool
Copy link
Member

Okay, closing the issue then since the production guide specifically specifies that you should use webroot to avoid this issue. You can reconfigure LE to use webroot by re-running the command from the production guide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants