Generate a cert having two domains and also using CSR

Need to generate a certificate from LE using certbot, which should support two domains and also will use the csr generated by our enterprise for the same

For instance
2 domains are - “” and “" (with and without wildcard "”)
CSR has the above 2 domains in it’s SAN List.

But when tried to generate the cert using the Certbot command:
certbot certonly --preferred-challenges dns --manual --manual-auth-hook <pre_hook_script>
–server <local_boulder_server> -d “” --csr <path_to_csr_file>
–register-unsafely-without-email --manual-public-ip-logging-ok --agree-tos

Noticed the following Error:
certbot [SUBCOMMAND] [options] [-d DOMAIN] [-d DOMAIN] …

Certbot can obtain and install HTTPS/TLS/SSL certificates. By default,
it will attempt to use a webserver both for obtaining and installing the
certbot: error: unrecognized arguments: /etc/letsencrypt/live/csr.pem

Can you please help in resolving the same. Blocked at this point. Thanks in advance.

1 Like

Hi @sdivyareddy216

if Certbot answers with such a message,

your command is wrong.

So share your complete command.

May be a typo or a problem of that forum software:


is wrong, must be


You must use DNS authentication for WildCard cert.
And I do see that you are trying to do that… but without sharing the actual command you typed, it is nearly impossible to guess what is typed incorrectly.

1 Like

@JuergenAuer may be right:

[one single wide character]

doesn't equal "--"
[two dashes]

1 Like

Sorry, it was a typo here.

Sorry, it was a typo here, but in general i’m trying to do with double hypen

Use ``` to start a new row, then the code, then a second row with these three accents.

hi @JuergenAuer, I actually use subprocess from python to run certbot command["certbot", "certonly", "--preferred-challenges",
                                       "dns", "--manual", "--manual-auth-hook", <path to prehook>,
                                       "--server", <local boulder server>,
                                       "-d", ""
                                       "--csr", <path to csr>, "--register-unsafely-without-email",
                                       "--manual-public-ip-logging-ok", "--agree-tos"])
1 Like

There's no comma after "", so Python combines the string literals into "".


Thanks @mnordhoff, it worked.


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