User Tools

Site Tools


control-panels:cpanel-whm:getting-started

cPanel/WHM - Getting Started

If you are new to cPanel, or if this is your first server where you have WHM access, initial setup can sometimes be a little daunting. Here are some tips that can come in handy when first starting out with a new cPanel/WHM server.

There are a few different "services" that are part of cPanel/WHM, and knowing where to go for different actions is important. You can get an overview here and we summarize them a little more below.

First Login to WHM

WHM is the section where server-level changes are made. Resellers have a restricted access to WHM, but with the "root" user, you can access all of the server-level settings. For more information about the options available in the WHM interface, you can use this page to read about the different sections organized similarly to how they are organized within WHM.

The first time you access WHM, it is likely that the server's hostname does not yet resolve to the server, so you will need to use the IP-based url to access it. If you have a VPS and are not sure of the IP address of your server, you can check it from your My Knownhost page as described here. If you have a Dedicated Server, you will need to refer to your Welcome Email to find your server's IP address. If you are still not sure, you can open a Support Ticket so that we can help you check. For our example, the Primary IP Address of our hypothetical server will be "x.x.x.x"–that means you will need to replace that portion of the url with whatever the IP address of your server is.

So to access WHM the first time, you would need to use a url like this:

https://x.x.x.x:2087

Later, once domains exist and resolve to the server, you can begin using those domains instead of the IP addres in the url. But if this is the first time you are accessing WHM, it is not likely that any domains resolve to the server yet.

If this is the first time logging into WHM in this server, the only account that exists so far is "root", so you will need to use that as the username. For the password you will need to use the password for user "root". If you are not sure what it is, you can reset it as described here, if it is a VPS. If it is a Dedicated Server, and you are not sure of the password for user "root", you can open a Support Ticket and we can help you reset it. You can of course also open a Support Ticket if you need help resetting the root password in a VPS, but if you are able to use the password changer in your "My Knownhost" account, that is likely to be faster.

Configurations to Consider

Although in general the default settings are usually acceptable for most usage cases, there are some not-uncommon situations in which some of the settings may need to be adjusted.

Subdomains of the Hostname

There are two settings in WHM at "Home → Server Configuration → Tweak Settings → Domains" which you may want to check.

Here is cPanel's description of the setting "Allow users to park subdomains of the server's hostname":1)

Allow users to park subdomains of the server's hostname
This setting allows users to park subdomains on your server’s main domain.
For example, if your server's main domain name is example.com, click On to redirect user.example.com visitors to that user’s website.

In our VPS template, this is enabled by default, but you may want to consider whether you prefer to leave it set this way. For example, you may want to prevent users from making pages that look more closely associated with you than would be accurate.

Here is cPanel's description of the setting "Allow resellers to create accounts with subdomains of the server’s hostname":2)

Allow resellers to create accounts with subdomains of the server's hostname
This setting allows resellers to create accounts with subdomains of your server’s main domain.
For example, if your main domain name is example.com, enable this setting to redirect user.example.com visitors to the reseller’s website.

In our VPS template, this is disabled by default, but if you have a specific reason you want resellers to be able to make pages like this, it can be enabled. If you need assistance doing so, please feel free to open a Support Ticket.

Backups

In our VPS template, automatic backups are disabled by default, to help prevent you from using up all of the disk space, which can interfere with daemon functionality. However, it is very important to make sure you have reliable backups of anything that you do. To help you with this, WHM has a feature for automatic backups, which we strongly encourage you to use. You will want to make sure when configuring these backups that you will not be causing your server to fully run out of disk space, which can itself result in data loss. You can read more about WHM automatic backups and some of their configuration options here.

Creating a cPanel Account

The first time you log into WHM, it is very likely that one of the first things you will want to do is to create a cPanel account, so that you can begin setting up the first of your websites. You can read more detail about how to create a cPanel account here.

Within WHM, you can go back to the "Home" screen by clicking the "WHM" in the top left corner. From there, you can navigate to a section by clicking on the section name on one of the buttons in the main section of the Home screen. After clicking a button for one of the sections, there is a page with a button for each of the pages within that section. You can also find any of the pages directly from any of the other pages by using the navigation menu on the left-hand side. If you are not sure what section the page you need is in, you can use the search box above the navigation menu.

For example, the page to create a new account is "Home » Account Functions » Create a New Account". We could simply type "Create a New Account" into the search box, and then that will be the only page listed in the navigation menu until the search is cleared. Or, we can go to the Home screen (if we aren't there already) by clicking the "WHM" in the upper left corner, then clicking the "Account Functions" button, and after that clicking the "Create a New Account" button.

There are many options on this page. For most of them, the "right" setting depends very heavily on what you will need to be able to do with the account. But, here are some tips that will nearly always be applicable:

  • Use a strong password! It is very important for each and every password, regardless of account type, to be long, randomized, and unique, in addition to using a variety of character types. Otherwise, with enough tries, an attacker could guess the password and gain access to the server.
  • Set a Disk Quota (ie, don't leave this as "unlimited"). By setting a maximum amount of disk space each user is permitted to use, it is easier to help prevent the server itself from running out of disk space, which could cause database corruption. To access this option, you will need to select "Select Options Manually" in the "Package Section".3)
  • Set a "Maximum Hourly Email by Domain Relayed", as well as a "Maximum percentage of failed or deferred messages a domain may send per hour". Then, just in case one of the users sends mail faster than they should, this will slightly slow them down and give you a little time to address the issue.
  • Enable DKIM and SPF on the account. This will help reduce the chances of becoming blacklisted for spam that other people send faking your domain in their headers.

Logging into cPanel

Once a cPanel account is created, you will then be able to log into cPanel for site-level and domain-level actions. If none of the domains yet resolve to the server, you will need to use an IP-based url like this:

https://x.x.x.x:2083

Later, when domains resolve to the server, you can replace the IP address with any of those domains, but if this is the first time you are logging into cPanel in this server, it is not likely that any domains resolve to the server yet.

Creating Email Accounts

It is also very common to want to create email accounts within the newly created domain. This is done in cPanel in section Home » Email » Email Accounts. Make sure to remember to use a separate strong password for each account.

Once an email account is created, you can configure a mail client to check your mail.

Webmail

cPanel also comes with three different Webmail interfaces built-in. You can log into webmail at a url like this:4)

https://x.x.x.x:2096

Once there are domains that resolve to the server, you can use the domain instead of the IP address in the url.

Once logged in, you can choose to access Roundcube, Horde, or Squirrelmail, or access configuration settings that are specific to that particular email account.

Creating a Website

In order to create a website in a cPanel server, you need to upload the files into the domain's DocumentRoot. For the main domain of a cPanel account, this will usually be /home/username/public_html (replacing "username" with the username of the cPanel user). If you log into ftp or sftp as the cPanel user, you will start out already in /home/username, so you would need to change directories into public_html. If you wish to create additional ftp accounts, the starting directory will depend on the home directory chosen for that ftp user. There is also a File Manager available, or Web Disk can be enabled, if you prefer one of those interfaces instead of ftp.

If your site will be needing any databases, you will need to create those either in the MySQL Databases section or with the MySQL Database Wizard.

Depending on the type of site you want to build, and depending on which if any version of Softaculous you have installed, some of these steps might be done automatically when you install the application via Softaculous.

If for now you just need a simple page up, or if you want to make a very simple web page, you can use the Site Publisher now available in cPanel.

You will also want to check the DNS settings of the domain. You may need to check if your main nameservers have been registered. If the new dns settings have not yet propagated, you can still test your site while you wait.

Using Domain-based URLs

Once one or more domains resolve to your server, you can use them in place of the IP addresses in the urls to access WHM, cPanel, and Webmail. In particular, it is recommended to use the server's hostname for this, so that the name on the https certificate will match the name in the url. For example, if the hostname of the server is "host.example.com", and we have checked that the hostname resolves correctly, we can access WHM with this url:

https://host.example.com:2087

and cPanel with this url:

https://host.example.com:2083

and Webmail with this url:

https://host.example.com:2096

In addition to avoiding browser warnings about the domain not matching the certificate, in recent versions of cPanel/WHM, the certificate used for cPanel, WHM, and Webmail is no longer self-signed, so now we will not get warnings about the certificate being self-signed.

1)
See section "Domains" here.
2)
Also described in section "Domains" here.
3)
Alternatively, you can create a Package with the wanted sesttings. This may later be covered in another article. In the meantime, you can read more about Packages in the official cPanel documentation here.
4)
as earlier, replace "x.x.x.x" with the IP address of the server.
control-panels/cpanel-whm/getting-started.txt · Last modified: 2016/10/26 15:42 by Marjorie S.