This guide walks you through the complete process of installing cPanel/WHM and WHMCS on a fresh Linux VPS, giving you a fully functional web hosting control panel paired with an automated billing and client management platform. Whether you are launching a hosting business or managing infrastructure for clients, this step-by-step tutorial covers server preparation, cPanel installation, WHM configuration, WHMCS setup, and essential security hardening.
Last updated: May 8, 2026
The web hosting industry continues to grow rapidly, with over 330,000 web hosting providers operating globally. Running your own hosting infrastructure gives you complete control over pricing, resources, and the customer experience. cPanel/WHM remains the industry-standard control panel, and WHMCS is the most widely adopted billing and automation platform for hosting providers.
This guide covers both tools on a single VPS, from a clean OS install to a production-ready hosting environment.
Prerequisites
Before you begin, make sure you have:
- A FlashRDP Linux VPS with at least 2 vCPUs, 4 GB RAM, and 40 GB NVMe storage
- A supported OS: AlmaLinux 8/9, Rocky Linux 8/9, or Ubuntu 22.04 (fresh, minimal install)
- Root SSH access to the server
- A valid cPanel license (15-day free trial available at cpanel.net)
- A valid WHMCS license (purchased from whmcs.com)
- A registered domain with DNS access (for your hostname and client portal)
- An SSL certificate (free via AutoSSL in cPanel, or use Let's Encrypt)
💡 Tip FlashRDP Linux VPS plans include full root access, KVM virtualization, 1 Gbps unmetered bandwidth, and a dedicated static IPv4 address. Plans start at $11.99/month. View Linux VPS plans.
cPanel & WHMCS Architecture Overview
Before diving in, here is a quick overview of how the components fit together:
| Component | Role | Default Port(s) |
|---|---|---|
| WHM | Server-level admin panel (root access) | 2087 (HTTPS) |
| cPanel | Per-account hosting control panel | 2083 (HTTPS) |
| WHMCS | Billing, invoicing, client management | 443 (HTTPS) |
| Apache/LiteSpeed | Web server (managed by WHM) | 80, 443 |
| MySQL/MariaDB | Database engine | 3306 |
| Exim | Mail transfer agent | 25, 465, 587 |
Step 1: Prepare the Server
Start by connecting to your VPS via SSH and configuring the basics.
1.1 Connect via SSH
Open your terminal and connect to the server using the IP address from your FlashRDP dashboard:
1.2 Set the Hostname
cPanel requires a Fully Qualified Domain Name (FQDN) as the server hostname. This should not be a domain you plan to host as a client website.
Verify the change:
⚠ Warning The hostname must resolve to your server's IP address. Create an A record in your DNS zone for server.yourdomain.com pointing to your VPS IP before proceeding.
1.3 Update the System
Update all packages to their latest versions:
1.4 Disable SELinux (RHEL-based Only)
cPanel does not support SELinux in enforcing mode. Disable it:
1.5 Configure the Firewall
Allow the essential ports cPanel uses:
Step 2: Install cPanel & WHM
cPanel provides an automated installer script that handles all dependencies and configuration.
2.1 Run the Installer
ℹ Note The installation takes 15 to 45 minutes depending on your server's hardware and network speed. Do not interrupt the process.
2.2 Verify the Installation
Once complete, the installer displays a summary with your WHM access URL. Verify cPanel services are running:
This prints the installed cPanel version.
2.3 Reboot the Server
Reboot to apply kernel updates and finalize service configurations:
Step 3: Configure WHM
After reboot, access WHM through your browser to complete the initial setup.
3.1 Access WHM
Open your browser and navigate to:
https://YOUR_SERVER_IP:2087
Log in with:
- Username:
root - Password: Your root SSH password
3.2 Complete the Setup Wizard
The WHM Initial Setup Wizard walks you through:
- License Agreement: Accept the cPanel license terms
- Contact Email: Enter an admin email for server alerts
- Nameservers: Configure your nameserver hostnames (e.g.,
ns1.yourdomain.com,ns2.yourdomain.com) - DNS Resolvers: Use reliable resolvers like
1.1.1.1(Cloudflare) or8.8.8.8(Google) - Networking: Confirm the server's IP configuration
3.3 Activate Your License
If you have a cPanel license key, activate it under WHM > Manage Your cPanel & WHM License. If you are using the trial, it activates automatically based on your server IP.
3.4 Enable AutoSSL
Enable free SSL certificates for all hosted domains:
- Navigate to WHM > Manage AutoSSL
- Select the cPanel (powered by Sectigo) provider
- Click Save
AutoSSL automatically provisions and renews SSL certificates for every domain on the server.
Step 4: Create a Hosting Account for WHMCS
WHMCS runs as a web application on your server. Create a dedicated cPanel account to host it.
4.1 Create the Account in WHM
- Navigate to WHM > Create a New Account
- Fill in the details:
- Domain:
billing.yourdomain.com(or your preferred subdomain) - Username:
whmcs(auto-generated from domain) - Password: Use a strong password
- Package: Select a hosting package or use defaults
- Domain:
- Click Create
4.2 Set Up DNS
Create an A record for your WHMCS domain pointing to the server IP:
| Record Type | Name | Value |
|---|---|---|
| A | billing.yourdomain.com | YOUR_SERVER_IP |
Step 5: Install WHMCS
You can install WHMCS using Softaculous (the fastest method) or manually.
Method A: Install via Softaculous (Recommended)
Softaculous comes pre-installed with cPanel and provides one-click WHMCS installation.
- Log in to cPanel for the
billing.yourdomain.comaccount athttps://YOUR_SERVER_IP:2083 - Scroll to the Software section and click Softaculous Apps Installer
- Search for WHMCS in the search bar
- Click Install and fill in the configuration:
- Choose Protocol:
https:// - Choose Domain:
billing.yourdomain.com - In Directory: Leave blank to install on the domain root
- License Key: Enter your WHMCS license key
- Admin Username: Choose a secure admin username (not
admin) - Admin Password: Use a strong, unique password
- Admin Email: Your admin email address
- Choose Protocol:
- Click Install at the bottom
Softaculous downloads, extracts, configures the database, and sets up WHMCS automatically.
Method B: Manual Installation
Use this method if you need full control over the installation process.
5.1 Download WHMCS
Log in to the WHMCS Members Area, navigate to Downloads, and download the latest full release ZIP file.
5.2 Upload and Extract
- Log in to cPanel for
billing.yourdomain.com - Open File Manager and navigate to
public_html - Click Upload, select the WHMCS ZIP file, and wait for the upload to complete
- Right-click the ZIP file and select Extract
5.3 Create the Database
- In cPanel, navigate to MySQL Database Wizard
- Create a new database (e.g.,
whmcs_db) - Create a new database user with a strong password
- Assign the user ALL PRIVILEGES on the database
- Save these credentials for the next step
5.4 Run the Web Installer
- Rename
configuration.php.newtoconfiguration.phpin the WHMCS directory - Open your browser and navigate to
https://billing.yourdomain.com/install/install.php - Follow the installer wizard:
- System Requirements Check: Verify all requirements pass
- License Key: Enter your WHMCS license key
- Database Configuration: Enter the database name, user, and password you created
- Admin Account: Set your admin login credentials
- Click Complete Setup
5.5 Post-Installation Cleanup
⚠ Warning Leaving the /install directory on a production server is a serious security risk. Always delete it immediately after installation.
Step 6: Secure and Harden WHMCS
Follow these essential security steps before going live.
6.1 Rename the Admin Directory
Edit configuration.php and change the admin directory path:
Then rename the actual directory:
6.2 Set File Permissions
6.3 Disable MySQL Strict Mode
WHMCS does not support MySQL Strict Mode. Create or edit the MySQL configuration:
Add:
Restart MySQL:
6.4 Set Up the WHMCS Cron Job
WHMCS requires a cron job to automate invoicing, suspensions, domain renewals, and other scheduled tasks.
In cPanel, navigate to Cron Jobs and add:
*/5 * * * * php -q /home/whmcs/public_html/crons/cron.php
This runs the WHMCS cron every 5 minutes.
6.5 Enable SSL
If AutoSSL has not yet provisioned a certificate for your WHMCS domain, force it:
- Navigate to WHM > Manage AutoSSL
- Select the
whmcscPanel user - Click Run AutoSSL
Verify SSL is active by visiting https://billing.yourdomain.com.
Step 7: Connect WHMCS to WHM
Link WHMCS to your cPanel/WHM server so it can automatically provision, suspend, and terminate hosting accounts.
7.1 Add the Server in WHMCS
- Log in to your WHMCS admin panel at
https://billing.yourdomain.com/secureadmin - Navigate to Configuration > System Settings > Servers
- Click Add New Server and fill in:
- Name: Your server name (e.g., "FlashRDP Node 1")
- Hostname:
server.yourdomain.com - IP Address: Your server IP
- Server Type: Select
cPanel/WHM - Username:
root - Access Hash / API Token: Generate an API token in WHM under Development > Manage API Tokens
- Click Test Connection to verify, then Save Changes
7.2 Create a Server Group
- Navigate to Configuration > System Settings > Servers
- Click the Server Groups tab
- Create a new group (e.g., "Production Servers")
- Assign your server to the group
7.3 Create a Product
- Navigate to Configuration > System Settings > Products/Services
- Create a new product group (e.g., "Web Hosting Plans")
- Add a product:
- Product Type: Hosting Account
- Product Name: e.g., "Starter Hosting"
- Module: cPanel
- Server Group: Select the group you created
- Package: Select or create a cPanel hosting package
- Configure pricing, billing cycles, and other settings
New client signups can now automatically provision cPanel accounts on your server.
Troubleshooting Common Issues
cPanel installer fails to start
- Verify your OS is a supported version (AlmaLinux 8/9, Rocky Linux 8/9, Ubuntu 22.04)
- Ensure no pre-installed web servers exist (Apache, Nginx)
- Check available disk space with
df -h(minimum 20 GB free) - Confirm SELinux is disabled
WHM shows a license error
- Verify your server IP matches the cPanel license IP
- Run
/usr/local/cpanel/cpkeycltto refresh the license - Ensure port 2089 is open for outbound license verification
WHMCS shows a blank page after install
- Check PHP error logs:
tail -f /home/whmcs/logs/error.log - Verify ionCube Loader 13.0+ is installed for PHP 8.2+
- Confirm all required PHP extensions are enabled:
PDO,cURL,GD,mbstring,iconv,SimpleXML
WHMCS cron not running
- Verify the cron path:
which phpshould return the cPanel-managed PHP binary - Use the full PHP path in the cron:
/usr/local/bin/php -q /home/whmcs/public_html/crons/cron.php - Check cPanel cron logs under Cron Jobs > View Log
Why FlashRDP for Hosting Panels
FlashRDP VPS plans are purpose-built for running hosting infrastructure:
- KVM Virtualization: True hardware isolation ensures consistent performance for cPanel and WHMCS under multi-tenant load
- NVMe M.2 Storage: Fast I/O for database-heavy operations like WHMCS billing queries and cPanel account creation
- Unmetered 1 Gbps Bandwidth: Handle client traffic without overage charges
- DDoS Protection: Always-on Layer 4 mitigation protects your hosting panel and client websites
- Dedicated Static IPv4: Every VPS includes a static IP for cPanel license binding and DNS configuration
- Full Root Access: Install cPanel/WHM without restrictions
- No KYC Required: Deploy with 50+ cryptocurrencies and launch instantly
- 99.95% Uptime SLA: Reliable infrastructure your clients can depend on
Plans start at $11.99/month. View all VPS plans.
Frequently Asked Questions
What are the minimum server requirements for cPanel and WHMCS?
cPanel requires at least 2 GB RAM (4 GB recommended), 20 GB disk space, and a supported Linux OS like AlmaLinux or Rocky Linux. WHMCS requires PHP 8.2+, ionCube Loader 13.0+, and MySQL 5.7+. For running both on the same server, 4 GB RAM and 40 GB storage is the practical minimum.
Can I install WHMCS without cPanel?
Yes. WHMCS is a standalone billing platform that works with any PHP-capable web server. However, installing it alongside cPanel gives you access to Softaculous for easy setup, automatic PHP management, and native integration for account provisioning.
How much does a cPanel license cost?
cPanel licenses are based on the number of accounts. Solo licenses (for a single site) start at around $15/month. Admin licenses (up to 5 accounts) and Pro licenses (up to 30 accounts) cost more. Visit cpanel.net/pricing for current rates.
Can I run cPanel on Ubuntu?
Yes, cPanel now supports Ubuntu 22.04 LTS. However, AlmaLinux 8/9 and Rocky Linux 8/9 remain the recommended distributions for cPanel/WHM deployments.
How do I automate hosting account creation with WHMCS?
After connecting WHMCS to your WHM server (Step 7), create a product linked to a cPanel hosting package. When a client places an order and payment is confirmed, WHMCS automatically creates the cPanel account, sends login credentials, and manages the entire lifecycle including suspensions and terminations.
Is it safe to run cPanel and WHMCS on the same VPS?
Yes, this is the standard setup for small to mid-sized hosting providers. For higher volumes (100+ active accounts), consider separating WHMCS onto its own VPS for performance isolation. FlashRDP's Linux VPS plans make this affordable.
How do I update WHMCS to a newer version?
Log in to the WHMCS admin panel, navigate to Utilities > Update WHMCS, and follow the on-screen update wizard. Always take a full database backup before upgrading. Review the WHMCS changelog for breaking changes.
What PHP version does WHMCS require?
WHMCS 9.x requires PHP 8.2 as the minimum, with PHP 8.3 recommended. You can manage PHP versions per account in WHM under MultiPHP Manager.

Rohan
Operations Manager & Founder
Operations Manager at FlashRDP. With 5+ years in cloud infrastructure, Rohan specializes in KVM virtualization, network security, and building privacy-focused hosting solutions for professionals worldwide.




