Remote API: create-domain with Letsencrypt cert?

Hi, I have search docs and forum but cant find anything that says this is possible:
When creating a domain with remote API (or even from cli on server) is it possible to auto generate a Letsencrypt cert?
Or is there even a separate api call to setup letsencrypt on a domain that I havent found?

Thanks as always

l.

Hi,

Yes, this can and recommended to be enabled by default on System Settings/Virtualmin Configuration page.

Thanks very much, that’ll work - I’ve been using virtualmin since 2007 and still learning!

Can I also ask if there’s a solution to the other question I asked:

Yes,

root@debug-debian9-gpl:~# virtualmin generate-letsencrypt-cert
Missing --domain parameter

Requests and installs a Let's Encrypt cert for a virtual server.

virtualmin generate-letsencrypt-cert --domain name
                                    [--host hostname]*
                                    [--default-hosts]
                                    [--renew months]
                                    [--size bits]
                                    [--staging]
                                    [--check-first | --validate-first]
                                    [--web | --dns]

root@debug-debian9-gpl:~# virtualmin help generate-letsencrypt-cert

generate-letsencrypt-cert.pl
    Requests and installs a Let's Encrypt cert for a virtual server.

    The server must be specified with the "--domain" flag, followed by a
    domain name. By default the certificate will be the for either previously
    used hostnames for Let's Encrypt, or the default SSL hostnames for the
    domain. However, you can specify an alternate list of hostnames with the
    "--host" flag, which can be given multiple times. Or you can force use of
    the default SSL hostname list with "--default-hosts".

    If the optional "--renew" flag is given, automatic renewal will be
    configured for the specified number of months in the future.

    To have Virtualmin attempt to verify external Internet connectivity to
    your domain before requesting the certificate, use the "--check-first"
    flag. This will detect common errors before your Let's Encrypt service
    quota is consumed.

    To have Virtualmin perform a local validation check of the domain, use the
    "--validate-first" flag. This is automatically enabled when
    "--check-first" is set.

1 Like

cool, thanks very much

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