3 - Cloudflare DNS Synchronization with CyberPanel

In version v2.0.0, CyberPanel has added the ability to synchronize DNS entries between Cloudflare and CyberPanel DNS on your own server

What is Cloudflare?

Cloudflare is reverse proxy service, which offers certain features such as

  • CDN (Cloud Delivery Network) by caching the data from your website and serving them from their Point of Presence nearest to your visitor. This decreases the load on your server and saves bandwidth
  • Network Gateway by automatically translating between IPv4 and IPv6
  • SSL provider by issuing a certificate for your domain on their own server with one click with zero changes on your server
  • WAF (Web Application Firewall) as Cloudflare sits between your visitors and your server it can block
  • It offers direct installation of many apps without changing anything on site.

Why do you need synchronization

In order to use Cloudflare the nameservers of the domain are changed to the ones provided by Cloudflare and that means any changes done such as adding subdomains or changing mail providers or using a new DKIM key on CyberPanel have to be manually inputted in CloudFlare’s DNS panel. You have to repeat the process for every change you make to every domain on your account on CyberPanel.

That’s a lot of manual data entry and we at CyberPanel made it easier for you to do by adding Cloudflare integration right into your CyberPanel.

What does CyberPanel Synchronisation do

CyberPanel has added deep integration with Cloudflare which can automatically do the following on your behalf

  • Add, edit or remove DNS records: Whenever you create new DNS entry like for email or subdomain or text verification, you don’t have to log in to your Cloudflare account and do it again manually
  • Create necessary zone info and domain in Cloudflare: When you create a new website on CyberPanel, CyberPanel checks if that domain is in your Cloudflare account.
    • If it is already present, Cyberpanel will create all the DNS records and copy them over to Cloudflare DNS records.
    • If it isn’t present. CyberPanel will create the domain in Cloudflare with a basic free account and then create all the DNS records and copy them over to Cloudflare DNS records.
  • Constant sync: If you change any of the records on CyberPanel or any record is missing from the Cloudflare account, this feature will update and/or populate the changes on your Cloudflare account. Note that changes on Cloudflare will not be synced to Cyberpanel.

How to use Cloudflare integration

From version v1.9.5 onwards, you can use Cloudflare integration by going into DNS-> Cloudflare

You will be greeted by a screen like this

In order to obtain API token from Cloudflare click the avatar on the right of you Cloudflare account and under profile setting click the API token tab

Click on the blue “View” button next to Global API Key. Enter your password to get your API token key

Please enter the email address that you use on the Cloudflare account and you Cloudflare API token generated in the last step on Cloudflare setting page in CyberPanel and select Enable for Sync local Records to Cloudflare

Click save

On the next screen, you can add remove or sync your DNS between CyberPanel and Cloudflare

Voila, in less than 10 minutes we were able to integrate Cloudflare with Cyberpanel and we have made DNS updates easy as a breeze directly from the CyberPanel

2 Likes

hello

so i do not need input the DNS at CF anymore ?
only need add website… then… all set ?

Good question, what do we need first? put dns, or just sinc with cloudflare?

Only need to add website and all sync goes automatically

both sync ?
changing at CP will make change at CF ? and viceversa ?

How do I remove the Cloudflare details? When I clear the email and key, i get this error:

image

Also, disabling the sync doesn’t actually work - I just created a new website after disabling and the records synced with Cloudflare automatically.

Changes on Cloudflare won’t be synced on CyberPanel side.

2 Likes

@shoaibkk can you reproduce the issue mentioned by @nick.chomey

noted… so after i do sync… i never need to open/access (except emergency) my Cloudflare anymore to add or change/edit, add, remove the zone info like mx in-A cname etc

thankyou for your update/info…

1 Like

I have this error, what could be an isshue?

Hello, can you fixed the problem? I have the same problem and need a resultion. Thx for answer me

I agree! Synchronisation is one of the biggest players in digital communication. In telecommunication systems, timing synchronisation is critical for retrieving the original delivered signal. It is required to synchronise to the transmitter’s symbol timing in order to have a communication system that runs at the proper time and in the correct sequence. I am not sure if what I am about to say is still relevant in Cloudflare, but is it really correct that digital communication systems that use coherent modulation require three levels of synchronisation: 1. Phase, 2. Symbol, and 3. Frame?