Can't find Apache executable apache2ctl

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. |, 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 --apache

It produced this output: certbot.errors.NoInstallationError: Cannot find Apache executable apache2ctl

My web server is (include version):

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

My hosting provider, if applicable, is: AWS

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, ssh via PuTTY

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

Welcome @hrl

Do you have Apache installed and, if so, is it in the default Ubuntu location?

Because a request to your domain responds saying you are using Express - not Apache.

curl -I
HTTP/1.1 200 OK
X-Powered-By: Express
Content-Type: text/html
Date: Thu, 18 Aug 2022 03:31:12 GMT
Connection: keep-alive

ah, thank you! the result of the command apache2 -v is The program apache2 is currently not installed
how should I proceed to use certbot?

1 Like

Are you just trying to replace your DigiCert cert in Express with a cert from Let's Encrypt?

Or are you trying to replace your Express server with Apache also?


Just trying to replace the DigiCert cert in Express with the (auto-renewing) cert from Let's Encrypt

OK. Then you should try certbot webroot authentication. Something like:

sudo certbot certonly --webroot -w (path to server root) -d --deploy-hook "command to restart Express"

For your case, set the -w path to the base location used by Express to serve files.

Often, servers need to be restarted/reloaded to pick up a new cert. If Express needs that use the deploy-hook for that. If it picks up a new cert automatically you can leave that off.

Oh, of course once you get Let's Encrypt certs you will need to change your Express config to point to those cert files. Certbot will tell you where they are.


Thank you very much for your help so far, it is very much appreciated. I have done some research this morning looking for how to find the path to the server root (place where Express is serving the files)
Restarting the site will not be an issue so I will be able to use certbot certonly


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