A game server keeps the shared world of a multiplayer game running and syncs every player's actions many times per second. Game server hosting has different needs from a website: steady single-core speed and low latency matter more than raw core count. This guide explains the requirements and walks through a Minecraft Java server on Linux as an example.
Before you start
- A Linux VPS or dedicated server with root access, close to most of your players.
- The game's own documentation for its server software and licence terms.
What game servers need
| Resource | Why it matters | What to look for |
|---|---|---|
| CPU | Many game servers run the main game loop ("tick") on one thread | High clock speed and modern cores over many slow cores |
| RAM | World data, players, mods and plugins live in memory | Enough for the world plus headroom; modded servers need much more |
| Storage | Loading and saving world chunks | NVMe SSD |
| Latency | Players feel delay as lag | A location near your players; test ping |
| Network protection | Game servers are frequent DDoS targets | Provider DDoS filtering that understands game traffic |
Tick rate and why single-core speed wins
Most games update the world at a fixed tick rate – Minecraft targets 20 ticks per second, so each tick must finish within 50 ms. If the CPU cannot finish the work in time, the server lags for everyone. Extra cores help with chunk generation, networking and running several servers, but the main loop usually depends on one fast core.
Example: run a Minecraft Java server on Linux
- Install Java (Minecraft's current releases require a recent Java version; check the game's notes):
sudo apt install -y openjdk-21-jre-headless - Create a non-root user and folder:
sudo adduser --disabled-password minecraft && sudo -iu minecraft mkdir server - Download the official server
.jarfrom the Minecraft website into~/serveras the minecraft user. - Run it once to create
eula.txt, read the EULA, then seteula=true. - Start with a fixed memory size, for example 4 GB:
java -Xms4G -Xmx4G -jar server.jar nogui - Open the game port (default TCP 25565):
sudo ufw allow 25565/tcp. - Run it as a systemd service or inside
screen/tmuxso it keeps running after you log out.
Tip: Leave RAM for the operating system. Setting -Xmx to all of the server's memory causes swapping and worse lag.
Common game server ports
Each game uses its own ports, often UDP. Examples: Minecraft Java TCP 25565, Minecraft Bedrock UDP 19132, Source engine games (CS, Garry's Mod) UDP/TCP 27015. Open only the ports your game needs.
Keep it safe and stable
- Never run the game server as root.
- Back up the world folder regularly, ideally with the server paused or saving disabled during the copy.
- Keep server software and plugins updated; outdated plugins are a common way in.
- Use a whitelist for private servers.
Troubleshooting
- Lag with low CPU usage overall: one core is maxed by the main thread – check per-core usage in
htop. - Players can't connect: confirm the server listens with
ss -tulpnand the port is open in the firewall and provider panel. - Server crashes with OutOfMemoryError: raise
-Xmxor reduce view distance and plugins.
FAQ about game server hosting
Can I host a game server on shared web hosting?
No. Shared hosting is built for websites and does not allow long-running game processes or custom ports. Use a VPS or dedicated server.
VPS or dedicated for a game server?
A VPS with dedicated, fast cores suits small communities; busy or heavily modded servers benefit from a dedicated server.
How much RAM does a Minecraft server need?
A small vanilla server can run in a few gigabytes; modpacks and many players need considerably more. Monitor real usage and adjust.
