Self-managed Virtual Private Server (VPS) web hosting plans can be difficult to handle. We advise all customers to opt for our Managed VPS hosting, which is, in fact, a cheaper option with ScalaHosting. However, under some circumstances, you may still prefer to work with self-managed VPS instead.
Table of Contents: Getting Started with Self-Managed VPS Hosting
- What is Self-Managed VPS hosting
- Choosing and Customizing Your Plan
- Account Activation
- Handling the Initial Server Setup
Logging in to Your VPS
Creating a New User Account
Basic Account Security
- The LAMP Stack
Setting up PHP
- Setting Up Your Domain Name
- If You Need Help
What is Self-managed VPS Hosting
VPS plans come in two main variations – Managed or Self-managed. The latter is where you get complete customizability of your VPS account. Aside from the choice of Operating System (OS) you make during sign-up, you need to handle everything else on your own.
This includes installing a web hosting control panel (if you choose to use one), a database, web applications, and anything else you might need to run your website.
Despite needing to do this, Self-managed VPS accounts offer you greater flexibility in customizing your environment. You can set it up to fit your exact needs while omitting anything else that may needlessly take up resources.
Choosing and Customizing Your Plan
All ScalaHosting Self-managed VPS plans come completely configurable. From the Self-Managed Cloud Server Hosting page, you can choose your exact configuration. Here are your options:
Resources: Using the slider bar, you can adjust how much of each resource type you will need. This includes CPU cores, RAM (memory), and SSD Space (storage). The resources are not tied to each other, meaning you can choose to only adjust one of them when needed.
Data Center: ScalaHosting operates self-managed servers out of three data centers. We have two US locations – in Dallas and New York, and one in Europe. We recommend you pick a location that is closer to your target market. The closer the data center is to your visitors, the lower the latency (delay caused by data having to travel over distance).
Operating System: We offer a choice of Linux distributions. You can choose between Ubuntu, Debian, Rocky Linux, Alma Linux, CentOS, and OpenSUSE.
Bandwidth: You can choose how much bandwidth your VPS will have. The options start at 3,000GB and go all the way up to 10,000GB.
Additional services: Although you have root access and can set up anything you want on your self-managed VPS, you can opt for having a few useful tools pre-installed upon deployment. These include cPanel/WHM, R1soft backups, and the LiteSpeed web server.
Once you’ve made your selections and completed the payment process, you will be sent a confirmation email. This will be followed by a separate welcome email containing information about your VPS account, including access links and other important notes.
The entire account activation process should take no longer than a few minutes since it is mostly automated. In some cases, a user may be required to undergo manual verification to complete the process, but this is relatively rare.
Handling the Initial Server Setup
ScalaHosting Self-managed VPS plans come with only your choice of OS in place. When you first receive your welcome email, it is recommended that you handle a few initial configurations as part of your setup process to increase the security of your server and make it more user-friendly.
Logging in to Your VPS
Your welcome email will include the credentials for Root Access to your VPS account. This powerful administrative access will give you very granular control. If you don’t have any previous experience, it’s advisable to avoid using it for now. However, you will need root access to do the initial setup for Self-managed VPS plans.
Because of this, the first thing you should do with the root access is to create a regular account. To do this, you will need an application such as PuTTY to create a secure connection to your VPS server.
Once you’ve installed the application, use the Root User credentials provided in your welcome email to log in.
Creating a New User Account
Once you’ve logged in, you can use common Linux commands to create a new account. This is a three-step process and includes creating the user account, associating it with a password, and granting the appropriate permissions.
The exact commands and process may vary depending on the OS you’ve chosen. For example, in CentOS:
# adduser newusername
(Creates a new user account called ‘newusername’)
# passwd newusername
(Allows you to assign a password to the ‘newusername’ account)
# gpasswd -a newusername wheel
(Adds ‘newusername’ to the ‘wheel’ group)
Linux has a few user groups with various permissions by default. To understand the permissions that each user group has, refer to the documentation for the distribution of Linux you’ve chosen as your OS.
Once you’ve created your new user account and granted it the appropriate permissions, you should take steps to secure your VPS account. Again, the process for this will vary depending on which OS you’ve chosen.
For example, in CentOS, you will need to set up Public Key Authentication, while Debian will require you to manage the UFW Firewall settings. It is recommended that you initially disallow all connections aside from SSH. Once this is done, remember to add access for the new user you created earlier.
Once you have completed these steps, you will be ready to log in with your newly created user account. Disconnect your SSH application and reconnect with the new user account before proceeding further.
The LAMP Stack
The LAMP stack is what most servers use to handle web hosting accounts. It stands for Linux-Apache-MySQL-PHP and is the combination that most web applications need to run. Since the ‘Linux’ portion of the LAMP stack is already taken care of, you will have to install the other portions.
Note: This is a manual process and will involve multiple steps. If you would rather skip this and use a web hosting control panel, we highly recommend you opt for one of our Managed VPS Hosting accounts instead.
One of the most important parts of your VPS will be the web server. This is the engine that will power the sites you create on your VPS. Among the choices available, the Apache web server is extremely popular and one of the most widely used.
Installing Apache on Linux OS is relatively simple. Like Windows, Apache has its own application installer called a ‘Package Manager.’ These will allow you to retrieve and install various applications from a repository maintained by the various Linux OS distributions.
We will be demonstrating an example of the Apache installation using CentOS:
sudo yum install httpd
sudo systemctl start httpd.service
The first command will install Apache, while the second starts the Apache web server service. To verify that it’s working correctly, use your web browser, and navigate to the IP address assigned to your VPS account. You should see the result of the Apache server installation displayed there now.
While you can technically choose from a variety of database servers, MySQL (and the MariaDB fork of it) are very popular choices. WordPress, for example, will require the use of this. The installation process is, in fact, similar to Apache.
sudo yum install mariadb-server mariadb
sudo systemctl start mariadb
The first command installs the MariaDB server, while the second starts the service. The last command is technically optional but highly recommended. It serves as a first line of defense by handling some of the basics of securing your database for you.
Finally, you will need to make sure the database server will restart on its own if you reboot your VPS server. To do this, enter:
sudo systemctl enable mariadb.service
Setting up PHP
With your OS, web server, and database server in place, the last step of the LAMP Stack deployment will be to install and set up PHP. This is the engine that will help process the programming code, which is one of the elements needed to configure dynamic content.
sudo yum install php php-mysql
sudo systemctl restart httpd.service
This basic procedure will install the PHP engine as well as start it as a system service.
Do note this is only the default installation of PHP. If you have specific requirements for your site, you may need to install additional PHP modules later on.
Setting Up Your Domain Name
So far you’d have been accessing your VPS server through its IP address. Your next move would be to assign a domain name to your server for easier access to the website you’ll be setting up.
How this is done depends on where you obtained your domain name. If your domain name was registered from ScalaHosting, you do not need to do anything – it will be done already. If not, you will need to change your domain nameservers from the registrar.
The nameservers are what point the domain name to the right website content location. This is done from the control panel where you obtained the domain.
Simply log in to your control panel dashboard and change the nameservers to the ones provided to you in your ScalaHosting welcome email.
Bear in mind, nameserver changes can take between 24 to 48 hours to propagate completely. During this period, your domain name may not still properly point to your server.
If You Need Help
Setting up and maintaining a Self-managed VPS account can be intimidating, especially for first-time users. If, at any point during the process, you need help or even simply some advice, do get in touch with the ScalaHosting customer support team.
The best way to do this is either via Live Chat or using our Ticket System. Live Chat offers near-instant access to first-line support but may not always be able to resolve your query in the most comprehensive manner.
For greater depth in response, we recommend you make use of our internal ticketing system. The ScalaHosting operators take pride in a 15-minute average response time, so you will always get technical assistance promptly.