Let's encrypt certbot command fail

Hello,

I want to setup Let’s Encrypt certificate for my domain, I’m using DNS Challenge with a token generated for Cloudflare, however once all it’s configured and I start the service I get an error with the Certbot command:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/file-structure.sh
cont-init: info: /etc/cont-init.d/file-structure.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun lets-encrypt (no readiness notification)
s6-rc: info: service legacy-services successfully started
[09:30:31] INFO: Selected DNS Provider: null
[09:30:31] INFO: Use propagation seconds: 60
usage: 
  certbot [SUBCOMMAND] [options] [-d DOMAIN] [-d DOMAIN] ...
Certbot can obtain and install HTTPS/TLS/SSL certificates.  By default,
it will attempt to use a webserver both for obtaining and installing the
certificate. 
certbot: error: unrecognized arguments: --null --null-credentials /data/dnsapikey
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

on the settings at the DNS options I’ve the following snippet

email: [email protected]
domains:
  - domain.test.net
accept_terms: true
certfile: fullchain.pem
keyfile: privkey.pem
challenge: dns
algo: secp384r1
dns:
  provider: dns-cloudflare
  cloudflare_api_token: XXXX

I’ve seen other post but different providers or challenges with not resolution so far, any ideas?

I’m using the let’s encrypt addon and had the same issue.
In the config tab I clicked the 3 dots and switched to yaml mode.

there I found, that the line “dns:” was to much.

Before:

domains:
  - URL
email: [email protected]
keyfile: privkey.pem
certfile: fullchain.pem
challenge: dns
dns:
  dns:
    provider: dns-cloudflare
    cloudflare_api_token: XXXX

and that’s now my working configuration:

domains:
  - URL
email: [email protected]
keyfile: privkey.pem
certfile: fullchain.pem
challenge: dns
dns:
  provider: dns-cloudflare
  cloudflare_api_token: XXXX

apologies for the late reply!
Indeed as you wrote there was two DNS, once I changed to YAML view as you said I saw your point and after edit it, it worked!

Thanks!