Nextcloud in Windows Docker-Desktop error in Caddy

Your other (sub-) domains obtained a certificate a while ago, so they will continue to work for a while (until they expire, more or less).
And they won’t interact with your Cloudflare token at all until they need to renewed (which Caddy starts doing after 2/3 of the certificate’s lifetime).

Just as a sanity check, could you please run the following two commands (requires jq, but you could also run it without and parse the output yourself).

→ Replace YOUR_TOKEN with your Cloudflare API token

curl -H "Authorization: Bearer YOUR_TOKEN" "https://api.cloudflare.com/client/v4/zones" --get --data-urlencode "name=movies4you.stream" | jq "{ success, errors, results: [.result[]? | { id, name }]}"

# Then, take the `id` from the previous output and use it in
# the following request instead of `__ZONE_ID__` (in the url)

curl -H "Authorization: Bearer YOUR_TOKEN" "https://api.cloudflare.com/client/v4/zones/__ZONE_ID__/dns_records" -X POST --data '{"type":"TXT","name":"_acme-challenge.files","content":"dummy_value"}' | jq "{ success, errors, result: (.result | { zone_name, name, type, content }) }"

The jq filters make it safe to post the whole output here :innocent:

3 Likes

just for reference what is jq so i can do this test

https://stedolan.github.io/jq/
https://stedolan.github.io/jq/download/

this is the error when i run your command

C:\Users\DevilsCoder>choco install jq
Chocolatey v1.1.0
Installing the following packages:
jq
By installing, you accept licenses for the packages.
jq v1.6 already installed.
 Use --force to reinstall, specify a version to install, or try upgrade.

Chocolatey installed 0/1 packages.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Warnings:
 - jq - jq v1.6 already installed.
 Use --force to reinstall, specify a version to install, or try upgrade.


C:\Users\DevilsCoder>curl -H "Authorization: Bearer XUm4ywk6Hh-ywxywyxywyx-ywyxywyxywyx" "https://api.cloudflare.com/client/v4/zones" --get --data-urlencode "name=movies4you.stream" | jq '{ success, errors, results: [.result[]? | { id, name }]}'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
        '{' is not recognized as an internal or external command,
operable program or batch file.

OMFG Your amazing. It was an API key i will defintly use this in the future to double check. I rolled the api key and re-checked the command with the newly rolled api key and it worked!!!

1 Like

Can you try using " (double quotes) instead of ' in for the stuff after jq?

This topic was automatically closed after 30 days. New replies are no longer allowed.