How to Host Multiple Websites on One VPS

How to Host Multiple Websites on One VPS

TL;DR

One VPS can host several websites at once through a reverse proxy, a small piece of software that sits in front of everything and routes each incoming visitor to the right site based on which domain they typed. Pairing that with Docker, so each site runs in its own isolated container, keeps sites from interfering with each other even though they share the same machine. This setup handles a surprising number of small to medium sites before you need to think about more than one server. This post explains how the routing works, how Docker fits in, and when it is genuinely time to split sites across more than one VPS.

How do you actually host multiple websites on one VPS?

You run a reverse proxy on the VPS, point every site's domain at the same server IP address, and let the proxy sort incoming visitors to the correct site based on the domain name they used. Each site itself runs isolated, usually in its own Docker container, so they share the underlying server without sharing software, files, or configuration. That combination, one proxy in front and separate containers behind it, is how a single modest VPS ends up quietly running several completely unrelated websites.

This is exactly how I run my own setup. I host a few small static sites and tools on one Hostinger KVM 2, and from the outside each one looks like a completely separate server. It is not. It is one machine doing careful traffic sorting.

What is a reverse proxy, and how does it know which site to show?

A reverse proxy is software that listens on the standard web ports and decides, for every incoming request, which actual website should answer it. It reads the domain name the visitor's browser sent along with the request and matches that against a list of rules you configured, like "requests for siteone.com go here, requests for sitetwo.com go there." Popular choices for this on a small VPS include Caddy, Nginx, and Traefik, all of which work well and differ mostly in how much configuration they expect from you.

This is the same trick that makes shared hosting possible at scale, just running on a server you fully control instead of one a big hosting company manages for thousands of customers at once.

Why put each site in its own Docker container?

Because it keeps sites from stepping on each other. Without containers, two sites on the same VPS might need conflicting versions of the same software, or one site's misconfiguration could quietly break another. With each site in its own Docker container, that risk mostly disappears. Each container has its own isolated environment, and the reverse proxy is the only thing that needs to know how they all fit together.

Containers also make cleanup painless. Retiring a site is a matter of stopping and removing its container and its proxy rule, rather than untangling files that got mixed in with everything else on the server over time.

What does a simple setup look like in practice?

Picture the VPS running a reverse proxy container that is the only thing directly exposed to the internet, plus one container per website behind it, each on its own internal address that only the proxy talks to. When a visitor requests siteone.com, the proxy matches that domain to the right container and forwards the request there. The visitor gets a normal response and has no idea two, five, or ten other sites live on the exact same machine.

Tools like Caddy make the configuration for this really short, often just a few lines per site naming the domain and the internal address to forward to, with automatic HTTPS certificates handled for you. That last part alone saves a lot of manual work compared to setting up certificates by hand for every site.

How many sites can one VPS actually handle?

There is no fixed number, and anyone who gives you one specific figure is guessing. It comes down to how much RAM and CPU each site's container actually uses under real traffic, and how much of that the VPS has to give out. A handful of small, low-traffic sites can comfortably share a modest VPS. A single busy application might want a whole server to itself. Watch your server's actual resource usage as you add sites rather than planning around a number you read somewhere.

What are the downsides of stacking sites on one server?

The obvious one is a shared failure point. If the VPS itself goes down, every site on it goes down together, which is a real tradeoff compared to spreading sites across separate servers. The other is noisy neighbors, where one site having a bad day, a traffic spike or a runaway process, can slow down everything else sharing the same resources, even inside separate containers.

Good basic security practices matter more too, since a security problem on one site's container is a step closer to the rest of the server than it would be on an entirely separate machine.

When should you split sites across more than one VPS?

When any single site becomes important enough that you would truly rather it not share hardware with anything else, or when the server is consistently running low on RAM as you add more sites, or when one site's traffic pattern is visibly affecting the others. None of those are emergencies, they are signals, and reacting to them when they show up is far easier than trying to predict them in advance.

For most personal projects, small client sites, and side tools, one reasonably sized VPS handles far more than beginners expect, and it is a perfectly sensible place to start.

What does adding a new site to an existing setup actually involve?

Once the reverse proxy and Docker pattern is in place, adding another site is actually quick. You point the new domain's DNS at the same VPS the same way you did for the earlier ones, covered in our guide on connecting a domain to a VPS, spin up a new container for the site, and add a few lines to the reverse proxy's configuration naming the new domain and where to send it. No reinstalling the operating system, no touching the sites already running, no downtime for anything but the new site itself.

This is the part that surprised me most when I first set this up. I expected adding a second site to feel like a small ordeal, and instead it took less time than registering the domain did. That is really the whole appeal of this pattern: the hard part is setting up the proxy once, and every site after that is comparatively easy.

It is still worth keeping a simple written note of which domain maps to which container and port, especially once you have more than two or three sites running. It is a small thing, but future you, troubleshooting at an inconvenient hour, will be glad it exists.

Next step: once you have more than one site running, backups and monitoring matter even more, since you are protecting several projects at once. Our automation hub has more guides for running a small VPS well.

Frequently Asked Questions

How does one VPS serve multiple different websites?

All the sites' domains point at the same VPS IP address, but a reverse proxy running on that server looks at which domain name each visitor actually requested and routes them to the correct site behind the scenes. The visitor never sees this happening. To them, each domain simply works, even though every one of them is answered by the same physical server.

What is a reverse proxy and why do I need one?

A reverse proxy is software that sits in front of your actual websites and decides where to send each incoming request. Without one, a single VPS could really only cleanly serve one website on the standard web ports. With one, you can run as many sites as the server has resources for, each unaware the others exist, because the proxy handles all the traffic sorting.

Should each site get its own Docker container?

Yes, for almost every setup a beginner will build. A container keeps a site's software, dependencies, and configuration isolated from every other site on the same VPS, so one site's update or crash does not touch the others. It also makes each site easy to remove, rebuild, or move to another server later, since the container carries everything it needs with it.

How many websites can one VPS realistically handle?

It depends heavily on how busy each site is and how much RAM and CPU your VPS has, so there is no fixed number, but for small to medium personal or client sites, several at once on a modest VPS is common and reasonable. The honest way to know is to watch your server's resource usage as you add sites, rather than picking a number in advance.

When should I stop putting more sites on one VPS?

When you notice the server consistently running low on RAM, when one site's traffic spikes are affecting the others' performance, or when a single site becomes important enough that you would rather it not share a failure point with anything else. Any of those is a reasonable signal to move that site, or a group of sites, onto a separate VPS.

Disclosure: Some links on this page are affiliate or referral links. If you sign up for a paid plan or subscription through them, AiWizardry may earn a commission, at no extra cost to you, and you often get a discount. We only recommend tools we would use ourselves, and these relationships never change what we tell you about a product.