I need a new certificate for a domain with a new host, how do I generate a new certificate for a domain instead of renewing the certificate with an old host?
I am using the command:
sudo certbot certonly --manual
Which gives me the option:
What would you like to do?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
1: Keep the existing certificate for now
2: Renew & replace the cert (limit ~5 per 7 days)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Renewing an existing certificate
Unfortunately this certificate will not work. I need to create a completely new certificate with a new hosting provider. How do I start from scratch?
Have you followed the instructions available at https://certbot.eff.org/instructions for your webserver and OS? Are you attempting to generate the certificate for the new host on the new host itself?
That deleted all files related to the domain. However when I tried to get a new certificate the old certificate was renewed again and that has the wrong domain addresses since it was registered with a different host.
looks you are doing something wrong. Using the wrong machine or a configuration with a missing configuration.
Please answer the following questions:
Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
My domain is:
I ran this command:
It produced this output:
My web server is (include version):
The operating system my web server runs on is (include version):
My hosting provider, if applicable, is:
I can login to a root shell on my machine (yes or no, or I donāt know):
Iām using a control panel to manage my site (no, or provide the name and version of the control panel):
The version of my client is (e.g. output of certbot --version or certbot-auto --version if youāre using Certbot):
It seems like in this case the certbot delete probably deleted only one of several duplicative certificates, and so another one is still present. A good way to check this is to run certbot certificates.
If my guess is right, certbot delete should be run one or more additional times to remove other unwanted certificates.
Unfortunately too many certificates have been issued so I will have to try this again in a weeks time. I will let you know what happens then but I now know that there are no certificates on file since I checked using the certbot certificates command. I used the certbot delete last time however I cannot be sure if I really deleted everything since I did not checkā¦
/etc/letsencrypt/renewal-hooks:
total 0
drwxr-xr-x 2 root wheel 64 28 Jun 22:45 deploy
drwxr-xr-x 2 root wheel 64 28 Jun 22:45 post
drwxr-xr-x 2 root wheel 64 28 Jun 22:45 pre
/etc/letsencrypt/renewal-hooks/deploy:
/etc/letsencrypt/renewal-hooks/post:
/etc/letsencrypt/renewal-hooks/pre:
This is what comes up. Does this look like everything is deleted? I have not run the certbot revoke command this time but I did before and the certificate still renewed automatically.
It does look like everything was deleted successfully. If you run certbot certonly and end up with the āRenewing an existing certificateā¦ā message in this environment (regardless of whether that then produces a rate limit error), I would love to see the associated log from /var/log/letsencrypt!
from my computer at home. I did not think that with --manual you needed to be connected to a server since you use the āacme-challengeā to certify that you have control of the website without having shell access. I do not have shell access so I used --manual
Is the problem here right now just that we canāt find any logfiles? What are we hoping to see there? My reading of this thread is weāre still waiting for rate limits to expire now that the other certificates in /etc/letsencrypt have been deleted.
If we do want a logfile though, I suspect @Giansonnās normal user doesnāt have permissions to see /var/log/letsencrypt so when they run open /var/log/letsencrypt, their file manager doesnāt show any contents of the directory.
You can get a list of files by running sudo ls /var/log/letsencrypt/ and print one of the files to the terminal by running a command like sudo cat /var/log/letsencrypt/letsencrypt.log.
Not sure why I wouldnt have permission, I am not saving anything to my webserver since I do not have shell access so everything is on my computer... I would have thought. Anyway sudo ls /var/log/letsencrypt/ brings up the list of logs however sudo ls /var/log/letsencrypt.log.24/ doesnt show me anything. If I try sudo open /var/log/letsencrypt.log.24 I am told I do not have anything that can open the file. (letsencrypt.log.24 appears to be the latest log that I have)
I think the log file is completely empty however. See terminal output:
Unfortunately I cannot post the log before that since it appears to show everything I completed in the acme-challenge. Not a huge risk but not really necessary. I will try next week and see if I am still renewing the same certificate.