Certbot Renew timesout on http challenge

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: helpdesk.lobar.com

I ran this command: sudo certbot renew --nginx

It produced this output:

Saving debug log to /var/log/letsencrypt/letsencrypt.log

Processing /etc/letsencrypt/renewal/helpdesk.lobar.com.conf

Certificate is due for renewal, auto-renewing...
Plugins selected: Authenticator nginx, Installer nginx
Renewing an existing certificate for helpdesk.lobar.com
Performing the following challenges:
http-01 challenge for helpdesk.lobar.com
Waiting for verification...
Challenge failed for domain helpdesk.lobar.com
http-01 challenge for helpdesk.lobar.com

Certbot failed to authenticate some domains (authenticator: nginx). The Certificate Authority reported these problems:
Domain: helpdesk.lobar.com
Type: connection
Detail: Fetching http://helpdesk.lobar.com/.well-known/acme-challenge/aLehSCMeZxkHLs6TGfrQ6ZW2FUQZtrDV6m_o52Vks98: Timeout during connect (likely firewall problem)

Hint: The Certificate Authority failed to verify the temporary nginx configuration changes made by Certbot. Ensure the listed domains point to this nginx server and that it is accessible from the internet.

Cleaning up challenges
Failed to renew certificate helpdesk.lobar.com with error: Some challenges have failed.

All renewals failed. The following certificates could not be renewed:
/etc/letsencrypt/live/helpdesk.lobar.com/fullchain.pem (failure)

1 renew failure(s), 0 parse failure(s)

My web server is (include version): nginx

The operating system my web server runs on is (include version): Ubuntu 22.04.1

My hosting provider, if applicable, is: Self

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): 1.32.1

Having an issue where I am attempting to renew my certificate via certbot and I am getting timeouts on the http-01 challenge. Ports 443 and 80 are open at the firewall and I think it is listening based on the following command output:

sudo netstat -ntlp | grep LISTEN
 administrator@server-sync:/etc/nginx/sites-enabled$ sudo netstat -ntlp | grep LISTEN
tcp        0      0*               LISTEN      918/mysqld
tcp        0      0 *               LISTEN      731/systemd-resolve
tcp        0      0    *               LISTEN      610325/nginx: maste
tcp        0      0    *               LISTEN      823/sshd: /usr/sbin
tcp        0      0*               LISTEN      918/mysqld
tcp        0      0   *               LISTEN      912/smbd
tcp        0      0   *               LISTEN      912/smbd
tcp        0      0   *               LISTEN      610325/nginx: maste
tcp6       0      0 :::51110                :::*                    LISTEN      837/jre/bin/java
tcp6       0      0 :::80                   :::*                    LISTEN      610325/nginx: maste
tcp6       0      0 :::22                   :::*                    LISTEN      823/sshd: /usr/sbin
tcp6       0      0 :::139                  :::*                    LISTEN      912/smbd
tcp6       0      0 :::445                  :::*                    LISTEN      912/smbd
tcp6       0      0 :::443                  :::*                    LISTEN      610325/nginx: maste

My sites conf file is the following:

server {

    server_name helpdesk.lobar.com;

    root /var/www/html/public;

    index index.php index.html index.htm;

    error_log /var/www/html/storage/logs/web-server.log;

    location / {
        try_files $uri $uri/ /index.php?$query_string;
    location ~ \.php$ {
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/run/php/php8.1-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;
    # Uncomment this location if you want to improve attachments downloading speed.
    # Also make sure to set APP_DOWNLOAD_ATTACHMENTS_VIA=nginx in the .env file.
    #location ^~ /storage/app/attachment/ {
    #    internal;
    #    alias /var/www/html/storage/app/attachment/;
    location ~* ^/storage/attachment/ {
        expires 1M;
        access_log off;
        try_files $uri $uri/ /index.php?$query_string;
    location ~* ^/(?:css|js)/.*\.(?:css|js)$ {
        expires 2d;
        access_log off;
        add_header Cache-Control "public, must-revalidate";
    location ~* ^/(?:css|fonts|img|installer|js|modules|[^\\\]+\..*)$ {
        expires 1M;
        access_log off;
        add_header Cache-Control "public";
    location ~ /\. {
        deny  all;

    listen [::]:443 ssl ipv6only=on; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/helpdesk.lobar.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/helpdesk.lobar.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

server {
    if ($host = helpdesk.lobar.com) {
        return 301 https://$host$request_uri;
        } # managed by Certbot

    listen 80;
    listen [::]:80;

    server_name helpdesk.lobar.com;
    return 404; # managed by Certbot


Are you sure about this? Because Let's Debug is getting the same result:

If something's listening on port 80 (and I agree that looks like the case based on your netstat output), then the only other real possibilities are a DNS issue (Let's Encrypt is looking for the wrong IP address), or there's a firewall somewhere blocking it.


omg....if I could push my palm through my forehead...I would. Everything was set correctly except my NAT.....working now.

My apologies.


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