Kennisbank › Vps Hosting › How do you set up a VPS in 10 minutes?
vps hosting gemiddeld 06 October 2026

How do you set up a VPS in 10 minutes?

How do you set up a VPS in 10 minutes? A Virtual Private Server (VPS) is a virtual machine that runs on a physical server, but functions as a separate,

A Virtual Private Server (VPS) is a virtual machine that runs on a physical server, but functions as a separate, isolated server with its own operating system, network settings, and administrative rights. It is a commonly used solution for hosting websites, databases, containers, or running network services. For developers, system administrators, and administrators of open source software, setting up a VPS is a basic skill. With the right approach, this can be completed in ten minutes — from purchase to a secured, working server.

The first step is choosing a hosting provider that offers VPS services. There are many providers on the market, from large international players to regional specialists. What matters is that the provider supports Linux distributions, such as Ubuntu, Debian, or CentOS, and that fast provisioning is available. Most providers offer a web interface in which you can create a VPS in a few clicks. You then choose a region, a machine size (for example 1 CPU, 2 GB RAM, 40 GB SSD), and an operating system. The process usually takes less than a minute. Once the server is provisioned, you receive the access details by email or in the dashboard interface: the IP address, the username (usually root), and the password, or a link to an SSH key.

The second step is making a secure connection to the server via SSH. SSH, Secure Shell, is a network protocol that enables encrypted communication between two systems. It is used to execute commands remotely on a Linux server. The ssh command is intended for that. You open a terminal on your local machine and type, for example:

ssh root@192.0.2.1

Replace 192.0.2.1 with the actual IP address of your VPS. On the first connection, SSH asks for confirmation of the server's host key — this is normal. After confirmation, you arrive at the command line of the VPS. If you have received a password, you enter it. Some providers generate a temporary password that must be changed on first login.

The third step is securing SSH access. Using the root account for direct login attempts is a security risk. That is why it is recommended to create a new user and use SSH keys instead of passwords. The adduser command (or useradd, depending on the distribution) creates a new user. Then you add that user to the sudo group, so that they have permissions to execute system commands. You can, for example:

adduser jan
usermod -aG sudo jan

After that, you must copy the SSH key from your local machine to the VPS. The ssh-keygen utility can be used to generate a key pair if you do not already have one. The command:

ssh-keygen -t ed25519

creates a modern, secure key. Then you copy the public key to the VPS with ssh-copy-id:

ssh-copy-id jan@192.0.2.1

Now you can log in without a password, but with cryptographic verification. Then you modify the SSH configuration file, usually /etc/ssh/sshd_config, to disable password authentication and prohibit root login. You use a text editor such as nano or mawk to edit the file — although mawk is mainly intended for text processing via scripts, you can in theory use it to generate configuration rules. After adjustment, you restart the SSH service with systemctl restart sshd.

The fourth step is updating the operating system. A fresh VPS often has outdated packages. You run:

apt update && apt upgrade -y

on Debian or Ubuntu systems. This ensures that all software is up to date, including security patches. This is essential to close vulnerabilities.

The fifth step is configuring a firewall. Modern Linux distributions often use nftables as the packet filtering framework. The nft command is the administration tool for defining rules. You can set up a basic firewall to allow only SSH (port 22), HTTP (80), and HTTPS (443), and block all other incoming connections. A simple example:

nft add table inet filter
nft add chain inet filter input { type filter hook input priority 0 \; }
nft add rule inet filter input ct state established,related accept
nft add rule inet filter input iif "lo" accept
nft add rule inet filter input ip protocol icmp accept
nft add rule inet filter input tcp dport 22 accept
nft add rule inet filter input tcp dport 80 accept
nft add rule inet filter input tcp dport 443 accept
nft add rule inet filter input drop

These rules ensure minimal, secure access. You can save them in a configuration file and load them at startup.

Sixth step: install basic software. Depending on the purpose of the VPS — web server, database, container host — you install the necessary packages. For a web server:

apt install nginx
systemctl enable nginx
systemctl start nginx

Nginx listens on port 80 by default and shows a welcome page. You can test this by visiting the IP address of the VPS in a browser.

Seventh step: ensure monitoring. The sar command (from the system activity report) is part of the sysstat package and collects information about CPU usage, memory, disk, and network activity. After installation:

apt install sysstat

sar is automatically activated and collects data in the background. You can later use sar -u to view CPU usage, or sar -r for memory usage. This helps detect performance problems.

Eighth step: secure file system integrity. The e2fsck command checks and repairs ext2, ext3, and ext4 file systems. Although it is usually run automatically on boot errors, you can start it manually if you suspect the file system is corrupt. It uses a configuration file e2fsck.conf to define default behavior, such as whether automatic repairs should be performed. For a VPS this is usually not necessary, but it is good to know that it is available.

Ninth step: consider network performance management. If you experience high latency or packet loss, you can set up Quality of Service (QoS) with tc, the traffic control command. A specific qdisc (queueing discipline) such as sfq (Stochastic Fair Queuing) or tbf (Token Bucket Filter) can be used. The source material mentions tc-sfb, a variant based on Stochastic Fair Blue, which manages congestion based on packet loss and link usage. It prevents non-responsive flows (such as bulk transfers) from affecting the performance of other traffic flows. An example:

tc qdisc add dev eth0 root sfb

This activates SFB on the network interface. It is advanced, but useful in environments with a lot of competition.

Finally: test and validate. Use ping, curl, and ss to check connectivity and services. Make sure everything works as expected. If you work remotely, it is wise to use netplan-try for network configurations — this tool applies a netplan configuration and automatically rolls it back if you do not confirm within a time limit. That prevents you from being locked out by an incorrect network setting.

Within ten minutes you now have a working, secured VPS. The foundation has been laid for further expansion: containers with Docker, databases such as PostgreSQL, or Git repositories via gitweb. Each of these services can be configured with the tools that Linux offers: nft for network security, ssh-keygen for authentication, mawk for automation, and sar for monitoring. The power of a VPS lies in the control — and that control starts with a good start.

← Terug naar kennisbank
← Terug naar kennisbank