Unable to add Cloudflare Plugin at Ubuntu 20.04 (LEMP)

Later I need wildcard SSL

sudo certbot certonly --dns-cloudflare --dns-cloudflare-credentials /root/.secrets/cloudflare.ini -d example.com,*.example.com --preferred-challenges dns-01
root@gulshankumar:~# sudo apt-get install python3-certbot-dns-cloudflare
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  python3-cloudflare
The following NEW packages will be installed:
  python3-certbot-dns-cloudflare python3-cloudflare
0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
Need to get 35.9 kB of archives.
After this operation, 225 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://archive.ubuntu.com/ubuntu focal/universe amd64 python3-cloudflare all 2.1.0-1 [27.8 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal/universe amd64 python3-certbot-dns-cloudflare all 0.39.0-1 [8,076 B]
Fetched 35.9 kB in 1s (25.0 kB/s)
Selecting previously unselected package python3-cloudflare.
(Reading database ... 118092 files and directories currently installed.)
Preparing to unpack .../python3-cloudflare_2.1.0-1_all.deb ...
Unpacking python3-cloudflare (2.1.0-1) ...
Selecting previously unselected package python3-certbot-dns-cloudflare.
Preparing to unpack .../python3-certbot-dns-cloudflare_0.39.0-1_all.deb ...
Unpacking python3-certbot-dns-cloudflare (0.39.0-1) ...
Setting up python3-cloudflare (2.1.0-1) ...
/usr/lib/python3/dist-packages/CloudFlare/cloudflare.py:57: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if self.email is '' or self.token is '':
/usr/lib/python3/dist-packages/CloudFlare/cloudflare.py:57: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if self.email is '' or self.token is '':
/usr/lib/python3/dist-packages/CloudFlare/cloudflare.py:82: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if self.email is '' or self.token is '':
/usr/lib/python3/dist-packages/CloudFlare/cloudflare.py:82: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if self.email is '' or self.token is '':
/usr/lib/python3/dist-packages/CloudFlare/cloudflare.py:107: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if self.certtoken is '' or self.certtoken is None:
Setting up python3-certbot-dns-cloudflare (0.39.0-1) ...
root@gulshankumar:~#
2 Likes

I don’t believe Ubuntu 20 is “certified” for use with certbot.
[If you search this forum you will see similar issues already reported.]

You could try another client that is known to work.
Like acme-sh

1 Like

In your previous message, I only saw warnings, no errors? Should work.

1 Like

Why there is SyntaxWarning while installing CF DNS plugin?

root@localhost:~/.secrets# sudo apt-get install python3-certbot-dns-cloudflare
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  python3-cloudflare
The following NEW packages will be installed:
  python3-certbot-dns-cloudflare python3-cloudflare
0 upgraded, 2 newly installed, 0 to remove and 3 not upgraded.
Need to get 35.9 kB of archives.
After this operation, 225 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://mirrors.linode.com/ubuntu focal/universe amd64 python3-cloudflare all 2.1.0-1 [27.8 kB]
Get:2 http://mirrors.linode.com/ubuntu focal/universe amd64 python3-certbot-dns-cloudflare all 0.39.0-1 [8,076 B]
Fetched 35.9 kB in 0s (1,434 kB/s)
Selecting previously unselected package python3-cloudflare.
(Reading database ... 118786 files and directories currently installed.)
Preparing to unpack .../python3-cloudflare_2.1.0-1_all.deb ...
Unpacking python3-cloudflare (2.1.0-1) ...
Selecting previously unselected package python3-certbot-dns-cloudflare.
Preparing to unpack .../python3-certbot-dns-cloudflare_0.39.0-1_all.deb ...
Unpacking python3-certbot-dns-cloudflare (0.39.0-1) ...
Setting up python3-cloudflare (2.1.0-1) ...
/usr/lib/python3/dist-packages/CloudFlare/cloudflare.py:57: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if self.email is '' or self.token is '':
/usr/lib/python3/dist-packages/CloudFlare/cloudflare.py:57: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if self.email is '' or self.token is '':
/usr/lib/python3/dist-packages/CloudFlare/cloudflare.py:82: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if self.email is '' or self.token is '':
/usr/lib/python3/dist-packages/CloudFlare/cloudflare.py:82: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if self.email is '' or self.token is '':
/usr/lib/python3/dist-packages/CloudFlare/cloudflare.py:107: SyntaxWarning: "is" with a literal. Did you mean "=="                                                                                                                           ?
  if self.certtoken is '' or self.certtoken is None:
Setting up python3-certbot-dns-cloudflare (0.39.0-1) ...
root@localhost:~/.secrets#
1 Like