Renew My certificate

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: xxxxx

I ran this command: certbot renew

It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log


Processing /etc/letsencrypt/renewal/xxxxxx.conf


Cert is due for renewal, auto-renewing…
Plugins selected: Authenticator standalone, Installer None
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for xxxxxx
Cleaning up challenges
Attempting to renew cert (xxxxxxx) from /etc/letsencrypt/renewal/xxxxxx.conf produced an unexpected error: Problem binding to port 80: Could not bind to IPv4 or IPv6… Skipping.


Processing /etc/letsencrypt/renewal/xxxxxxx.conf


Cert is due for renewal, auto-renewing…
Plugins selected: Authenticator standalone, Installer None
Renewing an existing certificate
Performing the following challenges:
http-01 challenge for xxxxxxx
Cleaning up challenges
Attempting to renew cert (xxxxxxxx) from /etc/letsencrypt/renewal/www.xxxxxx.conf produced an unexpected error: Problem binding to port 80: Could not bind to IPv4 or IPv6… Skipping.
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/xxxxxx/fullchain.pem (failure)
/etc/letsencrypt/live/www.xxxxxx/fullchain.pem (failure)


All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/xxxxxx/fullchain.pem (failure)
/etc/letsencrypt/live/www.xxxxxx/fullchain.pem (failure)


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

Also, I ran this command: certbot certonly --force-renew --nginx --cert-name xxxxxx -d xxxxxx

It produced this output:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Could not choose appropriate plugin: The nginx plugin is not working; there may be problems with your existing configuration.
The error was: NoInstallationError(“Could not find a usable ‘nginx’ binary. Ensure nginx exists, the binary is executable, and your PATH is set correctly.”,)
The nginx plugin is not working; there may be problems with your existing configuration.
The error was: NoInstallationError(“Could not find a usable ‘nginx’ binary. Ensure nginx exists, the binary is executable, and your PATH is set correctly.”,)

My web server is (include version):

The operating system my web server runs on is (include version): Linux ubuntu

My hosting provider, if applicable, is:xxxxxxxxx

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): using PUtty

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot): certbot 0.31.0

Are you using Bitnami or ServerPilot or anything similar to those?

Yes, I use ServerPilot. But I have not used it as parameters in certbot
@_az

Right.

The short version is that due to how heavily ServerPilot customize their nginx installation, Certbot’s nginx plugin is not really compatible or safe to use.

You can’t use --standalone because you can only run the standalone authenticator OR nginx at one time. Technically you could stop nginx while you renew the certificate, but it’s not an elegant solution:

certbot renew --standalone --pre-hook "service nginx-sp stop" \
--post-hook "service nginx-sp start"

A more elegant solution would be to use the webroot authenticator, but you would need to identify what your webroot is and tell Certbot to use it. For example:

certbot renew -a webroot -w /srv/users/serverpilot/apps/APP_NAME/public \
--post-hook "service nginx-sp reload" --dry-run
2 Likes

@_az
In the second command, shall I write my domain name after the webroot like:
/srv/users/serverpilot/apps/APP_NAME/public/www.example.com
or just webroot like
/srv/users/serverpilot/apps/APP_NAME/public/
Also in the second command does --post-hook “service nginx-sp reload” --dry-run need to be in the same line or separate command?

1 Like

Hi @sabat

check your config to find the correct path.

Or create the subdirectories

yourwebroot/.well-known/acme-challenge

then two files (file name 1234, in /srv/users/serverpilot/apps/APP_NAME/public/www.example.com with that content, in /srv/users/serverpilot/apps/APP_NAME/public with that reduced content), then try to load that file via

http://yourdomain/.well-known/acme-challenge/1234

then you should see the webroot which is used.

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