How to fix certbot on nginx ubuntu

Certbot issue on ubuntu

We had this problem:

Certbot doesn't know how to automatically configure the web server on this system. However, it can still get a certificate for you. Please run "certbot certonly" to do so. You'll need to manually configure your web server to use the resulting certificate.
We found out it had to do with a missing plugin for certbot, and we could not find the correct method to solve it. This could solve it
apt install python3-certbot-nginx
After this certbot ran fine again. Maybe you need to add this flag too:
 certbot --nginx -d yourdomain.tld
by Daniel at 2023-06-02T22:37:05.380Z
Copyright © DanielKnows.com 2019 - 2023 - Built with NuxtJS