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. crt.sh | 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: mydomain.duckdns.org
I ran this command: sudo certbot --nginx -d mydomain.duckdns.org
It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Error while running nginx -c /etc/nginx/nginx.conf -t.
nginx: [emerg] cannot load certificate "/etc/letsencrypt/live/mydomain.duckdns.org-0001/fullchain.pem": PEM_read_bio_X509_AUX() failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE)
nginx: configuration file /etc/nginx/nginx.conf test failed
The nginx plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError('Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: [emerg] cannot load certificate "/etc/letsencrypt/live/mydomain.duckdns.org-0001/fullchain.pem": PEM_read_bio_X509_AUX() failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE)\nnginx: configuration file /etc/nginx/nginx.conf test failed\n')
My web server is (include version): im using nginx 1.18.0-6.1+deb11u3
The operating system my web server runs on is (include version): debian 11 arm64
My hosting provider, if applicable, is: selfhosted
I can login to a root shell on my machine (yes or no, or I don't know): yes
I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no
The version of my client is :certbot 1.12.0
The error happens because i accidently removed this directory /etc/letsencrypt/live/mydomain.duckdns.org-0001/ with all the files in it
im using mydomain for because this is a domain im using to access my selfhosted services
Is there a way to reconfigure certbot with the nginx plugin from the start?
Thank you for your time