cPFence installation is a straightforward process :
Requirements
- Ensure your server is compatible with Enhance server.
- Enhance must be installed already to proceed.
- Root access is required.
How to Install
1. Log in to the Client Area
- Access the client area at https://my.cpfence.app/clientarea.php.
- Retrieve your installation command. This is a one-line, hassle-free install command.
2. Fast and hassle-free, one-command setup
- Execute the following command on your server, replacing `License_key_goes_here` with your actual license key:
bash <(curl -ks https://api.cpfence.app/install.sh) -k License_key_goes_here
3. Automatic Installation
- Sit back and relax!. The installation process is fully automatic and takes approximately 2 to 3 minutes. No user input is needed during this time.
Your will be presented with this Quick Start help message in your terminal :
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Congratulations! cPFence has been successfully installed and your server is now secured!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
To receive email notifications, please add your email address:
cpfence --set-email [email protected]
To monitor the blocked attacks by cPFence IPDB, use the following command:
sudo tail -f /var/log/syslog | grep -E 'cPFence Blocked:|cPFence DDos Protection:'
To monitor the cPFence Owl™ Module Output, use the following command:
sudo tail -f /opt/cpfence/app/owl/tmp/logs/main_log
For detailed information about running modules and license status, use:
cpfence --status
To view protection statistics and information, use:
cpfence --show-stats
Need assistance or have feedback?
Please visit our support portal: https://my.cpfence.app/knowledgebase
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
4- Add your Email to cPFence
To receive email notifications please add your email to cPFence using the following command :
cpfence --set-email [email protected]
# If you don’t receive emails, enable SMTP instead:
cpfence --enable-cpfence-smtp
Tip: Check out this guide if you want to set up SMTP notifications: How to Use My SMTP for cPFence Notifications
5. Quick Whitelisting for Secondary Servers
Enhance v12 introduces IPv6 DNS by default. To ensure smooth operations across all servers, whitelist your cluster’s IPs. Please run this command on your Main CP then whitelist your ips on each server in your cluster:
bash <(curl -ks https://api.cpfence.app/whitelist_your_ips.sh)
Once you run the command above, you will receive a pre-generated bulk whitelist command. Copy and paste this command on all servers running cPFence to quickly whitelist your cluster’s IPs. This step prevents firewall blocks that could interfere with DNS resolution and other critical functions. Read more.
6- Activate these three recommended One-Click "set it and forget it" modules:
- WP AutoShield®: One-Click Security for High-Performance Secure Hosting
cpfence --wp-autoshield-on
- Owl AutoMySQL®: One-Click MySQL Resource Limits to prevent load spikes
cpfence --owl-automysql-on
- cPFence MonitorPro®: One-Click Uptime and Keyword Monitoring
cpfence --monitorpro-on
7- Start a Smart Scan (Optional)
It is recommended to run a smart scan on critical areas & commonly infected files using the following command :
cpfence --smart-scan
That's it!. You are all set and cPFence is up and running. For more Advanced configurations please check the following links (Configuring cPFence and Master cPFence: Your Go-To Cheat Sheet).
Highly recommended resources for you:
20 Tips to Set Up Your Enhance Server Like a Pro