How to Host Multiple Game Servers on One VPS
Run several game servers on a single VPS without them clashing: separate users, unique ports, systemd services, resource limits, and a clean firewall.

One decent VPS can host several game servers at once — a CS2 server, a Discord bot, and a voice server on the same box — if you keep them properly separated. This guide shows how to run multiple game servers without port clashes, permission problems, or one server starving the others. It ties together the individual guides in our game server hosting lineup.
The three rules of co-hosting
- One user per server — isolation and easier permissions.
- Unique ports per server — no two services can bind the same port.
- A supervisor per server — systemd units so each starts, stops, and restarts independently.
Get these right and you can pack a lot onto one machine.
Step 1: A user per server
Create a dedicated account for each game server so a compromise or runaway process stays contained:
sudo adduser --disabled-password --gecos "" cs2
sudo adduser --disabled-password --gecos "" gmod
sudo adduser --disabled-password --gecos "" bot
Each server's files live in that user's home directory, and its systemd unit runs as that user.
Step 2: Assign unique ports
Plan a port map so nothing overlaps. For example:
- CS2: UDP/TCP 27015, client UDP 27005
- Garry's Mod: UDP 27016 (game), 27006 (client)
- FiveM: TCP/UDP 30120
- Mumble: TCP/UDP 64738
- TeamSpeak: UDP 9987
Set each server's port in its own config or launch flags. If two Source servers both want 27015, move the second to 27016 and update its launch line and firewall rule. See the per-game guides — for instance the CS2 dedicated server guide and Garry's Mod server guide — for exactly where each port is set.

Step 3: A systemd unit per server
Each server gets its own unit file (/etc/systemd/system/cs2.service, gmod.service, and so on) running as its own user. This lets you manage them independently:
sudo systemctl restart cs2
sudo systemctl stop gmod
sudo systemctl status bot
The pattern is identical across games — see automate game server restarts with systemd and cron for scheduled restarts staggered so they don't all restart at once.
Step 4: Cap resources so one server can't starve the rest
systemd can limit each service's CPU and memory with cgroups. Add limits to a unit's [Service] section:
[Service]
MemoryMax=4G
CPUQuota=200%
MemoryMax=4G caps that server at 4 GB (it's killed/restarted if it exceeds it); CPUQuota=200% limits it to two full cores' worth of CPU. Set limits per server so a busy DayZ instance can't crush a small bot. Reload after editing:
sudo systemctl daemon-reload
sudo systemctl restart cs2
Step 5: A tidy firewall
Open only the ports you actually use, grouped by server:
sudo ufw allow 27015/udp # CS2
sudo ufw allow 27016/udp # GMod
sudo ufw allow 30120 # FiveM (tcp+udp)
sudo ufw allow 64738 # Mumble
sudo ufw reload
Keep a comment next to each rule so you remember what's what. Lock the rest down with UFW firewall basics.
Step 6: Right-size the box
Add up each server's RAM and CPU needs, leave headroom for the OS, and check the total against your plan. A light stack (a couple of Source servers, a bot, a voice server) fits comfortably on a mid-size VPS; heavy survival games like DayZ or big Squad battles want their own generous allocation. Work it out with Game Server Specs Explained: CPU, RAM and Bandwidth.
Monitoring
Keep an eye on the whole box with htop, systemctl status, and the tools in how to monitor server resources on Linux. If one server consistently pushes the others out, either raise its limits, move it to its own VPS, or upgrade the plan.
Staggering restarts and backups
When several servers share a box, don't restart or back them up all at once — the combined I/O and CPU spike can cause a noticeable stall. Stagger scheduled jobs with cron so each server restarts at a different minute:
0 5 * * * systemctl restart cs2
10 5 * * * systemctl restart gmod
20 5 * * * systemctl restart fivem
The same logic applies to backups — offset them so only one server is being archived at a time. The full restart pattern is in automate game server restarts with systemd and cron.
When to split onto a second box
One VPS only stretches so far. Move a server to its own machine when it consistently pins the CPU, when a heavy game like DayZ or Squad needs the whole box, or when one noisy neighbour keeps affecting the others. Free migration help makes moving a server between boxes painless.
FAQ
Can two game servers share a port?
No — each listening service needs its own unique port. Change one server's port in its config and firewall rule so they don't collide.
How do I stop one server from using all the RAM?
Use systemd's MemoryMax and CPUQuota in each unit's [Service] section to cap resources per server, so one can't starve the others.
Should each server have its own user?
Yes. A user per server improves isolation and security and makes file permissions simpler. Run each systemd unit as that user.
How many game servers can one VPS run?
It depends entirely on the games. Several light servers (Source games, bots, voice) fit on a mid-size box; one heavy survival server may need the whole machine.
Consolidate your community onto one powerful NVMe game server VPS from Nxeon — full root access, per-service isolation, and room to grow.