How to fix certbot unrecognized arguments: --dns-cloudflare-credentials on Ubuntu

Problem:

You are trying to request a Let’s Encrypt certificate using certbot, but instead you see an error message like

example.txt
certbot: error: unrecognized arguments: --dns-cloudflare-credentials /root/.secrets/cloudflare.ini

Solution

Install the required package. This is the solution if you have installed python3-certbot as an apt package:

example.sh
sudo apt -y install python3-certbot-dns-cloudflare

This is the solution if you have installed certbot as a snap:

example.sh
sudo snap set certbot trust-plugin-with-root=ok
sudo snap install certbot-dns-cloudflare

 


Check out similar posts by category: Networking