Consider using --cert-name instead of --expand?

I would like to add the following domain names to my existing certificate. The domains that are already present are and
I would also like to add the domains and www, In the manual Cerbot 2.2.0 I found the command below. But it gives me an error about the hostname of the raspberry. The hostname has changed in the meantime I know but how do I solve this??

sudo certbot certonly --cert-name -d,
sudo: Unable to resolve computer name Rasp26: Name or service not known
Saving debug log to /var/log/letsencrypt/letsencrypt.log

How would you like to authenticate with the ACME CA?

1: Spin up a temporary webserver (standalone)
2: Place files in webroot directory (webroot)

Select the appropriate number [1-2] then [enter] (press 'c' to cancel):

"this" is vague.

How do you solve...

  • the raspberry hostname error?
  • adding the additional names to the same cert

For the first, I'd just add an entry in the /etc/hosts file.
OR remove that short name from the web service config.

For the second, I'd choose option #2 [webroot]
But that requires that there is an existing web service that can serve those two names.
If there is no such web service, then you are forced to use option #1 [temp webserver].


Based on your previous thread where you did this:

sudo certbot certonly --standalone --cert-name -d -d

Just add two more -d clauses for your two new names

Or, yes, use one -d with a comma delimited list of them all

Agree with Rudy using webroot might be easier but you were already doing standalone so if you are happy with that just keep it.


Thank you both.
Everything works again as I wanted.


That was not an "error" presented by Certbot, but by the sudo application. In fact, I'm pretty sure it wasn't an error, but just a warning, as Certbot seems to be proceeding nicely afterwards.

With regard to your actual Certbot problem: unfortunately Certbot doesn't have a simple "please add the following hostnames to an existing certificate while keep the previously settings of the original certificate", so Certbot will ask you the required questions such as authenticator plugin and so forth. In a sense it makes sense, as the previously recorded settings such as webroots might not be correct for the new hostnames.


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