How to Launch an AWS AMI Instance for cPanel & WHM

This guide explains how to launch a cPanel & WHM instance on Amazon Web Services™ (AWS) using the official Amazon Machine Image™ (AMI). This is the recommended and most reliable method for deploying cPanel & WHM on AWS.

AWS AMIcPanel WHM InstallationLaunch EC2 Instance

~3 min read • Updated Feb 24, 2026

1. Overview


This guide explains how to launch a cPanel & WHM instance on Amazon Web Services™ (AWS) using the official Amazon Machine Image™ (AMI). This is the recommended and most reliable method for deploying cPanel & WHM on AWS.


Warnings:

  • This guide assumes you are using dedicated DNS servers.
  • cPanel & WHM cannot run on IPv6-only servers. At least one IPv4 address is required.
  • An incorrect hostname may cause licensing issues.



2. Create a Key Pair


If your AWS account does not already have a key pair, create one before launching the instance:


  1. Sign in to the AWS Management Console.
  2. Go to Services → EC2.
  3. In the left menu, click Network & Security → Key Pairs.
  4. Click Create key pair.
  5. Enter a name and click Create.

Your browser will download a .pem private key file.


2.1 Add the Key Pair to Your System


macOS:

mv ~/Downloads/example.pem ~/.ssh/
chmod 600 ~/.ssh/example.pem
ssh-add ~/.ssh/example.pem

Windows: Use PuTTY or Windows OpenSSH according to AWS documentation.




3. Select the Official cPanel & WHM AMI


Go to the AWS Marketplace and choose the appropriate AMI:


  • AlmaLinux: cPanel & WHM for AlmaLinux
  • Ubuntu: cPanel & WHM for Ubuntu
  • Rocky Linux: cPanel & WHM for Rocky Linux

Click Continue to Subscribe.


Important: Only use AMIs where the seller is cPanel or WebPros International, LLC.




4. Subscribe and Verify Fulfillment


  1. Click Accept Terms.
  2. Wait for subscription confirmation.
  3. Click Continue to Configuration.
  4. Ensure the Fulfillment Option is 64-bit (x86) AMI.



5. Verify Version and Region


Select the desired cPanel & WHM version. The latest version is selected by default.


Note: After launch, the AMI automatically runs /usr/local/cpanel/scripts/upcp to apply updates.


Confirm or change the AWS Region.




6. Launch the Instance


Click Continue to Launch.


Under Action, select Launch from Website.


6.1 Choose an Instance Type


Select an instance type that meets cPanel’s minimum requirements.


Warnings:

  • Instance type affects billing.
  • Do not use Spot Instances; they may cause license issues.

6.2 Configure VPC and Subnet


Select or create a VPC and Subnet.


6.3 Configure Security Group


Click Create New Based on Seller Settings to apply recommended cPanel firewall rules.


6.4 Select Key Pair


Choose the key pair you created earlier.


6.5 Launch the Instance


Click Launch. The instance will begin initializing.




7. Assign an Elastic IP (Highly Recommended)


AWS public IPs change after reboot. cPanel licenses require a static IP.


  1. Go to EC2 Dashboard → Elastic IPs.
  2. Click Allocate Elastic IP address.
  3. Select the IP → Actions → Associate Elastic IP address.
  4. Choose your instance and private IP.



8. Connect via SSH


Use SSH to monitor installation:


AlmaLinux:

ssh ec2-user@IPADDRESS
sudo su -

Ubuntu:

ssh ubuntu@IPADDRESS
sudo su -

Rocky Linux:

ssh rocky@IPADDRESS
sudo su -



9. Set the Root Password


Run the following command:


passwd



10. Log In to WHM


Open the following URL:


https://YOUR_IP:2087


Login credentials:

  • Username: root
  • Password: the password you set

Accept the license and complete the initial setup.




11. Fix Hostname Issues


AWS may reset the hostname after reboot. To preserve it:


printf 'preserve_hostname: true\nmanage_etc_hosts: false\n' > /etc/cloud/cloud.cfg.d/99-preserve-hostname.cfg



12. Troubleshoot Installation


For common issues, refer to the Troubleshoot Your Installation section in cPanel documentation.




Conclusion


This guide covers all steps required to launch, configure, and manage a cPanel & WHM instance on AWS using the official AMI. Following these steps ensures a stable, secure, and fully licensed hosting environment.


Written & researched by Dr. Shahin Siami