Could not find Nginx binary

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:

I ran this command:

sudo certbot --nginx

It produced this output:

Saving debug log to /var/log/letsencrypt/letsencrypt.log
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):
XUI Panel NGinx

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

UBUNTU 20.4

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

certbot 2.10.0

Running the above command and I get the error The error was: NoInstallationError("Could not find a usable 'nginx' binary

Nginx is install as part of XUI panel and seems to be located in the dir /home/xui/bin/nginx/ trying to setup SSL so any help would be applicated on how to get this to work and recognise where NGINX is installed.

Many Thanks

1 Like

Welcome @Astro

Are you sure you want to use Certbot and --nginx option? Because that will make changes to your nginx config. Many panel systems also make changes to your nginx config. Having two systems doing that can cause problems.

You could use the Certbot --webroot method. That does not make changes to your nginx config.

Many panel systems have built-in methods for getting certs. Does this xui panel have that? Maybe Certbot isn't even the best choice for this sytem. Do you have a link for the docs for this xui panel? We could look at it and see if there might be conflicts.

If you are sure none of the above matters to you, see the Certbot docs at the link below. Look for the options of --nginx-server-root and --nginx-ctl. These might allow Certbot --nginx option to work with xui.

https://eff-certbot.readthedocs.io/en/latest/using.html#certbot-command-line-options

3 Likes