Hello
The problems comes because lets encrypt is no longer supporting certbot-auto, there is problem in setting up the environment .
This will try to configure the environment for certbot-auto to run.
sudo -H bench setup lets-encrypt erp.mysite.com --custom-domain erp.mysite.com
The nginx config files will be modified but the cert will not be created
See: certbot-auto will fail on ubuntu > 20 · Issue #1073 · frappe/bench · GitHub
For now i have found two workarounds:
-
run this command:
USE_PYTHON_3=1 /opt/certbot-auto
This will install the certbot-auto environment, and then you can request to create the cert… -
Follow the certbot installation instructions:
404 Not Found | Certbot
For ubuntu:
Stop the nginx service:sudo service nginx stop
Install cerbot:sudo snap install --classic certbot
Generate cert:sudo certbot certonly --standalone
In both steps the cert will be created in the same dir /etc/letsencrypt/…
Which is the same dir is configured when running
sudo -H bench setup lets-encrypt
So then you only need to do:
sudo service nginx start
sudo service nginx reload