The CloudFlare plugin integrates CloudFlare services with the cPanel server. It allows your customers to set up CloudFlare services via cPanel. This plugin can be installed on your cPanel server with a few commands.
Note: First, you should get the HOST KEY from CloudFlare before you install the CloudFlare plugin.
Step 1. Log in to your server via SSH with the root user and navigate to the cPanel directory.
# cd /usr/local/cpanel
Step 2. Download the CloudFlare package to your server.
# curl -k -L https://github.com/cloudflare/CloudFlare-CPanel/tarball/master > cloudflare.tar.gz
Step 3. Extract the CloudFlare package.
# tar -zxvf cloudflare.tar.gz
Step 4. This will extract a directory with UNIQUE_ID; the directory should look like the following:
cloudflare-CloudFlare-CPanel-hsI96dg6 // Here unique ID is hsI96dg6
Step 5. Navigate to the CloudFlare directory and install it in the following format:
# cd cloudflare-CloudFlare-cPanel-UNIQUE_ID/cloudflare (Replace your unique ID) #./install_cf API_HOST_KEY mod_cf "Your Company Name" (Replace the following details)
- API_HOST_KEY - You will get this from your CloudFlare panel.
- Your Company Name - Hostname of your server.
- mod_cf - It is optional. If set, the installer will try to install mod_cloudflare
CloudFlare plugin installation may take between 30 seconds to 5 minutes.
When installed, you will receive this message – ‘CloudFlare module installed successfully – and you will see an icon for CloudFlare in the cPanel accounts.
Conclusion:
Installing the CloudFlare cPanel plugin is a simple yet powerful way to bring CDN and security control directly into your users' cPanel accounts. With just a few commands, hosting providers can empower their clients to activate CloudFlare’s DDoS protection, caching, and performance features without leaving the cPanel dashboard.
Before starting, ensure you’ve obtained your CloudFlare API Host Key, as it's required for installation. Once installed, clients will see the CloudFlare icon inside their cPanel — unlocking smoother site performance, better security, and faster load times with just a few clicks.
