How to create certificates dynamically

My domain is: dynamic
My web server is (include version): aws.amazon.com
The operating system my web server runs on is (include version): ubuntu 16.04
I can login to a root shell on my machine: yes

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?

Hi @renatosistemasvc

there are millions of options. Your know how, the clients you use. Create your own client. Who collects the domains daily? ...

the client will register the domain in my database. and in my nginx there is a wildcard vhost that directs all domains to the public folder. I do not have the knowledge to create a client of my own.

Is there a client that I can easily create using a shell script?

I installed certbot on my server. But I wanted something that was already automatic.

Hi @JuergenAuer
Do you know if certbot has any commands for me to create a certificate directly.

example: certbot --nginx www.domain.com

That way I could create a shell script to execute the command with all the domains registered in the database.

There is a -domains - option:

https://certbot.eff.org/docs/using.html

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:

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!)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.