sudo -H certbot certonly --apache -d mydomain.com
OR
sudo -H /snap/bin/certbot certonly --apache -d mydomain.com
OR EVEN:
cd /snap/bin
sudo -H ./certbot certonly --apache -d mydomain.com
But NOT:
sudo -H ./certbot certonly --apache -d mydomain.com
after this:
That effectively issues this command:
sudo -H /opt/letsencrypt/certbot certonly --apache -d mydomain.com
And that is NOT where certbot
is anymore.
which certbot
find / -name certbot