⟵ Все статьи
Читать на:

What to Do After Buying a VPS: Step-by-Step Server Setup Guide

What to Do After Buying a VPS: Step-by-Step Server Setup Guide

You have just rented a VPS and received an IP address along with a root password. It might seem like the server is ready to go, but this is only the starting point. A freshly installed system is open to attacks, unoptimized, and unprotected. A few hours of proper initial configuration will save you a great deal of trouble in the future: from breaches and data loss to unexpected downtime.

Step 1. Create a Server and Connect via SSH

If you are still choosing a provider or ordering an additional server, the process in the NodexGo control panel takes less than a minute. Click the Create Server button, choose a location — the real ping to each location from your device is displayed right next to it. Then select a plan and an OS image: Ubuntu 24.04 is the optimal choice for most tasks. Set a server name, choose a billing period — 1, 3, 6, or 12 months — and confirm your order. In about a minute the server will be ready: the IP address and root password will appear in the panel and be sent to your email.

Once you have the access credentials, open a terminal and connect to the server. If you do not have an SSH client handy, use the built-in VNC web console in the server card — it comes to the rescue in any situation, even when SSH access is temporarily unavailable.

ssh root@your-server-IP

Launch your VPS in a minute

Create Server

Step 2. Update the System

The first thing to do on a fresh server is to update all packages to their current versions. The OS image may have been built several weeks ago, and security patches and bug fixes have been released since then. Skipping this step is not advisable: vulnerabilities in outdated packages are actively exploited by automated scanners within the very first hours after a server goes live.

apt update && apt upgrade -y
apt autoremove -y

Step 3. Create a New User and Set Up SSH Keys

Working constantly as root is bad practice. Any mistake in a command can irreversibly damage the system, and a compromised root account gives an attacker full control over the server. Create a separate user with sudo privileges and switch to that account for everyday work.

adduser deploy
usermod -aG sudo deploy

The next step is to configure SSH key authentication instead of password-based login. Keys are significantly more reliable: even if a password is leaked, an attacker cannot log in without the private key. Generate a key pair on your local machine and copy the public key to the server.

ssh-keygen -t ed25519 -C "your@email.com"
ssh-copy-id deploy@your-server-IP

Step 4. Harden the SSH Configuration

After setting up keys, open the SSH daemon configuration file and make several important changes. Change the default port 22 to a non-standard one — this will reduce the number of automated attacks by an order of magnitude. Disable direct root login and prohibit password authentication, leaving only key-based access.

/etc/ssh/sshd_config

In this file, find and modify the following lines. After saving the changes, restart the SSH service. Do not close your current session before verifying — open a new terminal window and make sure the connection works through the new port.

Port 2222
PermitRootLogin no
PasswordAuthentication no
systemctl restart sshd

Step 5. Configure a Firewall

A firewall is an essential security element for any public-facing server. UFW (Uncomplicated Firewall) lets you quickly define rules: allow only the necessary ports and block everything else. Make sure you allow the new SSH port you set in the previous step, otherwise you will lock yourself out.

ufw allow 2222/tcp
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable

Additionally, install fail2ban — a utility that automatically blocks IP addresses after several failed login attempts. This is an effective defense against brute-force attacks without any manual intervention.

apt install fail2ban -y
systemctl enable fail2ban
systemctl start fail2ban

Step 6. Configure the Time Zone and Time Synchronization

Accurate system time is critical for logs, certificates, and many applications. Set the time zone that matches your region or use UTC, and make sure the time synchronization service is active. A clock drift of even a few minutes can disrupt TLS certificates and clustered systems.

timedatectl set-timezone Europe/Moscow
timedatectl status

Step 7. Configure Automatic Security Updates

Manually tracking the release of security patches is difficult, especially when you have multiple servers. The unattended-upgrades package automatically installs security updates without your involvement. This does not replace scheduled maintenance, but it closes critical vulnerabilities promptly.

apt install unattended-upgrades -y
dpkg-reconfigure --priority=low unattended-upgrades

What Is Next: Useful Panel Features

After the basic setup, the server is ready for work. It is still worth knowing about several useful features available directly in the control panel. If you forget your password or make a mistake in the SSH configuration, the VNC web console in the server card will let you connect bypassing SSH and fix the situation. The Change Root Password button comes in handy if credentials are compromised, while Reinstall OS gives you the ability to start fresh without recreating the server.

When your project grows and the current plan is no longer sufficient, use the Upgrade Resources button — it moves the server to a higher plan while preserving the disk and IP address. No data migration or DNS record changes are required. To keep track of subscription expiration dates, use the Renew button — it is convenient to click it in advance without waiting for notifications.

Conclusion

Initial VPS configuration takes anywhere from half an hour to a couple of hours, but it lays the foundation for reliable and secure operation for months to come. An updated system, a dedicated user, SSH keys, a firewall, and automatic updates form the minimum set without which a server is vulnerable from its very first minutes online. If you have not yet decided on a provider or want to launch another project, NodexGo offers VPS with fast deployment, an intuitive control panel, and all the tools for a comfortable working experience. Rent a server and start your setup today.

A VPS ready to configure in a minute

Create Server

Мы используем файлы cookie: необходимые — для входа в аккаунт и языка интерфейса, аналитические — чтобы понимать, какими страницами пользуются. Сторонних рекламных систем у нас нет. Подробнее