On This Page: [hide]
VPS hosting is becoming a more and more popular choice among mid-level website owners who want to have more control over the activities on their website. The main idea here is that VPS hosting is created in order to minimise costs while allowing the users to retain full control over their sever and pay less in the process.
What Is VPS Hosting?
By theory VPS hosting gives you the ability to host your own site and also the files of it on a virtual device. This is not only a good choice when it comes to security and privacy, but also saves a lot of time it would otherwise take to configure and set a server. Furthermore, this type of product can be bought from companies that offer to give you a virtual space on their own server so that it can be private and easier for you to have full control without any “noisy neighbours” on the device, contrary to what most other hosting companies offer.
Why Choose VPS Hosting?
If you want to go for a dedicated hosting, you will eventually rent an actual server, which can be used however you deem to. With VPS hosting, the choice is all in a virtualised environment.
This means that it is easier if you have a site with substantial traffic and want dedicated hosting based on your specific requirements for disk space, RAM and other parameters. This choice can save your hundreds of dollars that you would otherwise pay with a dedicated service.
Another key benefit is that VPS hosting aims to be somewhere in between shared hosting plans and dedicated ones by making flexibility and scalability a priority and making the process easy if you want to set up your site with your own OS and parameters.
The main technology which makes this a reality is virtualisation. Similar to software, like VirtualBox, the same principle goes here. You have the freedom to choose what you want on your server, if it is Apache, Windows, Linux-based OS or anything you so desire plus the software you want installed on it. You can also reboot your virtual machine, reconfigure it and other activities that would otherwise require physical access to it.
How to set up VPS Hosting?
To set-up VPS hosting, you will need to first choose a hosting provider and purchase a VPS plan from them. Then, you need to configure your VPS server based on what you need it to do. Some companies can even do it for you, if you pay a setup cost and some even offer free setups, which is great, because you have a vast choice.
Generally, two main methods exist via which you can set up VPS:
- If you set it up manually via SSH remote login.
- If the hosting provider helps you set it up automatically using their software (recommended).
The whole process of setting VPS hosting can be summarised in the following main actions that have to be completed for it to function properly:
- Know how to use SSH access so you can securely login to your VPS device.
- Knowing how to run an update of your server.
- Create a user and learn how to modify the privileges of this user.
- Use public key authentication (enable it).
- Set up decent security (firewall, etc.).
So if we have to create a general instructions on how to set up such a service, we can proceed by showing you the main synthesised activities that you will need to do to make such a target a reality. Here we go!
Steps to Manually Set Up VPS
Step 1: Choose a VPS hosting provider:
Choosing a provider can be difficult sometimes because different providers offer different extras. We hope the information on this website helps and if you are not sure who is who, you can always read Best VPS Hosting review.
Step 2: Learn how to login to your VPS via a SSH FTP protocol.
The FTP (file transfer) protocol that allows you to download, edit and upload data on your server. It can be very useful, but remember it is not a control panel for your server, just a way to access it. This is why you need to use SSH (Secure Shell) access. it will provide you with the needed power to connect to your server securely and set it up.
After you have registered with a web hosting company for a VPS plan, they will give you the following details:
- Your root (admin) username.
- Your server password.
- Your own IP address of the server.
After you have set up this VPS, you can use programs, like PuTTY that will enable you to login to your server:
On this software, you have to select SSH and then enter your IP address and then after your are connected type in your Username and Password for root to login for the first time.
Step 3: Create a New User and secure it.
After you have logged in your server, you will see a command prompt where you have complete access to your server. In this command prompt, you should create a new user by running the folllowing commands. The second command will make him admin, using -aG sudo:
# usermod -aG sudo theusername
Then, you can secure this account by setting up a password for it. This can happen with the PuTTy software. Simply click on the following link to access the PuTTY key generator, that will make sure that you generate a random SSH key which you will have to keep and remember. Simply open it and click on the “Generate” button.
After this, you can save the key and copy it from the Public key space that will be shown as a result from PuTTY. After this, you have to get back in the server by logging in with SSH and you IP and log in to your sudo username by using this command:
# su – theusername
Then, you should save your key on your sevrver using the following parameters:
chmod 700 ~/.ssh
After the “authorized_keys” file is opened, simply paste your public key there and close it, after which type the following commands:
chmod 600 ~/.ssh/authorized_keys
And lastly, you will need to disable your password authentication by running the following command:
sudo nano /etc/ssh/sshd_config
It will open file ssh_config and in it simply set PasswordAuthentication from Yes to a No, like shown:
If you have done this right, you have successfully created and set up your first VPS server correctly. Now all that is left for you is to install whatever OS you so desire and also choose a Firewall for it. Good luck and we hope this helps!
We at hth.guide always rely on user feedback. So if you have any questions regarding this guide, please write to use in the comments below and we will try to help.