TLS Certificate Auto-Renewal

FYI- Let’s Encrypt limit is 5 certificates for a given domain over a 7 day period.

Have you been able to diagnose why the certificates that are issued aren’t being saved?

You could try diagnosing by switching to the Let’s Encrypt staging server. To do so, edit management/ssl_certificates.py and modify the two places that client.issue_certificate is called – in my checkout of 0.21b the functions are called on line 332 and on line 351.

They should look something like this:

                                cert = client.issue_certificate(              
                                        domain_list,                          
                                        account_path,                         
                                        agree_to_tos_url=agree_to_tos_url,    
                                        private_key=private_key,              
                                        logger=my_logger)                     

You’d want to add a new acme_server argument:

                                cert = client.issue_certificate(              
                                        domain_list,                          
                                        account_path,
                                        acme_server=client.LETSENCRYPT_STAGING_SERVER,                         
                                        agree_to_tos_url=agree_to_tos_url,    
                                        private_key=private_key,              
                                        logger=my_logger)                     

Then try running ./management/ssl_certificates.py again and see if you can determine why the updated certificates aren’t being saved.

Once you’re done, you can reset that file back to the clean state:

$ git checkout -- ./management/ssl_certificates.py