Bobcares

Install Cloudflare Cpanel CLI: Configuration Steps

by | Oct 18, 2022

 We can Let us take a closer look at how to install Cloudflare Cpanel CLI within a few simple steps with the support of our Server management support services at Bobcares.

Cloudflare Cpanel CLI Installation

install cloudflare cpanel cli

Cloudflare is a commercial content delivery network with built in denial distribution of service (DDoS) defenses. It boosts both performance and security. Cloudflare-enabled website load twice as quickly as others.

  • Log in as the root user to the server and go to the cPanel directory.

    cd /usr/local/cpanel

  • After that, we must get the CloudFlare package to the server.

    curl -k -L https://github.com/cloudflare/CloudFlare-CPanel/tarball/master > cloudflare.tar.gz

  • Unzip the CloudFlare package.

    tar -zxvf cloudflare.tar.gz

  • This will create a directory named UNIQUE ID. It should look like this:

    cloudflare-CloudFlare-CPanel-hsI96dg6 // Here unique ID is hsI96dg6

Navigate to Cloudflare and install it as follows:

cd cloudflare-CloudFlare-CPanel-UNIQUE_ID/cloudflare // Replace the unique ID.

/install_cf API_HOST_KEY mod_cf "user Company Name" // Replace following details.

API_HOST_KEY == we will get this from the CloudFlare panel.

User Company Name: Hostname of the server.

mod_cf: If we select this option, the system will attempt to install mod Cloudflare.

It would take around 30 seconds to 5 minutes to install the CloudFlare plugin. When we install it, we will get a notice that says “CloudFlare module install successfull”.  A “CloudFlare” icon in the cPanel account will open up.

Cloudflare Configurations

Cloudflare provides two methods for users to provide Cloudflare.

  1. CNAME setup.
  2. Full DNS setup.

CNAME setup

The domain will point to the authoritative DNS in this setup. Cloudflare points towards the subdomains. This setup only provides protection at the subdomain level. The name servers for the domain will not transfer to Cloudflare nameservers.

Full DNS setup

The next step in setting up Cloudflare Cpanel CLI is to setup the DNS. The domain’s name server will modify to point to CloudFlare’s name servers. This shows that CloudFlare’s name server is now the authoritative DNS. This complete DNS setup provides protection for both the core domain and subdomains.

The CloudFlare plugin, default is CNAME. It is simple to enable full DNS setup by editing the config js file, which is located at:

/usr/local/cpanel/base/frontend/paper_lantern/CloudFlare/config.js

Also, we can not disable the CNAME setup. The available options to enable Cloudflare are:

1) CNAME setup only.

2) Both CNAME and Full DNS setups.

We can enable the Full DNS setup by changing the following:

“featureManagerIsFullZoneProvisioningEnabled”: false – In this condition, full DNS will not be active and all customers will have to use CNAME

“featureManagerIsFullZoneProvisioningEnabled”: true – In this setup full DNS will enable and customers can select either full DNS or CNAME.

How to Enable Cloudflare in the cPanel?

After setting up the CloudFlare, it will open up a CloudFlare icon in the cPanel on the cPanel area. Here we can set up CloudFlare. To utilize this plugin, users must first create a CloudFlare account. Log in to CloudFlare through the cPanel. Once we’ve logged into CloudFlare, we can set up it as a CNAME setup or a complete DNS setup.

It is easy to enable the default setup is CNAME. Just click on the “Provision Domain with CNAME setup” to enable it. Consider that the full DNS setup is active in the config js file. There will be an option in the interface. This option can give the full DNS setup as “Provision Domain with full Zone Setup”.

[Need assistance with similar queries? We are here to help]

Conclusion

To sum up we have now learned how to install Cloudflare Cpanel CLI. We have also gone through the various steps necessary to set it up. We have performed the Cloudflare configurations, CNAME setup, and full DNS setup to complete the entire process with the support of our Server management support services at Bobcares.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.