Ben Holness
Ben Holness

Reputation: 2707

Automating letsencrypt with a standard apache2 setup for new certificates

I run a service which allows users to create forms that have their own domain (e.g. http://userform1.myservice.com).

I would like to use letsencrypt to provide SSL for the forms, however there is (currently) no wildcard option.

I am familiar with letsencrypt and I already have www.myservice.com secured with it.

The setup is standard apache2. Originally, the default virtualhost handled the domains, however I have updated the code to create a conf file in /etc/apache2/sites-available and soft link it to /etc/apache2/sites-enabled for each user domain that is created.

Now I am trying to figure out how to automate the creation and installation of certificates, so that it can be done in real time when a user creates a new form.

Using certbot-auto -d userform1.myservice.com, the only question that gets asked interactively is whether to make it easy or secure (i.e. redirect http to https). Is there a way that I can specify this on the command line to make it completely non-interactive? Is there anything else I should do to ensure that there is no interactivity?

Upvotes: 0

Views: 113

Answers (1)

Jieter
Jieter

Reputation: 4229

The documentation for certbot-auto shows the command has a --non-interactive option:

  -n, --non-interactive, --noninteractive
                        Run without ever asking for user input. This may
                        require additional command line flags; the client will
                        try to explain which ones are required if it finds one
                        missing (default: False)

Upvotes: 2

Related Questions