I am trying to install an SSL certificate for the root domain along with a wildcard for all subdomains.
My domain is: lupitapearl.com
OS: Ubuntu 20.04.4
Hosting provider: GCP
Downloaded certbot using snap
Installed latest version of python3-cloudflare
I ran this command:
$ certbot certonly --dns-cloudflare --dns-cloudflare-credentials ~/.secrets/certbot/cloudflare.ini -d lupitapearl.com -d *.lupitapearl.com –i nginx
And this output returns:
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: /home/kev_m_lin/.secrets/certbot/cloudflare.ini –i nginx
It seems the dash used for the -i in front of nginx is an "en dash" (– in your post, compare that en dash with a regular one: -) and not a regular one. Did you perhaps copy/paste that -i nginx part from a how-to? You should change it to a regular dash.
Maybe even the space in front of -i is not a regular space, otherwise Certbot should see those two items separately. Better to type that space manually too before trying again.
Edit: although an unicode decoder says its a regular space.. Not sure why Certbot doesn't see them separately in that case then..
The following error was encountered:
[Errno 13] Permission denied: '/var/log/letsencrypt/.certbot.lock'
Either run as root, or set --config-dir, --work-dir, and --logs-dir to writeable paths.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /tmp/tmphhn1uex5/log or re-run Certbot with -v for more details.