Certbot can obtain and install HTTPS/TLS/SSL certificates. By default,
it will attempt to use a webserver both for obtaining and installing the
certificate. certbot: error: unrecognized arguments: diary.nspeaks.com
Nginx 1.17.7
OS: Ubuntu 18.04.3
My hosting provider is: Digitalocean
I can login to a root shell on my machine: yes
No control panel
The version of my client is: Certbot 0.31.0
I am trying to generate a wildcard domain but am getting errors.
that's not the error message of your command. diary isn't used in your command.
That output
happens if your command is incomplete or wrong. Looks like a missing -d flag.
But if you want to create a certificate with *.nspeaks.com, that certificate cant have the additional domain name diary.nspeaks.com`. A wildcard includes that.
You should add -d nspeaks.com, so your main domain is included.
@JuergenAuer That’s probably because the directory where he ran the command contains something with diary.nspeaks.com. Because the asterisk in the command isn’t escaped with quotes, Bash will expand the asterisk if it can find matches in the current directory.
In 99.99 % of the use of the asterisk on the command line with certbot it doesn’t present a problem, because in 99.99 % of cases there isn’t a matching file name or directory in the directory from where certbot was ran. But I think this is one of the rare cases in which there is a file or directory messing up the command line b/c of an unescaped asterisk.
server tmp # mkdir certbot-bash-asterisk-test
server tmp # cd certbot-bash-asterisk-test/
server certbot-bash-asterisk-test # touch foo.example.com
server certbot-bash-asterisk-test # touch bar.example.com
server certbot-bash-asterisk-test # certbot certonly -d *.example.com
usage:
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
certificate.
certbot: error: unrecognized arguments: foo.example.com
server certbot-bash-asterisk-test #
@inderpalsingh Why would you suggest using certbot-auto while @nspeaks has a relative recent version of certbot from Ubuntu (probably the PPA) installed? Using the PPA is exactly like the documentation tells you, the certbot-auto script is only an “emergency” backup!
Also, there is no reason to believe using the certbot-auto script fixes @nspeaks problem, as it isn’t a problem with certbot most likely.