Add Global API to CloudDNS settings in System Settings
(also tried the token insted of API, ran the CURL command to test provided by cloudlfare: “success”. Then reverted back to the API as I thought Virtualmin might be missing some permissions from the token “template” setup.
When I try to change the DNS settings from “Local” to “Cloudflare” in the Virtual Server Templates and then in the DNS Settings of the Virtual Server Summary, I get:
" Failed to save DNS options : DNS zone not found!"
I’m not sure how to troubleshoot this, as many threads here in the forum only lead to “this will be fixed in the next version”…
Was this a domain you created in Cloudflare via their portal? Or is it an entirely new domain that was previously hosted locally on your Virtualmin system?
The source of the problem was indeed fixed! However, if DNS domain feature for a domain is enabled but a local BIND zone file for a domain doesn’t exit, it will show the same error message.
The work around for this problem would be to disable and then re-enable DNS domain feature in Edit Virtual Server page.
Hi Ilia, thanks for the support. I did what you said: disabled the DNS Domain feature. Saved. Re-Enabled. The error message I now get is:
### Failed to save DNS options : Failed to update DNS host : Failed to setup new DNS zone : Adding new DNS zone hosted by Cloudflare DNS .. .. failed : No account found
I also recreated the API token (this time not using the global API key as I’m worried about security implications. I ran the “test” command from cloudflare which seems to work fine (API Key obscured):
{"result":{"id":"123123123123123123","status":"active"},"success":true,"errors":[],"messages":[{"code":10000,"message":"This API Token is valid and active","type":null}]}
Just to confirm, like in Plesk, the API token has the following permissions:
aaaah… now that’s a new piece of information… Strange that plesk works with ONLY the edit permissions. Let me give it a try and revert, thanks for the quick help!