Section 8 OVH Cloud VPS setup

The setup tutorial could be devided into five parts: - OVHcloud Control Panel setup (reinstall OS) - WHM & cPanel setup - Secure your server - Setup your domain - Install dependencies & other settings

8.1 OVHcloud Control Panel setup

8.1.1 Reinstall OS

If you already have a VPS and want to have cPanel on it, you can reinstall the VPS from your OVHcloud Control Panel with the “CentOS 7 - cPanel” template (available only with a compatible VPS solution). After that, you will receive an email shortly with the username & password + cPanel login details.

8.1.2 Setup fireware

In order to increase the VPS’s security, we can go to IP userprofile Set firewall here firewall

8.2 WHM & cPanel setup

This tutorial is adapted from ovh cloud guide.

cPanel has been widely used for domain and web application management. We are using this as well. Unfortunately (or fortunately), it is not possible to setup using command line. There are two steps we need to set manually: whm setting, cpanel account creation.

8.2.1 WHM manager

8.2.1.2 WHM agreement & namespace setting

Given the link, you will be able to access

WHM agreement

Namespace setting (config your domain)

Namespace-vps-name.vps.ovh.net

8.2.1.3 set root password

Once you login into WHM, you will be able to setup a root password for future access.

set-password Then you will be able to login with the username (root) & password. In the future, you will be able to access WHM here: https://vps-name.vps.ovh.net:2087

8.2.1.4 create a cPanel account

create a new account You will be able to create new accounts here by filling all the details.

Setup an account, details is in webserver channel Read more here https://docs.ovh.com/gb/en/vps/cpanel/.

8.3 Secure VPS

Change SSH port is highly recommended. We can change the /etc/ssh/sshd_config file

 vi /etc/ssh/sshd_config 

port 22

We can change the Port 22 to whatever port you want (eg. 33), then restart the sshd


sudo systemctl restart sshd

Now you will only be able to ssh using (eg. 33)

ssh username@ip.add.r.ess -p 33

Read more here https://docs.cpanel.net/knowledge-base/security/tips-to-make-your-server-more-secure/.

8.4 Setup your domain

Go to the domain provider website and change the domain to

vps-id.vps.ovh.net
cdns.ovh.net

8.5 Install dependencies & other settings

All you need is this git repo: https://github.com/ss-lab-cancerunit/ovhcloud

git clone https://github.com/ss-lab-cancerunit/ovhcloud.git
cd ovhcloud
bash setup.sh