Need help?

Our experts have had an average response time of 11.7 minutes in August 2021 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Setting up cPanel on an AWS instance

by | Jun 17, 2021

Need help Setting up cPanel on an AWS instance? We can assist you.

Here at Bobcares, we often handle requests from our customers with similar queries as a part of our AWS Support Services.

Today, we will see steps followed by our support engineers in setting up cPanel.


How to setup cPanel on an AWS instance?

Let us discuss about the steps followed by our Support Techs.

1.Setup VPC (Virtual Private Cloud)

  • Firstly, login to your AWS web console and navigate to below location for creating VPC (Virtual Private Cloud) for your cPanel infrastructure.

Services >> Networking >> VPC (VPC Dashboard)

  • Then, click on Start VPC Wizard button.
  • Next, select VPC with a Single Public Subnet.
  • Input your CIDR and Public Subnet.


2.Create EC2 Instance

Then, go to EC2 instances section of AWS console and start creating a new instance of your choice using the following steps.

Please note cPanel/WHM supports only CentOS, RedHat and CloudLinux operating systems.

  • Firstly, select an Amazon Machine Image (AMI)
  • Then, select an Instance Type
  • Configure Instance Details
  • Add Storage of your preferred size
  • Finally, tag your Instance Name


3.Attach a static IP address to your cPanel & WHM instance

  • By default dynamic public IP address attached to your instance and it changes every time you stop and start the instance.

To avoid that create a static IP address, and attach it to your instance.

So that when you use your domain name with your instance, you don’t have to update your domain’s DNS records each time you stop and start the instance. Or if your instance fails, you can restore your instance from a backup and reassign your static IP to your new instance.

  • You must specify the public IP address of your cPanel & WHM instance when purchasing a license from cPanel.

The license that you purchase is associated to the IP address of your instance.

  • Specify your static IP when you purchase a license from cPanel, and keep your static IP for as long as you plan to use your cPanel & WHM license with a Lightsail instance.
  • If you need to transfer your license to another IP address later, you can submit a request to cPanel.

On your instance management page, under the Networking tab, choose Create static IP, then follow the instructions on the page.


4.Login to Server and Update

  • Login to Server as root user using pem file generated during instance creation.
ssh -i server.pem [email protected]_addres
  • Update all packages on your system using following commands
yum update
  • Reboot instance.


5.Setup Hostname

  • Use below command to set a hostname temporarily on you rsystem.
# hostname
  • Now make changes permanent by the editing configuration file.
  • Edit /etc/sysconfig/network configuration file for RHEL & CentOS
  • For Ubuntu and Debian systems edit /etc/hostname and enter hostname there
  • Now edit /etc/hosts for binding hostname with local system ip.


6.Install cPanel & WHM

Use the following commands to complete the installation. This process will take time as per your network speed and system configuration.

cd /home
yum install wget
wget -N
sh latest


7.Setup NAT

  • Sometimes the system doesn’t automatically detect NAT on your instance. Then you can run below command to do it manually.

info [build_cpnat] =>
  • Now Navigate to Home >> Server Configuration >> Basic cPanel & WHM Setup in your WHM and check for The IPv4 address to use to set up shared IPv4 virtual hosts shoud show your public ip address.


8.Open Ports in Security Group

Finally, open all inbound ports in the AWS security group used by the instance or open specific ports for inbound network.

[Need help with AWS setup? We’d be happy to help you]



In short, today we discussed about the steps followed by our Support Techs in Setting up cPanel on an AWS instance.


Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.


var google_conversion_label = "owonCMyG5nEQ0aD71QM";


Submit a Comment

Your email address will not be published. Required fields are marked *

Privacy Preference Center


Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]


Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid


Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie


These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.