Cloudflare cPanel CLI Installation WHM

Cloudflare cPanel CLI Installation WHM

🌐 Cloudflare cPanel CLI Installation

Cloudflare is a content delivery network (CDN) with built-in DDoS protection. It improves website speed, security, and reliability. Installing the Cloudflare cPanel CLI plugin integrates Cloudflare directly into cPanel, giving users an icon to manage their domains.


🔹 Step 1: Log in as root and move to cPanel directory

cd /usr/local/cpanel

🔹 Step 2: Download the Cloudflare package

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

🔹 Step 3: Extract the package

tar -zxvf cloudflare.tar.gz

This will create a directory with a unique ID, for example:

cloudflare-CloudFlare-CPanel-hsI96dg6

🔹 Step 4: Navigate and install Cloudflare

Replace UNIQUE_ID with your extracted folder’s ID.

cd cloudflare-CloudFlare-CPanel-UNIQUE_ID/cloudflare

Run the installer:

./install_cf API_HOST_KEY mod_cf "user Company Name"

Replace values:

  • API_HOST_KEY → from Cloudflare panel

  • "user Company Name" → Hostname of the server

  • mod_cf → to install mod_Cloudflare module

👉 Installation takes 30 seconds to 5 minutes.
👉 If successful, you’ll see:

CloudFlare module install successful

👉 A Cloudflare icon will now appear in cPanel.


⚙️ Cloudflare Configurations

Cloudflare can be set up in two ways:

1️⃣ CNAME Setup

  • Default option.

  • Only protects subdomains.

  • Domain continues using its own nameservers.

2️⃣ Full DNS Setup

  • Domain’s nameservers switch to Cloudflare nameservers.

  • Protects both root domain + subdomains.


🔹 Enable Full DNS Setup

Edit the config file:

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

Change the line:

"featureManagerIsFullZoneProvisioningEnabled": false

➡️ To:

"featureManagerIsFullZoneProvisioningEnabled": true
  • false → Only CNAME setup is available.

  • true → Full DNS setup enabled (users can choose Full DNS or CNAME).


🚀 How to Enable Cloudflare in cPanel

  1. Log in to cPanel.

  2. Open the Cloudflare icon.

  3. Create/Log in to a Cloudflare account.

  4. Choose setup:

    • Provision Domain with CNAME setup (default).

    • Provision Domain with Full Zone Setup (if enabled in config).


✅ Done! Now Cloudflare is integrated into cPanel, and users can choose between CNAME or Full DNS setup directly.

Share

What's Your Reaction?

Like Like 0
Dislike Dislike 0
Love Love 0
Funny Funny 0
Angry Angry 0
Sad Sad 0
Wow Wow 0