# What is a VPS (virtual private server)?

> A VPS (virtual private server) is a rented virtual machine with its own operating system, address and root access, running on a provider's hardware.

URL: https://levelrail.com/learn/server-basics/what-is-a-vps/
Updated: 2026-11-27

A VPS, or [virtual private server](https://levelrail.com/learn/glossary/#vps)), is a virtual machine you rent from a provider and control like your own computer, with its own operating system, IP address and root access. Say you built a small app on your laptop and want it online all day, even when the laptop is closed. You could host it on a platform that runs it for you, or you could rent a computer in a datacenter and run it yourself. That rented computer is a VPS. Knowing what you actually get, and what becomes your job, saves you from surprises at 2 a.m.

## A short history

Providers began selling virtual machines on shared hardware in the 2000s, as a cheaper step between shared hosting and a whole physical server. Cloud platforms later made them quick to create and delete, so renting one by the month is now routine.

## How it works

A provider owns large physical machines in a datacenter. Software called a hypervisor splits one physical machine into several virtual machines. Each virtual machine gets a fixed share of CPU, memory and disk, its own operating system and its own network address. That virtual machine is your VPS. From the inside it looks like a normal computer: you log in, install packages and run programs.

Because the machines share hardware, the provider isolates them from each other. Your processes cannot see another customer's processes, and you cannot see theirs. What you do not control is the physical host: you cannot choose its neighbours, and a host problem can affect you even when your own server is healthy.

You reach your VPS over the network, almost always with [SSH](https://levelrail.com/learn/server-basics/what-is-ssh-and-how-does-it-work/)). The provider gives you a public IP address (IPv4, and often IPv6 too) and either a root password or a place to upload your SSH public key. Everything else is up to you.

| Layer | Who looks after it |
| --- | --- |
| Physical hardware, power, network | The provider |
| Hypervisor and host machine | The provider |
| Operating system, updates, firewall | You |
| Your apps, data and backups | You |

A worked example: you create a server in the provider dashboard and pick Ubuntu and a small plan. Within a minute the dashboard shows an IP address such as 203.0.113.10. You run `ssh root@203.0.113.10`, and the provider's machine answers as if it were a physical computer. You run `apt update`, install a web server and open the IP in a browser. Nothing in that chain involved you touching hardware, but every step after the first login was yours to secure.

## VPS compared with the alternatives

| Option | You control | Effort | Typical use |
| --- | --- | --- | --- |
| Shared hosting | A folder and some settings | Low | A simple website |
| VPS | The whole operating system | Medium | Your own apps and databases |
| Dedicated server | The whole physical machine | Medium to high | Heavy, steady workloads |
| Managed platform | Your code only | Low | Apps where you want no server work |

## What you get

- An operating system you choose, usually a Linux such as Ubuntu or Debian.
- Root access, so you can install any software.
- A public IPv4 address, so other computers can reach it. IPv6 may be offered as well.
- A fixed amount of CPU, memory and disk.
- Usually a web console and a way to reboot or rebuild the machine from the provider's dashboard.

## What you are responsible for

You keep it updated, secure and backed up. A provider runs the hardware, and everything above the operating system is yours. A new VPS is on the public internet within minutes, and automated scanners try common passwords against SSH almost immediately. The first things to do are covered in the next lessons: [key based login](https://levelrail.com/learn/server-basics/log-in-with-ssh-keys/)), a [non-root user](https://levelrail.com/learn/server-basics/create-a-sudo-user/)) and a [firewall](https://levelrail.com/learn/server-basics/set-up-a-firewall-with-ufw/)).

[Backups](https://levelrail.com/learn/deploy-operate/backups-and-the-3-2-1-rule/)) deserve a special mention. A provider snapshot feature, where offered, is often an optional paid extra and lives with the same provider. Do not assume your data is safe just because the server is rented.

## When a VPS is a good fit

- You want to run your own apps, databases or a self-hosted platform.
- You want predictable cost instead of per-request pricing.
- You want to learn how servers work.

## When not to use it

A VPS is a poor fit when you do not want to handle updates and security at all. A managed platform trades some control for less work. It is also a poor fit for a single static page, where simple static hosting costs less effort, and for workloads that must survive the loss of a whole machine without any setup from you.

## Common misconceptions

- A VPS is not automatically backed up. Backups are a separate feature, if offered, and you should test them.
- A VPS is not secure by default. It is reachable from the internet as soon as it boots.
- A VPS is not a dedicated server. The physical host is shared with other customers.
- More RAM does not fix a slow disk or a bad query. Measure before you upgrade.

## Check it worked

After you log in to a VPS, ask the machine what it is:

```bash
hostnamectl
```

What you should see: a block of lines including the operating system name, the kernel version and a `Virtualization:` line that names the hypervisor technology, for example `kvm`. Some container based VPS offerings show a different value, which is fine. Next, check your resources:

```bash
nproc
free -h
```

What you should see: the number of CPU cores, and a memory table whose `total` matches the plan you rented, give or take a little the system reserves.

## Edge cases and gotchas

- **A VPS is not the same as a container.** Some cheap plans are container based and share the host kernel, so you cannot load your own kernel modules or change some kernel settings. Check with `hostnamectl`, and read the plan details if you need Docker features or custom kernels.
- **CPU architecture can differ.** Most plans are x86_64 (amd64), but some providers sell ARM servers. A Docker image built only for amd64 will not run on ARM. Check with `uname -m`.
- **Your IP address may be shared or reused.** A fresh address can have a history, for example a past tenant who sent spam. If mail or an API refuses you, ask whether the address is on a blocklist.
- **IPv6 may be on while your firewall only covers IPv4.** A service you thought was hidden can be reachable over IPv6. Check rules for both families.
- **Low memory plans run out quickly.** When the kernel runs out of memory it kills a process, often your database. Watch `free -h` and consider [swap](https://levelrail.com/learn/server-basics/add-swap-space-on-ubuntu/)) on small servers.
- **Deleting the server deletes the disk.** Destroying a VPS in the dashboard normally removes its storage and, on many providers, its IP address. Back up before you rebuild or delete.

## Troubleshooting

| Symptom | Likely cause | Fix |
| --- | --- | --- |
| `Connection timed out` when you SSH | Wrong IP, server off, or a firewall dropping port 22 | Check the IP and power state in the dashboard, then check firewall rules |
| `Connection refused` | The server is up but nothing listens on port 22 | Use the web console and check that the SSH service is running |
| `Permission denied (publickey)` | Your key is not installed on the server | Add your public key via the console or log in with the password once and copy the key |
| The server is slow and apps are killed | Out of memory | Check `free -h`, stop heavy programs, add swap or upgrade the plan |
| Disk full and nothing can write | Logs, images or backups filled the disk | Find large folders with `du`, clean what you recognize |
| Provider says the host is under maintenance | Physical host work | Wait, or ask the provider about moving the VPS to another host |
| Ping works but the website does not load | Nothing listens on port 80 or 443, or a firewall blocks it | Check `ss -ltnp` for a listener and the firewall rules |
| `Host key verification failed.` | The server was rebuilt and its host key changed | Remove the old entry with `ssh-keygen -R 203.0.113.10` after confirming the rebuild was yours |

## Real-world scenario

You rent a small VPS to host a side project. The first login as root works, and you immediately notice in `sudo journalctl -u ssh -n 20` a row of failed logins from addresses you do not know. Nothing is wrong: these are automated scans that every public server gets.

You add an SSH key, create a normal user with sudo rights, turn on the firewall and enable automatic security updates. That takes about half an hour. A week later the provider announces maintenance on the physical host and your server reboots. Because your app is a service that starts at boot, it comes back by itself, and the only trace is a gap in your uptime graph.

The lesson from the story: the server is yours to harden and keep alive, and the setup you do on day one decides how boring the next year is.

## Quick reference

| Task | Command |
| --- | --- |
| Show OS and virtualization | `hostnamectl` |
| Show CPU cores | `nproc` |
| Show memory | `free -h` |
| Show CPU architecture | `uname -m` |
| Show public listening ports | `ss -ltn` |

## Security and safety notes

- Never leave the root password as the only protection on a public server. Move to SSH keys.
- Keep a copy of important data off the server. A VPS can be lost to a mistake, a failed disk or an account problem.

## Related lessons

- [What is SSH and how does it work](https://levelrail.com/learn/server-basics/what-is-ssh-and-how-does-it-work/)): how you reach the server
- [Initial server setup checklist](https://levelrail.com/learn/server-basics/initial-server-setup-checklist/)): what to do in the first hour
- [Create a non-root sudo user](https://levelrail.com/learn/server-basics/create-a-sudo-user/)): stop using root every day
- [Backups and the 3-2-1 rule](https://levelrail.com/learn/deploy-operate/backups-and-the-3-2-1-rule/)): protect your data
- [Best self-hosted apps worth running](https://levelrail.com/blog/best-self-hosted-apps-worth-running/)): ideas for what to run on one

## Next

Once you have one, learn how to [log in with SSH keys](https://levelrail.com/learn/server-basics/log-in-with-ssh-keys/)).

## Frequently asked questions

### What is the difference between a VPS and shared hosting?

Shared hosting gives you a folder on a machine many sites share, with no control over the operating system. A VPS gives you a whole virtual machine where you install what you want.

### How much RAM does a small VPS need?

A single small site or a few containers run on 1 to 2 GB of RAM. Databases, builds and many apps need more, so size it to what you run.

### Can I get locked out of my own VPS?

Yes. A bad firewall rule or SSH setting can cut you off. Most providers offer a web console that works without the network, so you can log in and fix it.

### Is a VPS the same as a dedicated server?

No. A dedicated server is a whole physical machine for you. A VPS is a virtual machine that shares a physical host with other customers.
