I want to renew my certificate but also ADD an extra certification for conference.grasp.deals, needed for XMPP Server .
I tried in this way:
(base) raphy@pc:~$ sudo certbot renew -d conference.grasp.deals
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Currently, the renew verb is capable of either renewing all installed certificates that are due to be
renewed or renewing a single certificate specified by its name. If you would like to renew specific
certificates by their domains, use the certonly command instead. The renew verb may provide other
options for selecting certificates to renew in the future.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log
/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
(base) raphy@pc:~$ sudo certbot -v
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: grasp.deals
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): grasp.deals conference.grasp.deals
** Error - Invalid selection **
Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: grasp.deals
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): c
Please specify --domains, or --installer that will help in domain names autodiscovery, or --cert-name
for an existing certificate name.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log
/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
(base) raphy@pc:~$ sudo certbot --nginx --cert-name grasp.deals \
> -d grasp.deals -d conference.grasp.deals
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
You are updating certificate grasp.deals to include new domain(s):
+ conference.grasp.deals
You are also removing previously included domain(s):
(None)
Did you intend to make this change?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(U)pdate certificate/(C)ancel: U
Renewing an existing certificate for grasp.deals and conference.grasp.deals
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/grasp.deals/fullchain.pem
Key is saved at: /etc/letsencrypt/live/grasp.deals/privkey.pem
This certificate expires on 2021-09-06.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.
Deploying certificate
Successfully deployed certificate for grasp.deals to /etc/nginx/conf.d/default.conf
Successfully deployed certificate for conference.grasp.deals to /etc/nginx/conf.d/default.conf
Your existing certificate has been successfully renewed, and the new certificate has been installed.
Although that may get a cert with multiple names...
The config only seems to be using one single name.
You should always start with having a fully functional HTTP config (for all names) before proceeding to get/use certificates.
I do not understand.
Does it mean that I got only the certificate from grasp.deals and not also for conference.grasp.deals ?
Why this happened and how to correct it in order to add the extra name also for conference.grasp.deals?
You still don't have the correct certificate since you have www.grasp.deals in your DNS and did not include it in your certificate. Per what @_az said, here's the correct command:
(base) raphy@pc:~$ sudo certbot --cert-name grasp.deals --nginx -d
"grasp.deals,www.grasp.deals,conference.grasp.deals"
Saving debug log to /var/log/letsencrypt/letsencrypt.log
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
You are updating certificate grasp.deals to include new domain(s):
+ www.grasp.deals
You are also removing previously included domain(s):
(None)
Did you intend to make this change?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(U)pdate certificate/(C)ancel: U
Renewing an existing certificate for grasp.deals and 2 more domains
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/grasp.deals/fullchain.pem
Key is saved at: /etc/letsencrypt/live/grasp.deals/privkey.pem
This certificate expires on 2021-09-06.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.
Deploying certificate
Successfully deployed certificate for grasp.deals to /etc/nginx/conf.d/default.conf
Successfully deployed certificate for www.grasp.deals to /etc/nginx/conf.d/default.conf
Successfully deployed certificate for conference.grasp.deals to /etc/nginx/conf.d/default.conf
Your existing certificate has been successfully renewed, and the new certificate has been installed.
There's no port 80 server block with a server_name of conference.grasp.deals, so the port 80 server block (that's missing default_server) with server_name grasp.deals is being used.
There's no port 80 server block with a server_name of www.grasp.deals, so the port 80 server block (that's missing default_server) with server_name grasp.deals is being used.