What you should do after getting your Virtual Private Server(VPS)?

What you should do after getting your Virtual Private Server(VPS)?

What is VPS?

Today we are going to talk about your first steps after purchasing a VPS. VPS is a virtual server that runs a copy of an operating system. In many ways, it works similar to a physical dedicated server, being actually a piece of software that resides within a parent serve, shared by multiple customers. Its work is provided by virtualization technology. Unlike shared hosting, you have allocated resources, so that other companies do not affect your performance.

Choosing a hosting provider

When purchasing a VPS, the first step you make is choosing a hosting provider. You should choose carefully, since different providers offer different solutions, that vary in performance, storage, RAM, etc. To find an optimal solution, analyze the purposes you need a VPS for, e.g. the software you are going to use on it. Smaller projects which don’t need too much software will be alright with only 512 MB of RAM. Bigger projects require more capacities.

Check out HostZealot VPS Europe. They offer 7 locations to choose from covering the majority of Europe, SSD/NVME hard drives, and provisioning within minutes. 

After choosing a hosting provider

After choosing a hosting provider and purchasing a VPS, you’ll get an email with all the basic information about the server. There you’ll find IPv4 and IPv6-address of the VPS, username, and SSH password.

A fast and secure way for installing and setting up the VPS is to use Secure Shell (SSH).

To finish the installation, enter:

ssh root@??.??.???.???

Instead of ??.??.???.??? you should write your IPv4 address.

Enter the password. After this, you’ll see a greeting screen. Now the VPS is installed. Let’s move on to the VPS setup.

Basic VPS setup

Basic VPS consists of a few regular steps, so you can perform them yourself, without the help of a specialist.

The first one is changing the Root password. To do it, enter the passwd command. It will request a new password. To check it, exit the connection and connect again.

Other basic settings include changing the time zone, creating a new user, updating the kernel, reassignment of the Root rights. We’ll talk about them later. First, before configuring this basic setting, you have to protect your VPS from hacking. To do it, change the default port and install the firewall.

Changing the default port

The default port value for a VPS is usually 22 and for security, it’s usually changed. However, when purchasing HostZealot VPS, you don’t need to care about it since they have done it for you – the port number is 56777.

However, if you wish, you can still change the port. To do so, open the SSH configuration file with the following command:

nano /etc/ssh/sshd_config

Change the value of Port variable to any number between 1 and 65535.

Then restart the SSH service with the commands:

service ssh restart (for Debian/Ubuntu);

service sshd restart (for CentOS);

To check if the operation succeeded, start another SSH session with new settings.

Firewall setup

In this article, we are going to see how to install the UFW firewall. There are other firewalls as well, but this particular one is provided with iptables interface, which is known for being simple and easy to use. 

To install it, use the command:

sudo apt install ufw