Support

What to Do After Buying a VPS: Initial Server Setup

  • VPS, Debian, Linux, налаштування сервера, Ubuntu, SSH, безпека VPS, перше налаштування VPS, UFW, Fail2ban, ForceVPS
  • 0

What to Do After Buying a VPS

After your VPS has been activated, you should perform some basic operating system setup: check the server status, connect through SSH, install updates, create a separate user, and configure essential security settings.

This guide is intended for VPS servers running Ubuntu or Debian. Package names and some commands may differ on other Linux distributions.

1. Wait for the Installation to Finish

Open your VPS service in the ForceVPS client area. Once the server has been created, its current status will appear in the server management section.

If you ordered a control panel with your VPS, its installation may require additional time. Until the process is complete, the client area may display a pending control panel installation status.

Do not restart or power off the server while the operating system or control panel is being installed automatically.

2. Check the Server Information

The ForceVPS client area displays:

  • the current VPS status;
  • the server IP address;
  • the hostname;
  • the installed operating system;
  • the number of CPU cores and available RAM;
  • disk capacity;
  • CPU load and RAM usage;
  • network traffic and disk activity.

Make sure the server has a running status and an IP address is displayed.

3. Find Your Login Details

You will need the following information to access the server:

  • the VPS IP address;
  • the username, usually root;
  • the root password or an SSH key;
  • the SSH port, usually 22.

The login details are sent after the service is activated. You can also copy a ready-to-use SSH command from the client area:

ssh root@SERVER_IP -p 22

Replace SERVER_IP with the IP address of your VPS.

4. Connect to the VPS Through SSH

Open a terminal in Linux, macOS, or Windows PowerShell and run:

ssh root@SERVER_IP

During the first connection, you will be asked to confirm the server’s SSH key fingerprint. Enter:

yes

Then enter the root password. The password will not be displayed while you type it. This is normal terminal behavior.

After a successful login, you will see the server command prompt:

root@server:~#

5. Use the noVNC Console If SSH Is Unavailable

If you cannot connect through SSH, click “Open noVNC” in the server management section. The console works independently of the network configuration inside the VPS and allows you to:

  • log in to the operating system;
  • check the network configuration;
  • restart the SSH service;
  • correct firewall rules;
  • review system boot errors.

The noVNC console is particularly useful if the server stops responding after changes to its SSH or network configuration.

6. Update the Operating System

Immediately after your first login, update the package index and installed software:

apt update
apt upgrade -y

If a new Linux kernel was installed during the update, restart the VPS:

reboot

Your SSH connection will close. Wait one or two minutes, then connect to the server again.

7. Configure the Server Hostname

Check the current hostname:

hostnamectl

To change it, run:

hostnamectl set-hostname server.example.com

Replace server.example.com with the fully qualified domain name of your server.

If the domain has not been configured yet, you can temporarily use a simple hostname:

hostnamectl set-hostname web-server

8. Configure the Time Zone

Check the current date and time zone:

timedatectl

To view the available time zones, run:

timedatectl list-timezones

For example, to configure the Kyiv time zone:

timedatectl set-timezone Europe/Kyiv

For Berlin:

timedatectl set-timezone Europe/Berlin

Correct time settings are important for system logs, backups, cron jobs, and SSL certificate validation.

9. Create a Separate User

For everyday server administration, it is safer to use a separate user with sudo privileges instead of working as root all the time.

Create a new user:

adduser admin

Add the user to the sudo group:

usermod -aG sudo admin

Verify the group membership:

groups admin

You can now connect using the new account:

ssh admin@SERVER_IP

Use sudo when running administrative commands:

sudo apt update

10. Configure SSH Key Authentication

An SSH key is more secure than a regular password and helps protect the server against automated password-guessing attacks.

Create an SSH key on your computer:

ssh-keygen -t ed25519

Copy the public key to the VPS:

ssh-copy-id admin@SERVER_IP

Test the connection in a new terminal window:

ssh admin@SERVER_IP

Do not disable password authentication or root login until you have confirmed that SSH key authentication works. Keep your current SSH session open until the test is complete.

11. Configure the Firewall

Ubuntu supports UFW for basic firewall configuration. Allow SSH connections before enabling the firewall:

ufw allow OpenSSH

If SSH uses a custom port, allow that port separately:

ufw allow SSH_PORT/tcp

For a web server, allow HTTP and HTTPS traffic:

ufw allow 80/tcp
ufw allow 443/tcp

After adding the required rules, enable the firewall:

ufw enable

Review the active rules:

ufw status verbose

Before enabling UFW, make sure your SSH port is allowed. Otherwise, you may lock yourself out of the server.

12. Install Protection Against Password-Guessing Attacks

Fail2ban monitors system logs and temporarily blocks IP addresses that generate a large number of failed login attempts.

Install the package:

apt install fail2ban -y

Enable and start the service:

systemctl enable --now fail2ban

Check its status:

systemctl status fail2ban

13. Check VPS Resource Usage

The ForceVPS client area provides charts for CPU load, RAM usage, network traffic, disk capacity, and disk input/output activity.

You can also obtain basic resource information directly in Linux:

uptime
free -h
df -h
ip addr

Install htop for an interactive view of running processes:

apt install htop -y
htop

14. Point a Domain to the VPS

To make a domain open a website hosted on your VPS, create an A record in its DNS zone:

example.com → SERVER_IP

For the www subdomain, create another A record or a CNAME record:

www.example.com → SERVER_IP

If the VPS has an IPv6 address, use an AAAA record for it.

DNS changes are not applied instantly. Propagation time depends on the record’s TTL value and DNS provider caches.

15. Configure Backups

A VPS should not be treated as its own backup. Store copies of important files and databases on another server or in external storage.

Create a current backup before performing major upgrades, changing the network configuration, or installing important software.

A VPS snapshot is useful for quickly restoring the server state, but it does not replace a proper external backup.

Post-Setup Checklist

After completing the initial setup, verify that:

  • the VPS has a running status in the client area;
  • the SSH connection works;
  • a separate user with sudo privileges has been created;
  • SSH key authentication has been tested;
  • the operating system has been updated;
  • the correct time zone has been configured;
  • the firewall allows SSH and all required server ports;
  • Fail2ban is running;
  • the domain points to the VPS IP address;
  • backups have been configured.

Managing the VPS in the Client Area

The ForceVPS client area allows you to stop, start, or restart the server, open the noVNC console, view network information, copy the SSH command, and monitor resource usage.

For a normal Linux restart, it is better to run:

reboot

Use forced power controls only if the operating system is unresponsive or a normal restart is not possible.

Need Help?

If the VPS does not start, does not accept SSH connections, or you cannot complete the setup, open a support ticket with ForceVPS.

Include the server IP address, operating system, command you ran, and the complete error message. Never send your root password or private SSH key.

Was this answer helpful?