When I decided to move from shared hosting to cloud hosting, there was a lot of thought put behind that decision. As they say, with great power comes great responsibility. That’s almost the case while moving from shared hosting to cloud hosting. You gain more control over your server which means you’re responsible for everything. In my previous article, I talked about cloud hosting for bloggers where I spoke about VPS (Virtual Private Servers) I also told that VPS isn’t everyone’s cup of tea unless you are a techie. Managing VPS for beginners can be a daunting task and I’ve learned it by doing it. So this ultimate guide is about managing VPS for beginners.
Types of Web Hosting services
This is for everyone who has no idea about the types of web hosting services available. You can skip this if you know about these. Even before we get into shared and cloud hosting, there’s one thing that we need to understand and that is Managed vs Unmanaged hosting. All the types of Webhosting services fall either in any of the above-mentioned buckets.
Managed Hosting: Managed hosting is where all the important tasks on maintaining a server is carried out by your hosting provider. Tasks like OS upgrade/patches, security updates, firewall etc. are all done by your hosting provider. You just use the application – WordPress in case of most bloggers.
Unmanaged hosting: Unmanaged hosting on the other hand gives you full control over your server. That means that apart from running your website or a blog, you need to take care of all the tasks that are required to mantain a server.
Most of the shared hosting services that we use are managed to an extent. Most of the bloggers/site admins are aware of cPanel and/or Plesk based control panels that they use to manage their website. Using these control panels they can access files and folders, run scripts, configure access rules, and much more. However, most of the shared hosting plans don’t give you root access. This means that you can not do everything that you may want to – installing a new app, configuring firewall rules, running another application, etc. Imagine using a computer without admin access, you can do a lot of things, but a lot of critical things are blocked for you.
VPS for Beginners
Virtual Private Server or VPS is a type of hosting service where root access is provided to you. That means you can install any software you want, configure firewall rules, tweak server/RAM configurations to maximize performance, etc. VPS too comes in managed and unmanaged flavors. Most of the raw compute services that you see by Google Cloud, Azure, AWS are unmanaged instances, where they just provide you with the VPS and you need to take care of everything.
Digital Ocean’s droplet too is an unmanaged VPS. Apart from these, there are services like RunCloud, Cloudways, ServerPilot that provide you with a control panel to manage your server and automate update installation, firewalls, certificate renewals, etc. and charge a fee for it. So if budget is a constraint for you and you’re willing to learn about VPS, unmanaged VPS from Digital Ocean is best for you. If want full control and yet don’t want to manage a VPS, go for a managed VPS hosting service.
Managing VPS for Beginners – The Ultimate Guide
Now that you’ve decided to go ahead with an unmanaged VPS service, there are a few things that you need to know about managing VPS for beginners. Moving from a shared hosting service to VPS is overwhelming especially when it is unmanaged. Managing VPS for beginners becomes difficult as most of the VPS is vanilla – meaning no applications are installed except the OS.
However, many service providers provide you with one-click installations of popular tools like WordPress, Joomla, cPanel, and Plesk to name a few. So can either start with a raw VPS or with an addon, the choice is yours. Once you have the VPS allotted, below are things you must know:
Disable Root Access
All of the hosting providers allot you a VPS server with root access enabled using which you are able to login to the server. Note that all these servers require you to access them via SSH so you need to have software like Putty installed on your desktop.
However, the first thing that you must do is disable the root access for the SSH user. Create a different user and assign full privileges to that user and disable root access, that will prevent anyone from accessing your server by using the root user. Reference.
The next step is to ensure that you have configured the firewall correctly. So firewall is the application that allows traffic to come in and go out of your VPS. By default, the VPS ideally will not have any rules except on port 80/8080 to allow web access.
You need to update the firewall and block any ports that are not in use. Common ports like 80/443 can be left open for http and https traffic. Apart from that, if you are using any other service that requires a specific port to run on, can be kept open but with proper security. Reference If you have created a VPS on Digital Ocean, you can either create firewall rules using ufw on the server or make use of cloud firewall service as mentioned above.
As I mentioned earlier, managing VPS for beginners is tough since there are a lot of things they need to manage. Installing updates is one of them. If you are using a Linux based VPS server instance, every time you log in, it will show you a list of updates available. If not, it’s a best practice to run sudo apt-get update to check if there are any updates. The system will prompt you to install critical updates and you should be good to go.
Managing Resources – CPU, RAM, Storage
The next important thing is to ensure that the CPU, RAM, and storage are effectively managed on the VPS. Based on the type of VPS you’ve chosen, the criticality of this varies. For instance, if you have a 1GB RAM VPS, it becomes highly critical for you to manage your resources and avoid any errors.
You would need to tweak the server instances, DB instances to ensure that they aren’t hogging resources. In case you max out, the server would become really slow and probably crash through 5XX errors to your users. However, if you have like a 4GB+ RAM VPS, you can probably take a chill pill!
Configuring Mail Server
This is one of those things that I completely forgot about while I was moving WordPress from Siteground to Digital Ocean. Though my email is running on GSuite, there are a lot of mails that WordPress sends for which a mail server is required to be running on your VPS server as well. It was only when one of my users pointed out the error, I realized it was a serious issue. No contact form on my site was working due to this.
Remember, irrespective of what type of VPS you’ve chosen, you need to configure a mail server on it. If you don’t want to do it, you can create an app user and key for your GSuite id and use it to send emails.
File & Folder Permissions
When you are moving to an unmanaged VPS, you need to understand that by default there will be a lot of restrictions on the folders based on the OS you’re using. For instance, if you are on Ubuntu running an Apache Server with WordPress, you may encounter folder access issues.
Generally, the folder permissions prevent WordPress from modifying the contents which leads to performance issues. So you need to understand the folder permission logic, how it works, and what permissions are required in order to run the VPS smoothly. Reference.
Analyzing Server Logs
One of the most critical aspects while managing VPS for beginners is accessing the server logs. While you are on shared hosting, you do have access to server logs which we never bother to read as the service provider is taking necessary security measures. However, when you move to a VPS, server logs are gold for you.
You need to analyze them once in a while to see if there are any access issues or errors. Many times you don’t face anything, but some of your users might face issues accessing the site. You’ll need to either learn how to access logs or install tools on the VPS to help you analyze them.
While you are on shared hosting, you probably have the hosting provider taking care of the backups or perhaps a plugin. However, when you are on a VPS instance, you need to take care of backups as well. I’ve mentioned in the past that content creators must make backup a habit to avoid data loss. You need to be taking backups manually or create scripts (Cron jobs) to automatically take backups for you.
Ideally, these should be store outside the server but you can download them as and when the backup happens. This ultimate guide on managing VPS for beginners is incomplete without this.
Using a control panel
Most of you who are self-hosting a site would have used some web control panels like cPanel/Plesk to manage your servers. The good news is that you can use them on your VPS as well. However, the bad news is that most of these tools are licensed products and hence you need to have a license to use it. Further, these control panels require a lot of memory to run, and hence a 1GB VPS will not run cPanel along with a LAMP stack.
But again, as a beginner, you should have a control panel to manage your VPS. Though you have to sacrifice some RAM/CPU usage, trust me that is worth it. Having a control panel makes your task of managing your server easier. There are quite a few open-source control panels that you can use. These include WebMin, ISPConfig, VestaCP, Zpanel are quite popular.
Managing VPS Beginners – Worth learning
Being a computer science graduate myself, managing VPS for beginners like me is worth spending time on. You not only learn about the application that you are using but also about the server itself. You’re basically performing a task of a Server Admin who is responsible for managing servers. From ensure timely updates to managing security and access to analyzing the performance, there’s a lot to learn. Apart from the learning, a VPS offers a lot of flexibility to you.
Since you have full access to it, you can run other applications on the same server without any additional charges. So if I want to host some APIs on my server, I can very well do it and hook it up with my mobile app. Not only that, you’ll see an instant performance boost on your website when you move to VPS from shared hosting. This Ultimate Guide for managing VPS for Beginners was my attempt to help beginners understand the various things they need to consider before moving to a VPS server. While I was doing it, I had to scot the internet to find help, this post should bring all of it in one place.
Did you find this helpful? Yes, No, Maybe? Please let me know in the comments below or tweet to me at @Atulmaharaj or DM me on Instagram. Would be more than happy to help you with your beginner VPS queries and who knows might learn something new from you as well!
I am taking my blog to the next level with Blogchatter’s #MyFriendAlexa.