How to Install cPanel & WHM on Google Compute Engine™ through the Google Marketplace

Last modified: February 22, 2024


This document explains how to install a cPanel & WHM instance on the Google Compute Engine™ service through the Google Marketplace.

  • cPanel & WHM requires a valid license. If this is a new installation, you can activate a free 15-day trial license.
  • To activate a new license, you must have a cPanel Store account with a verified email address.
  • Due to networking requirements, you cannot run an IPv6-only cPanel & WHM server. You must have at least one IPv4 address.

Create a cPanel & WHM instance on Google Compute Engine

Access the Google Compute Engine

To log in to the Google Compute Engine website, perform the following steps:

  1. If you do not already possess a Google account, create one. Then, log in to Google.
  2. Navigate to the Google Compute Engine website. The Google Compute Engine interface will appear.
  3. Click Start free. A new interface will appear.

Accept the trial offer

Accept the Terms of Service and click CONTINUE. The Payment Information interface will appear.

Enter or confirm your payment information

To enter or confirm your payment information, perform the following steps:

  1. Enter your payment information or confirm the existing payment method on your account.
  2. Click START MY FREE TRIAL. The Google Cloud Platform interface will appear, and Google will send you a confirmation email. Provide the information the interface asks for.

Use the cPanel & WHM Marketplace image

To use the cPanel & WHM image on Marketplace, perform the following steps:

  1. Search for Marketplace. The Marketplace interface will appear.

  2. Search for cPanel. A list of images will appear.

  3. Select the listing you wish to install:

    • For CentOS, select cPanel & WHM on Linux.
    • For Ubuntu®, select cPanel & WHM on Ubuntu.
    • For AlmaLinux OS, select cPanel & WHM on AlmaLinux.

    The full image profile will appear.

  4. Read the details, such as estimated costs.

  5. Click the LAUNCH button.

  6. A list of required APIs will appear. Click ENABLE to enable these required APIs. The deployment interface for the listing you selected will appear.

You must enable billing on your account to proceed. If asked, enable billing.

Create an instance

To create the instance, perform the following steps:

  1. In the Deployment name text box, enter a name for the instance.
    The Deployment name can only contain lowercase characters, numbers or dashes. It must start with a lowercase letter and cannot end with a dash.
  2. In the Zone menu, select a zone within the region. The zone determines which computing resources are available and where Google stores your data.
  3. In the Machine type section, select the Series and Machine type for your instance.
    You must select a Machine type with at least 2GB of memory.
  4. In the Boot disk section, select Standard Persistent Disk from the Boot disk type menu.
  5. In the Boot disk size in GB text box, enter a value greater than 40 GB.
  6. In the Networking section, click Add network interface and select a network if you do not wish to use the default network.

    For information about how to create an instance with multiple network interfaces, read Google’s Creating instances with multiple network interfaces documentation.

  7. In the Firewall section, we have already configured the required ports for your instance.
  8. After the Firewall section, select the I accept the GCP Marketplace Terms of Service and WebPros International, LLC Terms of Service checkbox.
  9. Click DEPLOY. The Google Cloud Platform™ Deployment Manager interface will appear.

The cPanel & WHM installation process

When you create an instance, cPanel & WHM will automatically begin installation in the background. To watch the installation progress, connect to the instance via SSH immediately after you create the instance.


The installation process takes about 10-15 minutes. You cannot log in to WHM until the installation process is complete.

Connect to the instance

The interface will display a green icon next to the instance name when it is ready.

The right panel contains helpful information to get you logged in to your server. To connect to the instance, perform the following steps:

  1. Click SSH. A new window will appear with a terminal session.
  2. Enter sudo su - to get root access.

Change the root password

To change the root user’s password, perform the following steps:

  1. Run the passwd command.
  2. Enter a new password.
  3. Enter the new password again.

A confirmation message will appear.

Assign a hostname to the server

If your server does not use a resolvable fully-qualified domain name as the hostname, it will automatically receive one from WebPros International, LLC. For more information, read our Automatically-Issued Hostnames documentation.

To assign a hostname to the server, run the following command, where represents your desired hostname:

hostnamectl set-hostname

Create the hostname fix hook

To configure VPS deployments, many cloud hosting providers use the dhclient script. This script includes the configuration of the instance’s hostname. The dhclient script may not preserve the locally-configured hostname. Hosting providers use scripts to work around this issue. For example, the Google Cloud Platform™ service uses the google_set_hostname script.

These workaround scripts may interfere with WHM’s Change Hostname feature (WHM » Home » Networking Setup » Change Hostname). They can cause hostname configuration issues and a locked cPanel & WHM license. You must create a dhclient exit hook script to set the hostname properly.

To create the hook, run the following command, where represents your server’s hostname:

mkdir -p /etc/dhcp/dhclient-exit-hooks.d/ && echo -ne '#!/bin/sh\nhostname\n/scripts/fixetchosts\n' > /etc/dhcp/dhclient-exit-hooks.d/zzz-set-hostname && chmod +x /etc/dhcp/dhclient-exit-hooks.d/zzz-set-hostname

For information on this hook, read our Cloud-Hosted Hostname Solution documentation.

When you finish, close the terminal session and return to the Deployment Manager interface.

Configure a static IP address

By default, Google assigns ephemeral IP addresses to VM instances. They will remain assigned to the server as long as the VM is active, but will change if you turn off and then turn back on a VM.

To configure a static IP address for the server, perform the following steps:

  1. Click the three-line menu button on the left side of the screen. Select VPC network, then select IP addresses.
  2. Click the EXTERNAL IP ADDRESSES tab. You will see all external IP addresses your instances use. Locate the IP address you want to convert.
  3. In the row for that IP address, click RESERVE. The Reserve a new static IP address inteface appears.
  4. In the Name text box, enter a name for the IP address.
  5. Click RESERVE.

Log in to WHM

To log in to WHM, perform the following steps:

  1. Navigate to the following URL, where IPADDRESS represents your server’s external IP address: https://IPADDRESS:2087
    You can also click the Admin URL link or the LOG INTO THE ADMIN PANEL button in the Deployment Manager interface.
  2. Enter your username and password.

    Unless you have configured a different login, use root for the username, and the password you changed.

  3. Click Log in.

Configure WHM

For more information about how to configure cPanel & WHM, read our WebHost Manager documentation.

For more information on how to quickly build a website on a newly-installed cPanel & WHM server, read our From WHM to Website documentation.

cPanel & WHM requires a valid license. If this is a new installation, you can activate a free 15-day trial license.

Google blocks port 25

By default, Google disables port 25 for outbound email traffic.

For more information on Google’s block of port 25, read Google’s Sending Email from an Instance documentation.

For potential solutions, read Google’s SMTP relay: Route outgoing non-Gmail messages through Google support article and the Smarthost configuration section in our Exim Configuration Manager documentation.

Deleting an instance

To delete a Google Compute instance, read Google’s Deleting an Instance documentation.

Additional Documentation