Configure Cloudflare DNS

SYSTEM INFORMATION
OS type and version AlmaLinux 9.8
Webmin version 2.670
Virtualmin version 8.2.0 Professional
Webserver version ?
Related packages All installed packages are up to date

@Ilia
With the migration of my sites to React, backed by AI, I need to add active subdomains and tried to use Cloudflare but wasn’t successful. Would there be any changes that need to be made because of the updates that were added in Cloudflare?

We need more than “but wasn’t successful”. What’d you try, what went wrong?

I followed the guide from How to Configure Cloudflare DNS | Virtualmin — Open Source Web Hosting Control Panel

I tried both authentication methods and had no luck.

Were you lucky enough to see an error message? :slight_smile:

These columns are already ‘Ready’

This is what I have on Cloudflare

What about Zone edit? I only see read.

Ok, found that summary

I don’t why I have this, but I have 2 policy’s. Its so long since I did it I can’t remember why.

I turned off, zone edit on allzones and I get your error. So that would be the issue.

Cloudflare was activated successfully.
The thing is, Virtualmin doesn’t show the DNS entries already configured in Cloudflare.
It adds to Cloudflare the DNS entries that are already in Virtualmin.
And this causes errors and the total loss of the existing DNS configurations in Cloudflare.

Not sure what you mean, you just activated it how can it have it already configured.
In the virtual server have you switch from local to cloundflare.

When I activate Cloudflare DNS on the virtual server, it understands that it should copy the BIND DNS records.

Yep, you should see the records at cloudflare.

This isn’t right. The Cloudflare DNS records should go to the domain in Virtualmin, not the other way around.

Right, not sure it works that way. I’ve always got virtualmin to create and change record and they copied to cloudflare,
If you set the template to have cloudflare as the default method, when you create a domain the dns record will be created on cloudflare.

@Jamie, there is an option in the template DNS section to take over an existing zone. What does it do if it’s set to “Yes”?

If it’s set to Yes and the domain being created already exists on Cloudflare, Virtualmin will allow creation to continue and bring the zone under it’s control. If No is selected, domain creation will fail with an error that it already exists on Cloudflare.

In my case, the domains exist in Virtualmin and Cloudflare. They were created in Virtualmin and then the need arose to move them to Cloudflare to create a subdomain in React that uses an IP outside of Virtualmin. So, in Cloudflare, DNS records were added that fit my new setup, and I expected these records to be added in Virtualmin when it was said that Cloudflare would manage them. In this case, should I delete all the DNS records I had in Virtualmin so that the Cloudflare records can be added? If so, couldn’t this procedure be included automatically in the process? In other words, when I declare that the DNS records should be the ones from Cloudflare, they should be copied/added in Virtualmin, deleting what’s already there?

Thanks! This is a bug and will be addressed in this PR: