Fixing Certbot on Ubuntu with Nginx

I faced with this error not the first time:

sudo /var/www/ssl/letsencrypt/./letsencrypt-auto certonly --webroot -w /var/www/ssl -d

ubuntu 16.04, nginx/1.13.0

are you running install as root?

BTW - are you sure you are renewing? The command mentioned is for a new certificate not for a renewal (terms matter)


Yes, I’m root and I’m renewing my old certificate.

sudo ./letsencrypt-auto renew
I still getting the same error

The same error if I run
sudo ./letsencrypt-auto --help

i think you have corrupted your install

I would suggest reinstalling HOWEVER you should take the appropriate steps before doing so

If you are renewing you should use the flag below to avoid corruption errors due to updates.

You should also schedule time to update letsencrypt-auto

More info:

–no-self-upgrade (certbot-auto only) prevent the certbot-auto script
from upgrading itself to newer released versions


Thanks for your reply!

How do I reinstall this?

I have cloned branch 0.14.x (sudo git clone -b 0.14.x) but it also does not work

hi @SimBioT

I don’t believe the github clone way is the optimal way (in fact its usually discouraged)

have a look at this page which has instructions


I installed certbot but after command
sudo certbot --nginx certonly

After I choose my domain I’m getting an error:

tls-sni-01 challenge for
nginx: [alert] kill(7078, 1) failed (3: No such process)
Cleaning up challenges
nginx: [alert] kill(7078, 1) failed (3: No such process)
Encountered exception during recovery
nginx restart failed:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/certbot/", line 99, in _call_registered
  File "/usr/lib/python2.7/dist-packages/certbot/", line 284, in _cleanup_challenges
  File "/usr/lib/python2.7/dist-packages/certbot_nginx/", line 826, in cleanup
  File "/usr/lib/python2.7/dist-packages/certbot_nginx/", line 592, in restart
nginx_restart(self.conf('ctl'), self.nginx_conf)
   File "/usr/lib/python2.7/dist-packages/certbot_nginx/", line 855, in nginx_restart
    "nginx restart failed:\n%s\n%s" % (,
    MisconfigurationError: nginx restart failed:

nginx restart failed:

If I run
sudo certbot renew --dry-run

renewal config file {} is missing a required file reference
Renewal configuration file /etc/letsencrypt/renewal/ is broken. Skipping


I got it with
sudo certbot certonly --no-self-upgrade -d

Thanks a lot!

1 Like

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