Improve your site with free and paid apps:

Cloudflare Developer Fund

Cloudflare and world class investment firms invest $100 Million to deliver powerful tools for the Internet. The Cloudflare Developer Fund is looking for companies that are building apps on Cloudflare’s platform.

Technical Resources and Integrations

Download tools and plugins for control panels and content management systems.

Technical Tools

Billing system plugins

Control panel plugins

Hosting provider tools

Logging Real Visitor IP Addresses: mod_cloudflare for Apache httpd

Because Cloudflare acts as a proxy, you will notice changes to the way that your website visitors' IP addresses are displayed both in your server logs and web applications - notably that all access appears to be coming from Cloudflare IP addresses. You can read more about the reasons for this in our knowledge base article.

You can change this behavior and log & display the actual visitor IP addresses by using mod_cloudflare.


mod_cloudflare supports Apache httpd 2.2.x and 2.4.x. Installation requires root access to the command line of your server via SSH.

Note: if you use cPanel, follow the proper installation method below. However, if you are a hosting provider, you should install the Cloudflare cPanel plugin instead. Installing the Cloudflare cPanel plugin will automatically install mod_cloudflare. Note that using the Cloudflare cPanel plugin requires that you are a Certified Partner with a Host API Key. You can apply to be a Certified Partner here.


Please choose your desired installation method below. Cloudflare recommends using a manual installation unless you know that Apache httpd and its dependencies have all been installed to your server using your operating system's package management system (such as RPM or DEB) - i.e. not manually compiled and installed.

Option 1: Installation from Packages

Download the appropriate package to your web server and install it using your operating system's 'rpm' or 'dkpg' commands.

For RedHat / CentOS / CloudLinux:

# yum install glibc.i686
# rpm -i mod_cloudflare-elX.latest.rpm

For Debian / Ubuntu:

# dpkg -i mod_cloudflare-XXXXX.latest.deb


RHEL/CentOS/CloudLinux 7 (64-bit) RHEL/CentOS/CloudLinux 6 (64-bit)


Debian 8 (64-bit) Debian 7 (64-bit)


Ubuntu 16.04 (64-bit) Ubuntu 15.10 (64-bit) Ubuntu 15.04 (64-bit) Ubuntu 14.04 (64-bit) Ubuntu 12.04 (64-bit)

Option 2: Installation on cPanel Servers

cPanel uses a system known as EasyApache to rebuild Apache httpd during updates or certain configuration changes. The below instructions will integrate mod_cloudflare support into EasyApache so that it can be easily included from the cPanel web interface and remain activated in Apache httpd after rebuilds.

Note: credit for this perl script goes to Tyler Larson at

# wget
# bash

Alternatively, you can run this instead:

# bash <(curl -s

Next, you can use EasyApache, choose to customize your profile, then, on the 'Short Options List' screen, checkbox the 'Mod Cloudflare' feature, and click 'Save and Build'.

Option 3: Manual Installation: RedHat / CentOS / CloudLinux

mod_cloudflare has a few software dependencies that need to be installed first:

# yum install libtool httpd-devel

Next, you should download the mod_cloudflare source to your server:

# wget

Finally, install the module. Depending on your system, the command to run might be apxs or apxs2. So, run one of the below two commands. If you get a 'Command not found' when running one, try the other:

# apxs -a -i -c mod_cloudflare.c

# apxs2 -a -i -c mod_cloudflare.c

Option 4: Manual Installation: Debian / Ubuntu

mod_cloudflare has a few software dependencies that need to be installed first:

# apt-get install libtool apache2-dev

Note: If you find that you are unable to install apache2-dev then you should install:

# apt-get install libtool apache2-threaded-dev

Next, you should download the mod_cloudflare source to your server:

# wget

Finally, install the module. Depending on your system, the command to run might be apxs or apxs2. So, run one of the below two commands. If you get a 'Command not found' when running one, try the other:

# apxs -a -i -c mod_cloudflare.c

# apxs2 -a -i -c mod_cloudflare.c

Dynamic Content Caching: Railgun WAN Optimizer

Railgun ensures that the connection between your origin server and each Cloudflare data center is as fast as possible. It does this by using an array of techniques to accelerate the HTTP connections between Cloudflare and your servers. Railgun is available for Business and Enterprise users. Learn more about Railgun.


The use of Railgun on your own server requires a Business or Enterprise subscription and a 64-bit architecture.

Installation instructions

Dynamic DNS Client: ddclient

A port of ddclient, this includes support for using the Cloudflare dynamic DNS updating system.


Perl 5.004 or later (you need the IO::Socket::SSL perl library for ssl-support)


cp ddclient /usr/sbin/
mkdir /etc/ddclient
mkdir /var/cache/ddclient
cp sample-etc_ddclient.conf /etc/ddclient/ddclient.conf
vi /etc/ddclient/ddclient.conf

—and change hostnames, logins, and passwords appropriately

For Cloudflare, this should be:

## Cloudflare (
protocol=cloudflare, \, \ \
password=my-cloudflare-api-key \,

To run in debug mode:

ddclient -daemon=0 -debug -verbose -noquiet

See the docs here for full configuration and installation instructions.


IIS Module (third party)


Create a directory for the HTTP Module. Example:

C:\> md c:\HttpModules

Copy the files from the Release build of your target platform (x86 for 32-bit or x64 for 64-bit). Example:

C:\> xcopy <zip_dir>\x64\Release\* c:\HttpModules

Copy the Install-XFF-ps1 PowerShell script to the target directory. Example:

C:\> xcopy <zip_dir>\Install-XFF.ps1 c:\HttpModules

Change directory to the install path

C:\> cd c:\HttpModules

Register the Module with the install script (or via IIS admin).

C:\HttpModules\> .\Install-XFF.ps1 -cmd install -module_path c:\HttpModules\F5XFFHttpModule.dll

The module should now be installed in your top level IIS server Module settings as well as each existing application. You can selectively add/remove them from the IIS admin at this point.

Customization for Cloudflare

The F5 XFF Http Module supports a configuration file named F5XFFHttpModule.ini. It looks in the same directory as the configured .DLL for a file of the same name as it self with the .INI extension. An example file is included but renamed to F5XFFHttpModule.ini.bak. Once you get rid of the ".bak" extension and restart the application the settings will take effect. In this configuration file, you should override the default header name of X-Forwarded-For to CF-Connecting-IP.


WHMCS Plugin for Hosting Providers

Cloudflare Extension for WHMCS 5.3.

Download Instructions in PDF Format


ServerShield for Parallels Plesk 12

Cloudflare Extension for Parallels Plesk 12.

Download Instructions in PDF Format


cPanel Plugin for Hosting Providers

Cloudflare plugin for CPanel. Please note: The cPanel plugin is for Certified Cloudflare Hosting Partners.

Download Instructions in PDF Format


Using an SSH client such as Terminal or Putty:

Step 1. Access cPanel for the server using root user by:


Step 2.

bash <(curl -s -k HOST_API_KEY  -n 'YOUR_COMPANY_NAME'

Interworx (third-party) for Hosting Providers

Interworx has developed a plugin for their hosting provider control panel system. This plugin allows Cloudflare partners to enter their Host API Key and easily allow their customers to sign up for and manage Cloudflare services..

Installation Instructions

ISPsystem for Hosting Providers


Step 1:

Enter the ISPmanager control panel - go to the Server Settings module - the Plug-Ins section. Then, click the Install icon in the upper corner of the toolbar.

Step 2:

In the Plug-ins collection section you can choose a plug-in that you want to install from the available collection of plug-ins. You can also view information about a plug-in, such as its author, programming language that was used to write the plug-in, its functions and other information.

Step 3:

If you want to install the Cloudflare plug-in, select it from the list and click the "Install" icon. A new from will be displayed. Carefully read the information in the form before installation.

Step 4:
Once the installation is complete, the plug-in will be added into the Plug-in management module.

Step 5:

To learn information about a plug-in, select one and click the "Info" icon. The following form will be displayed:

  • Detailed description — description of the plug-in's functionality.
  • Programming language — programming language that was used to write this plug-in.
  • Required modules — supplementary modules that are needed for plug-in installation.
  • Author — name of the plug-in's developer.
  • Support home page (or "Contact information) — clicking the "Support home page" link will open the page with information about this plug-in. this can be a web-site, forum post or blog. If the "Contact information" field is used instead of the link, it will contain the developer's email address.

Hosting Provider API

This document explains in detail the semantics of the function calls you can make using the Hosting Provider API service. This service is limited to access by web hosting providers who have agreed to the required license terms.

Cloudflare Hosting Provider API

Host API client (third party, Perl)

Third party Host API client in PERL


Host API client (third party, PHP)

Third party Host API client in PHP