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: vegani.me, mail.vegani.me
I ran this command: (both produce the same result)
certbot renew --nginx
certbot certonly --webroot --webroot-path /var/www/html/ -d vegani.me -d mail.vegani.me
It produced this output:
Certbot failed to authenticate some domains (authenticator: webroot). The Certificate Authority reported these problems:
Domain: mail.vegani.me
Type: connection
Detail: 45.151.88.100: Fetching https://mail.vegani.me:2305/.well-known/acme-challenge/BfTQmiUx2E38G0mU4opoZzDsdfD8MPGjXVaQqVIpBeI: Invalid port in redirect target. Only ports 80 and 443 are supported, not 2305
Domain: vegani.me
Type: connection
Detail: 45.151.88.100: Fetching https://vegani.me:2305/.well-known/acme-challenge/jMIPTfqqIX7_ipfofbPDvrvlqOD57-Ngb6Kmi6VdR-Q: Invalid port in redirect target. Only ports 80 and 443 are supported, not 2305
My web server is (include version): nginx 1.24.0
The operating system my web server runs on is (include version): Ubuntu noble (24.04)
My hosting provider, if applicable, is: self-hosted
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 (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): 2.9.0
I added to both mail.vegani.me and vegani.me nginx conf the following code
# Required for LE certificate enrollment using certbot
location '/.well-known/acme-challenge' {
default_type "text/plain";
root /var/www/html;
}
I created a file /var/www/html/.well-known/acme-challenge/test
and tried to download it successfully with
curl https://vegani.me:443/.well-known/acme-challenge/test
But still when using certbot both in nginx and webroot mode fails for a redirect to a port I've never seen nor configuerd anywhere.
Recently I upgraded my system and reinstalled everything.
I copied the /etc/letsencrypt folder from my older OS (symlinks included)
and simply copied it into the new OS.
It was at that point that renew stopped working, while everything else is working correctly.
I'm quite lost, I don't know howto look for this redirect to port 2305 that I can't reproduce outside of certbot commands.
Thank you very much for your kind help.
Danilo