How to Configure a VPS After Purchase: The First 10 Steps

After purchasing a VPS, it is important to complete the basic security and environment setup: connect via SSH, update the system, create a separate user, configure SSH keys and a firewall, install the required software, and set up backups. This usually takes around 20–30 minutes and helps eliminate the main risks before launching your project.

Step 1. Connect to the Server via SSH

The connection details — IP address, username, and password — are provided immediately after the VPS is activated. Connect from the terminal using:

ssh root@your_IP_address

On Windows, you can also use an SSH client such as PuTTY.

Step 2. Update the System

The first thing you should do is update the operating system packages to install the latest security fixes.

For Ubuntu/Debian:

apt update && apt upgrade -y

For CentOS/AlmaLinux:

dnf update -y

Step 3. Change the Root Password or Configure an SSH Key

If you plan to log in using a password, set a new strong password with the passwd command. A more secure option is to generate an SSH key pair on your computer and add the public key to the server. After that, password-based login can be disabled.

Step 4. Create a Separate User with Sudo Privileges

Working as root all the time is not recommended. Create a new user:

adduser username

Then add the user to the administrator group.

On Debian/Ubuntu:

usermod -aG sudo username

On CentOS/AlmaLinux:

usermod -aG wheel username

Use this account for everyday administrative tasks.

Step 5. Configure the Firewall

Keep only the ports that are actually required open. In most cases, these are port 22 for SSH, port 80 for HTTP, and port 443 for HTTPS.

On Ubuntu/Debian, you can use UFW:

ufw allow 22
ufw allow 80
ufw allow 443
ufw enable

Step 6. Restrict Direct Root Login via SSH

Once you have created a user with sudo privileges, it is recommended to disable direct root login over SSH. In the /etc/ssh/sshd_config file, change the following setting:

PermitRootLogin no

Then restart the SSH service.

Step 7. Install the Required Server Software

Depending on your project, install a web server such as Nginx or Apache, a database such as MySQL or PostgreSQL, the required version of PHP, Node.js, or another runtime environment.

If needed, you can also install a control panel such as aaPanel or ISPmanager to simplify server administration through a web browser.

Step 8. Configure the Time Zone and Time Synchronization

Accurate system time is important for logs, certificates, and backup schedules. Set the required time zone with:

timedatectl set-timezone Europe/Kyiv

Also make sure that a time synchronization service such as systemd-timesyncd or chrony is enabled.

Step 9. Configure Backups

Set up regular snapshots through the VPS control panel or configure automatic backups using your software stack. For example, database backups can be scheduled with cron.

Backups are especially important before making major changes to the server configuration.

Step 10. Configure Resource Monitoring

Install a basic monitoring utility such as htop or netdata, or connect an external uptime monitoring service. This will help you detect CPU, RAM, or disk shortages in time and avoid project downtime.

Basic VPS Setup Checklist

  • SSH connection completed.
  • System updated.
  • Password changed or SSH key configured.
  • A separate user with sudo privileges created.
  • Firewall configured.
  • Direct root login restricted.
  • Required server software installed.
  • Time zone and time synchronization configured.
  • Backups configured.
  • Resource monitoring enabled.

Frequently Asked Questions

How Long Does Basic VPS Setup Take?

For an experienced user, basic configuration usually takes around 20–30 minutes. If additional software needs to be installed and configured, the process may take an hour or longer.

Do I Have to Disable Root Login?

No, but it is strongly recommended for security reasons. Restricting direct root access significantly reduces the risk of automated password attacks against the root account.

Does a Beginner Need a Control Panel?

A control panel such as aaPanel, ISPmanager, or cPanel simplifies server administration through a browser and lowers the entry barrier for users who are not comfortable working with the command line.

Completing the basic security setup immediately after purchasing a VPS helps eliminate the most common risks and saves time in the future. A good place to start is with SSD VPS plans, which are well suited for websites and test projects, while the full range of configurations is available in the ForceVPS VPS section.