LetsEncrypt from the command line?

How to perform the LetsEncrypt process, for individual domains, from the command line?

Run the ssl_certificates.py script which is located in the management directory of your mailinabox install. This script will check all domains and renew as necessary. I do not know if MiaB is written in such a way to manually process a specific domain from the command line.

1 Like

I don’t need to renew. I need to perform initial provisioning.

Can we get JoshData to chime in here, please?

Try @alento’s suggestion. Run management/ssl_certificates.py at the command-line and post what happens. Thanks.

1 Like

Here’s the result of running that:

./ssl_certificates.py
/usr/local/lib/mailinabox/env/lib/python3.4/site-packages/acme/jose/jwa.py:110: CryptographyDeprecationWarning: signer and verifier have been deprecated. Please use sign and verify instead.
signer = key.signer(self.padding, self.hash)
Traceback (most recent call last):
File “./ssl_certificates.py”, line 803, in
provision_certificates_cmdline()
File “./ssl_certificates.py”, line 446, in provision_certificates_cmdline
status = provision_certificates(env, agree_to_tos_url=agree_to_tos_url, logger=my_logger, force_domains=force_domains, show_extended_problems=show_extended_problems)
File “./ssl_certificates.py”, line 331, in provision_certificates
logger=my_logger)
File “/usr/local/lib/mailinabox/env/lib/python3.4/site-packages/free_tls_certificates/client.py”, line 64, in issue_certificate
agree_to_tos_url, validation_method, acme_server, logger)
File “/usr/local/lib/mailinabox/env/lib/python3.4/site-packages/free_tls_certificates/client.py”, line 121, in validate_domain_ownership
challg = submit_domain_validation(client, regr, account, challenges_file, domain, validation_method, logger)
File “/usr/local/lib/mailinabox/env/lib/python3.4/site-packages/free_tls_certificates/client.py”, line 433, in submit_domain_validation
message = '; '.join(c.error.detail for c in challg.challenges if c.status.name == “invalid”)
File “/usr/local/lib/mailinabox/env/lib/python3.4/site-packages/free_tls_certificates/client.py”, line 433, in
message = '; '.join(c.error.detail for c in challg.challenges if c.status.name == “invalid”)
AttributeError: ‘NoneType’ object has no attribute ‘detail’

Anyone? Any responses?

I had to do this after upgrading from 0.28 to 0.44. I also had to modify ssl_certificates.py to add the --agree-tos and -m me@example.com flags when certbot is run.