Renewal example


#1

Hello.

Standart automated renewal example with nginx is really bad.

service nginx stop  # or whatever your webserver is
if ! /path/to/letsencrypt-auto renew -nvv --standalone > /var/log/letsencrypt/renew.log 2>&1 ; then
    echo Automated renewal failed:
    cat /var/log/letsencrypt/renew.log
    exit 1
fi
service nginx start # or whatever your webserver is

It will not start service if renewal failed.


#2

Thanks! This is good feedback. @pde, @bmw, could one of you update the instructions at https://letsencrypt.org/getting-started/ under “Writing your own renewal script,” now that we have official support for renewal?


#3

Doesn’t nginx have a reload method by the way? Stopping and starting is sooo 2015 IMHO… :slightly_smiling:


#4

The examples above are for standalone mode, which requires Nginx to actually be down. Another reason to replace them with examples using letsencrypt renew, which uses reload.