certbot導入からhttps化するまで
# venv作成・pipからcertbotをインストール
sudo python3 -m venv /opt/certbot/
sudo /opt/certbot/bin/pip install --upgrade pip
sudo /opt/certbot/bin/pip install certbot certbot-nginx
sudo ln -s /opt/certbot/bin/certbot /usr/bin/certbot
sudo certbot --nginx --agree-tos
#自動更新
crontab -e
#crontab内に記載
0 0,12 * * * root /opt/certbot/bin/python -c 'import random; import time; time.sleep(random.random() * 3600)' && sudo certbot renew -q
とりあえずこれでできた。
certbotの入れ方はいろいろ試したがこれでしかできなかった