Using non system nginx

hi all

so when i run this

certbot certonly --nginx

says its not running on this server but this server is running nginx, just it doesnt use the system one, uses another one installed by another sofware and its running in


is there anyway i can make certbot use the software installed nginx version?


1 Like

Maybe. You could try setting these options on certbot command:

  Nginx Web Server plugin

  --nginx-server-root NGINX_SERVER_ROOT
                        Nginx server root directory. (default: /etc/nginx or
  --nginx-ctl NGINX_CTL
                        Path to the 'nginx' binary, used for 'configtest' and
                        retrieving nginx version number. (default: nginx)

doesnt work, i get this

certbot certonly --nginx-server-root /opt/aspera/shares/etc/nginx -d
Saving debug log to /var/log/letsencrypt/letsencrypt.log

How would you like to authenticate with the ACME CA?

1: Apache Web Server plugin (apache)
2: Spin up a temporary webserver (standalone)
3: Place files in webroot directory (webroot)

1 Like

I think you also need to include --nginx to specify that plug-in. The extra options are for that plugin.


tried to put the --nginx option either end of the nginx server root option and same reseult

when i put it at the end, get no error just syntax wrong

certbot certonly --nginx --nginx-server-root /opt/aspera/shares/etc/nginx -d
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.")

1 Like

I think you need to add this too.

--nginx-ctl "$(which nginx)"

(this is hacky as shit, put the actual path, even more when certbot complains about your PATH)


when you say the actual path, do you mean the server root, like below


1 Like

two different options, one points to the config (this is the one you have already), another to the nginx executable itself.


job done!!!!

certbot certonly --nginx --nginx-server-root /opt/aspera/shares/etc/nginx --nginx-ctl /opt/aspera/shares/sbin/nginx -d

and i spose renew, just make a crontab

0 09,21 * * * certbot renew

1 Like

You might already have one, or a systemd timer.

Check in /etc/cron.d and in systemctl list-timers

(if you add it manually, I'd add -q, as in certbot renew -q)


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