I ran this command:
certbot certonly --dns-cloudflare --dns-cloudflare-credentials cloudflare.ini -d <domain> --config-dir config/ --work-dir . --logs-dir logs/ --dns-cloudflare-propagation-seconds
It produced this output:
2022-05-11 16:18:42,292:DEBUG:certbot._internal.error_handler:Encountered exception:
Traceback (most recent call last):
File "/home/lab-user/Garage/certbot/env/lib/python3.8/site-packages/certbot/_internal/auth_handler.py", line 86, in handle_authorizations
resps = self.auth.perform(achalls)
File "/home/lab-user/Garage/certbot/env/lib/python3.8/site-packages/certbot/plugins/dns_common.py", line 76, in perform
self._perform(domain, validation_domain_name, validation)
File "/home/lab-user/Garage/certbot/env/lib/python3.8/site-packages/certbot_dns_cloudflare/_internal/dns_cloudflare.py", line 76, in _perform
self._get_cloudflare_client().add_txt_record(domain, validation_name, validation, self.ttl)
File "/home/lab-user/Garage/certbot/env/lib/python3.8/site-packages/certbot_dns_cloudflare/_internal/dns_cloudflare.py", line 85, in _get_cloudfla>
return _CloudflareClient(None, self.credentials.conf('api-token'))
File "/home/lab-user/Garage/certbot/env/lib/python3.8/site-packages/certbot_dns_cloudflare/_internal/dns_cloudflare.py", line 95, in __init__
self.cf = CloudFlare.CloudFlare(email, api_key)
File "/home/lab-user/Garage/certbot/env/lib/python3.8/site-packages/CloudFlare/cloudflare.py", line 938, in __init__
raise CloudFlareAPIError(0, str(e))
CloudFlare.exceptions.CloudFlareAPIError: CloudFlare: configuration section missing - configuration file only has these sections: default
2022-05-11 16:18:42,292:DEBUG:certbot._internal.error_handler:Calling registered functions
2022-05-11 16:18:42,292:INFO:certbot._internal.auth_handler:Cleaning up challenges
2022-05-11 16:18:42,293:ERROR:certbot._internal.error_handler:Encountered exception during recovery: CloudFlare.exceptions.CloudFlareAPIError: CloudF>
2022-05-11 16:18:42,294:DEBUG:certbot._internal.log:Exiting abnormally:
Traceback (most recent call last):
File "/home/lab-user/Garage/certbot/env/bin/certbot", line 8, in <module>
sys.exit(main())
File "/home/lab-user/Garage/certbot/env/lib/python3.8/site-packages/certbot/main.py", line 19, in main
return internal_main.main(cli_args)
File "/home/lab-user/Garage/certbot/env/lib/python3.8/site-packages/certbot/_internal/main.py", line 1744, in main
return config.func(config, plugins)
My configuration of cloudflare.ini looks something like below :-
dns_cloudflare_api_token = 0123456789abcdef0123456789abcdef01234567
Versions of certbot and certbot-dns-cloudflare is given below :-
certbot==1.27.0
certbot-dns-cloudflare==1.27.0
I installed both using pip.
I am not sure where I am going wrong since I have followed the official docs
Welcome to certbot-dns-cloudflare’s documentation! — certbot-dns-cloudflare 0 documentation.
Any help / guidance in solving this would be really helpful.