You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I add a new domain to a container through traefik, cloudflare-companion errors out repeatedly with authentication failures to cloudflare. I'm not sure if something has changed with Cloudflare's API, but both of my other services which rely on the same API keys/tokens do not have the same issue as this does.
Steps to reproduce
(Input your api keys and tokens, and then attempt to start the container with a host set to a subset of the domain.)
What is the expected correct behavior?
It should not error and should create the subdomain automatically.
Relevant logs and/or screenshots
cloudflare-companion | 2022-08-14.15:59:38 [STARTING] ** [traefik-cloudflare-companion] [19] Starting Traefik Cloudflare Companion
cloudflare-companion | Traceback (most recent call last):
cloudflare-companion | File "/usr/sbin/cloudflare-companion", line 466, in <module>
cloudflare-companion | sync_mappings(get_initial_mappings(traefik_included_hosts, traefik_excluded_hosts), doms)
cloudflare-companion | File "/usr/sbin/cloudflare-companion", line 354, in sync_mappings
cloudflare-companion | if point_domain(k, domain_infos):
cloudflare-companion | File "/usr/sbin/cloudflare-companion", line 168, in point_domain
cloudflare-companion | records = cf.zones.dns_records.get(domain_info['zone_id'], params={u'name': name})
cloudflare-companion | File "/usr/lib/python3.10/site-packages/CloudFlare/cloudflare.py", line 695, in get
cloudflare-companion | return self._base.call_with_auth('GET', self._parts,
cloudflare-companion | File "/usr/lib/python3.10/site-packages/CloudFlare/cloudflare.py", line 139, in call_with_auth
cloudflare-companion | return self._call(method, headers, parts,
cloudflare-companion | File "/usr/lib/python3.10/site-packages/CloudFlare/cloudflare.py", line 525, in _call
cloudflare-companion | raise CloudFlareAPIError(code, message)
cloudflare-companion | CloudFlare.exceptions.CloudFlareAPIError: Authentication error
I figured out the issue, you apparently need to point CF_TOKEN to your global API key not your API_Token for the specific zone and Domain. Perhaps clarifiying this on the instructions would prevent people from encountering this issue.
I figured out the issue, you apparently need to point CF_TOKEN to your global API key not your API_Token for the specific zone and Domain. Perhaps clarifiying this on the instructions would prevent people from encountering this issue.
just want to note that you have to put the global API key in a file call "cf_token". Like an idiot, I kept trying to point my cf_api_key file at the CF_TOKEN env var...
I also want to comment that I had this exact issue. I found that creating a API token with the settings found below fixed it or me and it now works. Strange that the Global API token didnt work, but this does.
Zone - DNS - Edit
Zone - Zone Settings - Edit
Zone - Zone - Edit
Summary
When I add a new domain to a container through traefik, cloudflare-companion errors out repeatedly with authentication failures to cloudflare. I'm not sure if something has changed with Cloudflare's API, but both of my other services which rely on the same API keys/tokens do not have the same issue as this does.
Steps to reproduce
(Input your api keys and tokens, and then attempt to start the container with a host set to a subset of the domain.)
What is the expected correct behavior?
It should not error and should create the subdomain automatically.
Relevant logs and/or screenshots
Environment
docker-compose.yml
Possible fixes
The text was updated successfully, but these errors were encountered: