SSD Nodes Learn 8GB RAM — $66/yr
Guides Matt ConnorBy Matt Connor

VPS vs VPN: what is the difference?

A VPS is a computer you rent. A VPN is an encrypted tunnel for your traffic. What each one does, what each costs, and how one can host the other.

VPS vs VPN: the short answer

A VPS and a VPN are different kinds of thing, and the names look alike by accident. A VPS (virtual private server) is a computer you rent by the month. A VPN (virtual private network) is an encrypted tunnel that carries your traffic to somewhere else before it reaches the internet. One is hardware you get to use. The other is a service that moves packets.

The names share the words "virtual" and "private" and nothing else. A VPS gives you a Linux machine with a public IP address, a root login and a disk. A VPN gives you a network path. You cannot install software on a VPN, and a VPS on its own does not hide your traffic from anyone.

They meet at one point, and that point is the reason people search for both at once: a VPS can host your own VPN. That is covered at the end.

What a VPS actually is

A VPS is a slice of a physical server, cut up by a hypervisor such as KVM. Your slice gets its own kernel, its own filesystem, its own memory allocation and its own public IP address. From inside, it looks like a whole computer. You log in over SSH and you are root.

ssh root@203.0.113.10
uname -srm

That prints the kernel your server is running, for example Linux 6.8.0-60-generic x86_64. Nobody else is inside that kernel. This is what separates a VPS from shared hosting, where you get a directory on someone else's machine and no control over what is installed.

Because it is a real machine, you decide what runs on it. A web server. A database. A game server. A backup target. A build machine. The tradeoff is that you also own the maintenance: updates, firewall rules, user accounts, backups. A VPS with no firewall and a password login is scanned within minutes of getting an IP, which is why the first ten minutes on a new VPS matter more than anything you install later.

A VPS is always on and always reachable. That is the whole point. It has a stable address that other machines can connect to, so it can serve things.

What a VPN actually is

A VPN builds an encrypted tunnel between your device and a server somewhere else. Your traffic goes into the tunnel on your laptop, comes out at the far end, and continues to the internet from there. Replies travel back the same way.

Two things change because of this. First, the network you are sitting on, the café Wi-Fi or the hotel router, sees only encrypted packets to a single address. It cannot read the sites you visit. Second, every site you visit sees the far end's IP address instead of yours.

That is the whole mechanism. A VPN does not make you anonymous, and it does not encrypt anything past the exit point. Once your traffic leaves the VPN server it is as exposed as it ever was, protected only by whatever the site itself uses, which for almost everything today means HTTPS.

The other common use is the original one: reaching a private network. A company VPN puts your laptop inside the office network so you can reach machines that have no public address at all. Nothing is being hidden. You are being added to a network.

Who runs the server matters

This is the part the marketing skips. A VPN moves the question of "who can see my traffic" from your internet provider to whoever runs the VPN server. It does not delete the question.

With a commercial VPN service, that party is the VPN company. You are trusting their logging policy and their word for it. With a VPN you run yourself, that party is you.

Self-hosting has an obvious limit worth stating plainly. If you are the only person using your VPN, then every connection leaving that server is yours. Anyone watching the exit sees one user. A commercial service mixes thousands of users behind the same address, so the traffic is harder to attribute. Self-hosting buys you control and it costs you that crowd.

What each one costs

Prices move, so treat these as a shape rather than a quote. As of July 2026, a small VPS suitable for a personal VPN, a small website or a few containers runs in the low single-digit to low double-digit dollars per month. A commercial VPN subscription sits in a similar range, often cheaper per month on a long prepaid term.

The cost difference is not really money. It is time. A VPN subscription costs you nothing to run: install an app, pick a country, done. A VPS costs you an hour to set up properly and a few minutes a month to keep patched. What you get back is a machine that can do many jobs at once instead of one job.

Which one do you need

Pick a VPN if the goal is about your traffic. You want the coffee shop network to stop seeing which sites you open. You want to appear to be in another country. You need to reach a work or home network that has no public address.

Pick a VPS if the goal is to run something. You want a website, an API, a Git server, a media library, a bot, a monitoring dashboard, or anywhere to put a cron job that must not depend on your laptop being awake. If you are not sure what you would put on one, the list in what is worth self-hosting in 2026 is a good place to start.

The question "which is faster" has no answer, because they are not doing the same job. A VPN always adds latency, since your packets take a detour through the tunnel server. A VPS has no effect on your browsing speed at all unless you route traffic through it.

The punchline: a VPS can host your VPN

A VPS is a computer with a public IP address. A VPN needs a computer with a public IP address to be the far end of the tunnel. So one can be the other.

Rent a VPS, install WireGuard on it, and you have a private VPN whose server you control and whose logs are yours. WireGuard is in the mainline Linux kernel, so on a KVM VPS there is nothing exotic to install:

sudo apt update && sudo apt install -y wireguard
sudo modprobe wireguard && echo ok

If modprobe prints ok, the kernel module loaded and you are on virtualisation that supports it. If it fails with Operation not supported, you are on container virtualisation that shares the host kernel, and you need the userspace build instead. The full configuration, keys, forwarding, NAT (network address translation) and the failure modes, is in the guide to self-hosting a WireGuard VPN on a VPS.

Two practical notes before you go that way. The tunnel needs one UDP port open, so the firewall rules on the VPS have to allow it, and many providers have a second network firewall in their control panel that also has to allow it. And the same VPS keeps doing its other jobs while the VPN runs, because a tunnel is a network interface, not an exclusive mode.

There is a middle option too. If what you want is your own devices talking to each other privately, rather than a public exit point, a mesh network is less work than a hub-and-spoke VPN. Running your own Headscale coordination server on a VPS gives you that without hand-managing a peer list.

FAQ

Is a VPS the same as a VPN?

No. A VPS (virtual private server) is a rented Linux machine with root access, a disk and a public IP address, and you install software on it. A VPN (virtual private network) is an encrypted tunnel that carries your traffic through another server before it reaches the internet. The names are similar by coincidence. The connection between them is that a VPS can be used as the server that terminates your VPN tunnel.

Does a VPS hide my IP address?

Not by itself. Renting a VPS changes nothing about how your laptop reaches the internet, because your traffic still leaves your own connection directly. Your IP address is only replaced when you route traffic through the server, which means running a VPN or a proxy on it and pointing your device at it. Owning the machine is not the same as using it as a path.

Is running my own VPN on a VPS more private than a paid VPN service?

It moves the trust rather than increasing it everywhere. You control the server and its logs, which removes the need to trust a provider's policy. But you are likely the only user on that IP address, so every connection from it is attributable to one person. A commercial service mixes many users behind one address. Choose self-hosting for control over the machine, not for anonymity in a crowd.

Can one VPS run a VPN and a website at the same time?

Yes. A VPN tunnel is just another network interface on the server, so it coexists with a web server, a database or containers. The limits are CPU, memory and your bandwidth allowance, and encryption work does use CPU. Keep the firewall rules separate in your head: the public site needs TCP 443 open to everyone, and the VPN needs its own UDP port open, and neither rule should be widened to cover the other.

Do I need a VPN if websites already use HTTPS?

HTTPS already encrypts what you send to and receive from a site, so a VPN adds nothing to that part. What a VPN hides is the destination itself, which HTTPS leaves visible to your network and your internet provider. It also lets you appear to connect from another country, and it can put your device inside a private network that has no public address. If none of those describe your problem, HTTPS is doing the work already.