Certbot not found
Solution 1
Ok i found the solution..
git clone [email protected]:certbot/certbot.git
cd certbot
./certbot-auto renew --pre-hook "service nginx stop" --post-hook "service nginx start"
Solution 2
For me the following commands working fine.
Install snap
sudo apt update
sudo apt install snapd
Install Core
sudo snap install core
Install Certbot
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
Renew Certbot
sudo certbot renew --dry-run
Solution 3
Follow the official instructions and install certbot
with
sudo apt install certbot python3-certbot-nginx
or, in newer Ubuntus that have snap
, with
sudo snap install --classic certbot
It will be available in $PATH
after that.
Stillmatic1985
Updated on February 16, 2022Comments
-
Stillmatic1985 about 2 years
i installed letsencrypt on my ubuntu 16.04 machine with following command.
sudo apt-get install letsencrypt
Now, i want to define a cronjob to automatically renew my certs with following line.
certbot renew --pre-hook "service nginx stop" --post-hook "service nginx start"
But i always get the error, that the command certbot could not be found.
If i use letsencrypt instead of certbot everything works fine as long as i dont use the
--pre-hook
and--post-hook
.How to install
certbot
or is there an alternative command for letsencrypt to define such hooks?Thanks