−50% on all plans · starting at €2.48/mo · Blog·Docs·Sales

Game server hosting (Minecraft, Valheim) on Cloud VPS

Sizing, anti-DDoS, automatic backups, and the surprisingly small servers needed for great gaming experiences.

Hosting a Minecraft, Valheim, or Counter-Strike server on a VPS is genuinely affordable for small communities — €3-15/month gets you a dedicated server that performs better than most "game server hosting" specialty providers. This guide covers sizing, security, and the operational details that matter.

Sizing by game

Different games have different resource profiles. The summary:

GamePlayersRecommended tierBottleneck
Minecraft Java vanilla10-152 vCPU / 4 GBSingle-thread CPU
Minecraft modded (CurseForge)5-102 vCPU / 8 GBRAM, then CPU
Valheim dedicated102 vCPU / 4 GBRAM during exploration
Counter-Strike 2 dedicated322 vCPU / 4 GBNetwork packets
Rust dedicated50-1004 vCPU / 16 GBRAM and CPU
Palworld324 vCPU / 16 GBRAM
ARK: Survival Ascended20-404 vCPU / 32 GBRAM (it's bad)

The pattern: most games are single-thread CPU bound on the main game loop. Adding vCPU above 2-4 helps with parallel tasks (saves, world generation) but not the core simulation. RAM is the resource that scales with player count and world size.

Why a VPS is better than specialty game hosts

Game-specific hosts (Apex Hosting, Shockbyte, GPortal) market low prices but have constraints:

A VPS gives you root, dedicated resources (no oversubscription on our High Performance tier), and the freedom to run any mod, plugin, or supporting service.

Setting up a Minecraft Java server

The full process from VPS provision to playing:

# Install Java 21 (required for Minecraft 1.21+)
sudo apt update && sudo apt install -y openjdk-21-jre-headless screen

# Create dedicated user
sudo adduser --system --group --home /opt/mc minecraft
sudo mkdir -p /opt/mc
sudo chown minecraft:minecraft /opt/mc

# Download Paper (better-performing fork of vanilla)
sudo -u minecraft wget -O /opt/mc/server.jar   https://api.papermc.io/v2/projects/paper/versions/1.21.1/builds/120/downloads/paper-1.21.1-120.jar

# Initial run to generate config files
cd /opt/mc
sudo -u minecraft java -Xms2G -Xmx3G -jar server.jar nogui

# Accept EULA
sudo -u minecraft sed -i 's/eula=false/eula=true/' /opt/mc/eula.txt

Run as a systemd service so it restarts on crash and survives reboots:

# /etc/systemd/system/minecraft.service
[Unit]
Description=Minecraft Server
After=network.target

[Service]
User=minecraft
WorkingDirectory=/opt/mc
ExecStart=/usr/bin/java -Xms3G -Xmx3G -XX:+UseG1GC -jar server.jar nogui
Restart=on-failure
RestartSec=30

[Install]
WantedBy=multi-user.target

Enable and start:

sudo systemctl daemon-reload
sudo systemctl enable --now minecraft

Open the firewall:

sudo ufw allow 25565/tcp

JVM tuning for Minecraft specifically

The default JVM settings work but aren't optimal. Aikar's flags (well-known in the Minecraft hosting community) significantly improve garbage collection behavior:

java -Xms6G -Xmx6G -XX:+UseG1GC -XX:+ParallelRefProcEnabled   -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions   -XX:+DisableExplicitGC -XX:+AlwaysPreTouch   -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40   -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20   -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4   -XX:InitiatingHeapOccupancyPercent=15   -XX:G1MixedGCLiveThresholdPercent=90   -XX:G1RSetUpdatingPauseTimePercent=5   -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem   -XX:MaxTenuringThreshold=1 -jar server.jar nogui

Set -Xms equal to -Xmx so the heap doesn't grow during play (the growing causes GC pauses).

DDoS protection

Game servers attract DDoS attacks more than typical web workloads — competing servers, disgruntled players, random vandalism. FranceVPS includes layer-4 DDoS protection on every plan, with detection and mitigation typically within 30 seconds. For Minecraft specifically:

Backups (the unglamorous critical thing)

Players rage-quit when their hard-earned base disappears in a corruption. Backups are mandatory:

# /etc/cron.daily/mc-backup
#!/bin/bash
DATE=$(date +%Y%m%d)
cd /opt/mc

# Tell Minecraft to flush to disk
mcrcon -p PASSWORD "save-all flush"
sleep 5

# Pause writes
mcrcon -p PASSWORD "save-off"

# Snapshot the world
tar czf /backups/world-$DATE.tar.gz world world_nether world_the_end

# Resume writes
mcrcon -p PASSWORD "save-on"

# Retention: keep 14 days
find /backups -name "world-*.tar.gz" -mtime +14 -delete

# Off-site sync
rclone sync /backups remote:mc-backups/

Monitoring

You want to know if the server crashed, the world fills the disk, or RAM is exhausted. Minimum:

Plugins worth installing on day one

For other games, briefly

Valheim: Steam-hosted dedicated server, runs as a systemd service. Memory-hungry during exploration; 8 GB recommended for 5+ players.

Counter-Strike 2: dedicated server runs cleanly on Linux, low resource usage, but very network-sensitive. Place in Paris for low latency to most European players.

Rust: RAM-hungry beast. 16 GB minimum for any meaningful population. Map size affects RAM more than player count.

Palworld, ARK: these games have known memory leaks. Plan for 32+ GB and accept periodic restarts.

For most communities of 10-20 players, a 4 GB VPS is enough for an excellent experience — better than most paid game-host services, with full control over the environment.


Related articles

Try FranceVPS today

14-day money-back guarantee. No card required to explore. Sovereign French infrastructure.