Virtualmin Pro with Cloudflare DNS: Failed to save DNS options : DNS zone not found!

OS type and version Ubuntu Linux 22.04.4 Linux 5.15.0-101-generic on x86_64
Webmin version 2.105
Virtualmin version 7.10.0 Pro
Related packages SUGGESTED

Hi, this isssue is similar to the one raised here and allegedly fixed, I believe:


  1. I have existing domains on my VPS in Virtualmin
  2. Upgraded to Pro License
  3. Add Global API to CloudDNS settings in System Settings
  4. (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.
  5. 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”…

Cheers, T.

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.

The domain was already hosted on cloudflare, it was not hosted locally at any point in time.

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:

* All zones - Zone:Edit, DNS:Edit

Thanks for your ongoing support.

disable “domain DNS” in your virtual server and enable it again, go in settings DNS and change DNS local with cloudflare DNS

that’s exactly what I have been doing…

Failed to save DNS options : DNS zone not found!

I don’t undertstand this:

  • the API token is working
  • the domain exists on cloudflare (has been there for a long time)
  • the message doesn’t make sense…
  • I followed the steps above, a number of times now…

clueless… this one of those things where Plesk just shines out of the box… sigh… :slight_smile:

for fix your problem you can use email and Global API Key, only TOKEN my cloudflare DNS can’t run…

A token should also have Account Settings:Read permissions as described here:


Heya, this worked, thanks! At least I have a backup solution now!

1 Like

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!

@Jamie, are you sure we need to call call_cloudflare_api("accounts", "GET") with tokens?

It looks like we need to get an account ID to pass to the request to fetch zones according to the API docs : Cloudflare API Documentation

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.