A Small VPS as a Game Server Fleet
Updated: Jul 10
All our online worlds — the portal, the official worlds, the worlds created by players — run on a single rented Linux server (VPS). No data center, no five-figure cloud bill. In this article I'll show how the server is set up and what we learned along the way.
Hardening first. Before the game was allowed onto the server, the basic security came first: a firewall (ufw) that only opens the necessary ports, fail2ban against automated login attempts, and SSH with keys only. Caddy runs as the reverse proxy in its Docker variant — it fetches TLS certificates automatically and routes requests to the right containers.
Every world gets its own container. The game itself runs as a Docker image, and every world gets its own container with fixed limits: 768 MB RAM and 2 CPU cores per world, at most ten active worlds at a time. That way a single world can never bring down the whole server.
Monitoring that calls us. Netdata watches the server with over 140 alarms — from "disk filling up" to "portal not responding". If something trips, a push notification lands on the phone (via ntfy). That way we hear about problems before the players do.
The most surprising finding: When we measured at idle, roughly half of the used memory didn't go to the game at all — it went to Docker and the monitoring itself. The infrastructure that carries the game is heavier at rest than the game. A good reminder that you have to measure instead of guessing.
The verdict after a few months of operation: a small, properly hardened server carries an indie multiplayer game just fine — if you set limits and keep an eye on things.
Comments