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

~4 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

Related Articles

How to Restore Your cPanel Account: A Complete Guide for New System Administrators

This guide explains how new system administrators can restore a cPanel account using WHM, transfer accounts and configurations between servers, and enable diagnostic logging for transfer and restore operations. It covers essential concepts such as WHM vs. cPanel, root access, backup handling, SFTP uploads, transfer methods, and advanced debugging tools.

Continue

آموزش کامل انتقال تمام اکانت‌های cPanel از یک سرور به سرور دیگر

این مقاله نحوه انتقال همه اکانت‌های cPanel، تنظیمات سرویس‌ها، گواهی‌های SSL و IP اصلی سرور را از یک سرور قدیمی (Source) به یک سرور جدید (Target) توضیح می‌دهد. شامل نصب سرور جدید، انتقال تنظیمات، انتقال اکانت‌ها، تغییر IP، تنظیم DNS و نصب مجدد SSL است.

Continue

How to Migrate a WordPress® Installation to a cPanel & WHM Server

This guide explains how to migrate a WordPress installation from a macOS-hosted environment to a cPanel & WHM server. It covers exporting the database, uploading WordPress files, creating and importing a MySQL database, updating URLs, configuring wp-config.php, fixing broken links, and finalizing the migration.

Continue

How to Manually Transfer an Account Between Servers in cPanel & WHM

This article explains how to manually transfer a cPanel account between servers when the account is too large for WHM’s automated transfer tools. It covers creating temporary directories, compressing public_html and log files, securely transferring data with SCP, and restoring the files on the destination server.

Continue

How to Manually Migrate Horde Calendars and Contacts to Roundcube in cPanel & WHM

This article explains how to manually migrate Horde calendars and contacts to Roundcube in cPanel & WHM version 108 through 118. It covers exporting Horde data, placing it in the correct directories, and importing it into Roundcube using built‑in plugins or manual import tools.

Continue

How to Manually Migrate Accounts to cPanel & WHM from Unsupported Control Panels

This article explains how experienced system administrators can manually migrate accounts from unsupported third‑party control panels to cPanel & WHM. It covers pre‑migration steps, installation requirements, file and directory transfers, database restoration, SSL migration, and post‑migration tasks.

Continue