Skip to content

Commit

Permalink
[Update] How to Migrate a CPanel Server to Linode (#6500)
Browse files Browse the repository at this point in the history
* [Update] How to Migrate a CPanel Server to Linode

- Added the option to deploy cpanel using marketplace
- Updated the other distros that cn be used.

* Reworked some content in the cpanel migration and cpanel install guides

* Copy edit

* copy edit fixed heading

---------

Co-authored-by: Matt Wildman <matt@wildman.online>
Co-authored-by: John Dutton <johndutton.update@gmail.com>
  • Loading branch information
3 people authored Jul 26, 2023
1 parent ca82440 commit 2b78cc9
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 45 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
slug: install-mongodb-on-centos-7
description: 'This guide shows how to install Kloxo, the free web-based server control panel alternative to cPanel and Plesk, on a server running CentOS 7.'
description: 'This guide shows how to install MongoDB, a document-oriented NoSQL database solution, on a server running CentOS 7.'
keywords: ["nosql", "database", "mongodb", "key store", "ubuntu", "mongodb tutorial"]
license: '[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0)'
modified_by:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,46 +1,49 @@
---
slug: migrate-cpanel-to-linode
description: 'Shows how to use the CPanel Transfer Tool to copy CPanel accounts to a new Linode running WHM and CPanel.'
description: 'Shows how to use the cPanel Transfer Tool to copy cPanel accounts to a new Linode running WHM and cPanel.'
keywords: ["cpanel", "transfer tool", "migrate", "website migration"]
tags: ["cpanel","linode platform"]
license: '[CC BY-ND 4.0](https://creativecommons.org/licenses/by-nd/4.0)'
modified: 2018-08-21
modified: 2023-07-25
modified_by:
name: Linode
published: 2018-08-21
title: How to Migrate a CPanel Server to Linode
title: How to Migrate a cPanel Server to Linode
external_resources:
- '[CPanel Documentation - How to Move All cPanel Accounts from One Server to Another](https://documentation.cpanel.net/display/CKB/How+to+Move+All+cPanel+Accounts+from+One+Server+to+Another)'
- '[cPanel Documentation - How to Move All cPanel Accounts from One Server to Another](https://documentation.cpanel.net/display/CKB/How+to+Move+All+cPanel+Accounts+from+One+Server+to+Another)'
- '[How to Transfer Accounts and Configurations Between cPanel Servers](https://documentation.cpanel.net/display/CKB/How+to+Transfer+Accounts+and+Configurations+Between+cPanel+Servers)'
- '[CPanel Documentation - Transfer Tool](https://documentation.cpanel.net/display/68Docs/Transfer+Tool)'

- '[cPanel Documentation - Transfer Tool](https://documentation.cpanel.net/display/68Docs/Transfer+Tool)'
aliases: ['/platform/migrate-to-linode/migrate-cpanel-to-linode/']
authors: ["Nathan Melehan"]
---

This guide describes how to migrate from a server running WHM and CPanel on another hosting service to Linode. This transfer is completed using CPanel's official [Transfer Tool](https://documentation.cpanel.net/display/70Docs/Transfer+Tool). Prior to using the Transfer Tool, you will complete a basic WHM installation on a new Linode. Read the [Best Practices when Migrating to Linode](/docs/guides/best-practices-when-migrating-to-linode/) guide for more information about migrating your sites before beginning.
This guide describes how to migrate from a server running WHM and cPanel on another hosting service to Linode. This transfer is completed using cPanel's official [Transfer Tool](https://documentation.cpanel.net/display/70Docs/Transfer+Tool). Prior to using the Transfer Tool, you will complete a basic WHM installation on a new Linode. Read the [Best Practices when Migrating to Linode](/docs/guides/best-practices-when-migrating-to-linode/) guide for more information about migrating your sites before beginning.

{{< note respectIndent=false >}}
The Transfer Tool only transfers your CPanel accounts, and not your WHM settings. You will need to recreate your WHM settings on your new Linode separately.
{{< note >}}
The Transfer Tool only transfers your cPanel accounts, and not your WHM settings. You will need to recreate your WHM settings on your new Linode separately.

This guide does not cover how to handle CPanel deployments that are part of a DNS cluster. For guidance on migrating a CPanel server in a DNS cluster, see CPanel's [official documentation](https://documentation.cpanel.net/display/CKB/How+to+Move+All+cPanel+Accounts+from+One+Server+to+Another).
This guide does not cover how to handle cPanel deployments that are part of a DNS cluster. For guidance on migrating a cPanel server in a DNS cluster, see cPanel's [official documentation](https://documentation.cpanel.net/display/CKB/How+to+Move+All+cPanel+Accounts+from+One+Server+to+Another).
{{< /note >}}

## Migrate Your CPanel Accounts
## Migrate Your cPanel Accounts

### Deploy cPanel on Linode

### Deploy Your Linode
The first step is to deploy cPanel on the Linode platform. cPanel can be installed and configured on a Linode Compute Instance using one of the following methods:

1. Follow Linode's [Creating a Compute Instance](/docs/products/compute/compute-instances/guides/create/) guide and choose CentOS 7 as your Linux image. Choose a Linode plan with enough storage capacity to accommodate the data within the CPanel accounts on your current host.
- **Linode Marketplace:** Deploy the [cPanel App](https://www.linode.com/marketplace/apps/cpanel/cpanel/) through the Linode Marketplace to automatically install cPanel/WHM. This is the easiest method and enables you to quickly get up and running without needing to install cPanel manually. Review the [Deploy cPanel through the Linode Marketplace](/docs/products/tools/marketplace/guides/cpanel/) guide for more details.

1. Use the [Setting Up and Securing a Compute Instance](/docs/products/compute/compute-instances/guides/set-up-and-secure/) guide to create a limited Linux user with `sudo` privileges.
- **Manual Installation:** For more control over every step of the installation process, cPanel can be manually installed on a new Compute Instance. If choosing this method, review [Install cPanel on CentOS](/docs/guides/install-cpanel-on-centos/) or reference cPanel's official [Installation Guide](https://docs.cpanel.net/installation-guide/install/).

1. Stand up a new WHM/CPanel installation by following the [Install CPanel on Linode](/docs/guides/install-cpanel-on-centos/) guide. Use the Linode's generic domain name for WHM's **Hostname** setting. This generic domain will be listed under the **Networking** tab for your Linode in the Linode Cloud Manager, and it will have the form `203-0-113-0.ip.linodeusercontent.com`.
Whichever method you choose, select a Linode Compute Instance plan with enough storage capacity to accommodate the data within the cPanel accounts on your current host.

{{< note respectIndent=false >}}
You will set the Hostname to be your actual domain name later on in this guide. If you set the Hostname setting as your domain name now, the WHM and CPanel dashboards on your new Linode will redirect to your current host, and you will not be able to access the settings for your new Linode.
{{< note type="warning" >}}
When performing the initial cPanel configuration steps, use the Linode’s generic domain name for WHM’s Hostname setting. This generic domain will be listed under the **Reverse DNS** column of the *Networking* tab for your instance in the Cloud Manager and it will have the form `203-0-113-0.ip.linodeusercontent.com`. Review the [Viewing IP Addresses](/docs/products/compute/compute-instances/guides/manage-ip-addresses/#viewing-ip-addresses) guide for more details. If you set the Hostname as your domain name now, the WHM and cPanel dashboards on your new Linode will redirect to your current host and you will not be able to access the settings for your new Linode.
{{< /note >}}

### Use the CPanel Transfer Tool
### Use the cPanel Transfer Tool

Once cPanel has been installed, use the built-in [Transfer Tool](https://docs.cpanel.net/whm/transfers/transfer-tool/) to copy your data from your existing server to your new Linode instance.

1. Visit `http://your_linode_ip_address:2087` in your web browser to load the WHM dashboard. Bypass the browser warning message about the web server's SSL/TLS certificate.

Expand Down Expand Up @@ -74,25 +77,25 @@ You will set the Hostname to be your actual domain name later on in this guide.

## Verify Transferred Accounts

You should verify that all information from your CPanel accounts was transferred successfully to your Linode. To do this, you will log in to CPanel on your new Linode for each account that was transferred and review the contents of the dashboard. The specific information in the following sections should also be reviewed for each account.
You should verify that all information from your cPanel accounts was transferred successfully to your Linode. To do this, you will log in to cPanel on your new Linode for each account that was transferred and review the contents of the dashboard. The specific information in the following sections should also be reviewed for each account.

### Verify IP Address Assignments

The Transfer Tool will attempt to assign your new Linode IP to the transferred CPanel accounts. It will sometimes fail and leave your old host's IP in place, so you should confirm which IP is assigned to your CPanel accounts:
The Transfer Tool will attempt to assign your new Linode IP to the transferred cPanel accounts. It will sometimes fail and leave your old host's IP in place, so you should confirm which IP is assigned to your cPanel accounts:

1. In the menu on the left side of the WHM dashboard, navigate to the **Account Information** section and choose the **List Accounts** option:

![WHM List Accounts](whm-list-accounts.png "WHM List Accounts page.")

1. Verify that your new Linode's IP is listed for the accounts. If it is not listed, use the [CPanel IP Migration Wizard](https://documentation.cpanel.net/display/68Docs/IP+Migration+Wizard) tool to update your account configurations with the new IP.
1. Verify that your new Linode's IP is listed for the accounts. If it is not listed, use the [cPanel IP Migration Wizard](https://documentation.cpanel.net/display/68Docs/IP+Migration+Wizard) tool to update your account configurations with the new IP.

### Verify SSL Certificates

The official [CPanel migration documentation](https://documentation.cpanel.net/display/CKB/How+to+Move+All+cPanel+Accounts+from+One+Server+to+Another#HowtoMoveAllcPanelAccountsfromOneServertoAnother-ReinstallallSSLcertificates.) notes that SSL certificates (apart from the self-signed certificates that CPanel provides) need to be manually downloaded from the source CPanel server and then installed on the new Linode.
The official [cPanel migration documentation](https://documentation.cpanel.net/display/CKB/How+to+Move+All+cPanel+Accounts+from+One+Server+to+Another#HowtoMoveAllcPanelAccountsfromOneServertoAnother-ReinstallallSSLcertificates.) notes that SSL certificates (apart from the self-signed certificates that cPanel provides) need to be manually downloaded from the source cPanel server and then installed on the new Linode.

When writing this guide it was found that the SSL certificates from the test source server were transferred automatically. It's recommended that you verify that your SSL certificates are present on the new server, and that you backup the certificate files from the source server.

1. The SSL certificates on your current CPanel host are located in `/etc/ssl`. Download them to your computer:
1. The SSL certificates on your current cPanel host are located in `/etc/ssl`. Download them to your computer:

scp -r root@current_host_ip_address:/etc/ssl ~

Expand All @@ -113,46 +116,46 @@ When writing this guide it was found that the SSL certificates from the test sou

rm -r ~/ssl

1. If you do not have terminal access to your current host, you can also copy the certificates from the CPanel interface. Load CPanel on your current host by visiting `http://your_current_host_ip_address:2083` in your web browser and enter your CPanel account credentials.
1. If you do not have terminal access to your current host, you can also copy the certificates from the cPanel interface. Load cPanel on your current host by visiting `http://your_current_host_ip_address:2083` in your web browser and enter your cPanel account credentials.

![CPanel Login Page](cpanel-login-page.png "CPanel login page.")
![cPanel Login Page](cpanel-login-page.png "cPanel login page.")

Visit the **SSL/TLS** section and view the private keys, certificate signing requests, and certificates listed. Copy and paste each of these to text files on your computer. Repeat this for each CPanel account on your current host.
Visit the **SSL/TLS** section and view the private keys, certificate signing requests, and certificates listed. Copy and paste each of these to text files on your computer. Repeat this for each cPanel account on your current host.

![CPanel SSL/TLS Page](cpanel-ssl-tls.png "CPanel SSL/TLS page.")
![cPanel SSL/TLS Page](cpanel-ssl-tls.png "cPanel SSL/TLS page.")

1. Visit `http://your_linode_ip_address:2083` in your web browser to load the CPanel dashboard on your Linode. Bypass the browser warning message about the web server's SSL/TLS certificate.
1. Visit `http://your_linode_ip_address:2083` in your web browser to load the cPanel dashboard on your Linode. Bypass the browser warning message about the web server's SSL/TLS certificate.

1. When presented with the CPanel Login form, enter the credentials you use for your CPanel account on your current host. These credentials were transferred by the Transfer Tool and are the same as before.
1. When presented with the cPanel Login form, enter the credentials you use for your cPanel account on your current host. These credentials were transferred by the Transfer Tool and are the same as before.

1. Visit the **SSL/TLS** section and review the private keys and certificates sections. If you do not see your private keys and certificates, use the **Upload a New Private Key** and **Upload a New Certificate** forms to add them.

1. Visit the **SSL/TLS** section again and navigate to the **Install and Manage SSL for your site (HTTPS)** page. Click the **Certificate Details** link to view which certificate is installed for your site.

![CPanel SSL/TLS Manage SSL Certificates Certificate Details](cpanel-manage-ssl-certificates-certificate-details.png "CPanel SSL/TLS - Manage SSL Certificates - Certificate Details.")
![cPanel SSL/TLS Manage SSL Certificates Certificate Details](cpanel-manage-ssl-certificates-certificate-details.png "cPanel SSL/TLS - Manage SSL Certificates - Certificate Details.")

1. If your certificate is not being used, click the **Browse Certificates** button and choose your certificate from the dialog that appears. After choosing your certificate, click the **Install Certificate** button at the bottom of the page.

1. Repeat steps 4-8 for each transferred CPanel account.
1. Repeat steps 4-8 for each transferred cPanel account.

### Test Your New CPanel Deployment
### Test Your New cPanel Deployment

If you visit your Linode's IP address in your browser, the website served by your CPanel account will not appear. This is because the CPanel server expects your domain name to be passed in your web request, and you have not updated your DNS yet.
If you visit your Linode's IP address in your browser, the website served by your cPanel account will not appear. This is because the cPanel server expects your domain name to be passed in your web request, and you have not updated your DNS yet.

The [Previewing Websites Without DNS](/docs/guides/previewing-websites-without-dns/) guide describes a way to visit your domain prior to updating your DNS records. When you have updated your DNS, this workaround will no longer be necessary to view your site.

## Migrating DNS Records

After completing the CPanel migration, update your DNS records to reflect your new Linode's IP. Once this is done, site visitors will start loading your CPanel accounts' services from your new Linode.
After completing the cPanel migration, update your DNS records to reflect your new Linode's IP. Once this is done, site visitors will start loading your cPanel accounts' services from your new Linode.

{{< content "use-linode-name-servers" >}}

## Update WHM Hostname

After your DNS changes have propagated, update WHM's hostname to be your domain. In the menu on the left side of the WHM dashboard, navigate to the **Networking Setup** section and choose the **Change Hostname** option. Enter the new hostname in the form that appears and click the **Change** button:

![CPanel Change Hostname page](whm-change-hostname.png "CPanel Change Hostname page.")
![cPanel Change Hostname page](whm-change-hostname.png "cPanel Change Hostname page.")

## Transfer CPanel License
## Transfer cPanel License

If you purchased your license directly from CPanel, [update your license](https://documentation.cpanel.net/display/MAN/Transfer+a+license) to feature your new Linode's IP address. If you purchased your license through your previous host, then you will need to purchase a new license from CPanel for your Linode deployment. As an alternative to purchasing from CPanel, a free CPanel subscription is included for each of your Linodes if you are a [Linode Managed](https://www.linode.com/managed) subscriber.
If you purchased your license directly from cPanel, [update your license](https://documentation.cpanel.net/display/MAN/Transfer+a+license) to feature your new Linode's IP address. If you purchased your license through your previous host, then you will need to purchase a new license from cPanel for your Linode deployment. As an alternative to purchasing from cPanel, a free cPanel subscription is included for each of your Linodes if you are a [Linode Managed](https://www.linode.com/managed) subscriber.
Loading

0 comments on commit 2b78cc9

Please sign in to comment.