I’m developing a virtual store platform. And stores will be created automatically. Once created the client will direct DNS to my amazon server. And I need to create a routine for certificates to be created automatically. I thought about creating a shell script. But I do not know how I would do that.

summing up:

I need to dynamically create certificates. for example: every day at night I run a command to create the requested certificates during the day. What is the best way to do this?

If you read the Certbot documentation or run certbot --help, you’ll see that all of the interactive features of Certbot can also be used non-interactively, so that you specify all of the information on the command line (like -d to specify a domain name that the certificate should cover, for instance).

If Certbot doesn’t meet your needs, then you can try any of these other clients or libraries:

Last updated: September 20, 2018 | See all Documentation
Let’s Encrypt uses the ACME protocol to verify that you control a given domain name and to issue you a certificate. To get a Let’s Encrypt certificate, you’ll need to choose a piece of ACME...

Many of them are specifically oriented toward scripting integration. (Certbot is a little more oriented toward interactive use, but many people still happily use it from scripts!)