Let's Encrypt certbot plugin with nginx-mainline

Has anyone figured out if it is possible to get Let’s Encrypt certbot plugin with nginx-mainline working to auto renew certificates?

Apparently, so i’m told the certbot nginx plugin does not support mainline

in the terminal I get:

certbot --nginx

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.”)

I can’t seem to get auto renew working if created manually. Maybe a script can be configured and a systemd timer to run it on the day the cert is meant to expire?

I bet certbot is looking for /usr/bin/nginx like it would normally be installed.

The nginx-mainline package installed to a different path: /usr/bin/nginx-mainline to avoid conflicting with the regular nginx package.

Looks like certbot can be redirect to a different binary path with --nginx-ctl.

certbot --help nginx

  Nginx Web Server plugin

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