Hosting a Game Server on a VPS
Run Minecraft, Palworld, or other game servers on a GoZen VPS. Hardware requirements, setup, and optimization.
A VPS gives you the control and dedicated resources that game servers need. No shared hosting limits, no port restrictions, and you pick the location closest to your players.
Choosing the Right VPS
Game servers are RAM-hungry and benefit from fast single-core performance. Here’s what to look for:
| Game | Minimum RAM | Recommended RAM | CPU Notes |
|---|---|---|---|
| Minecraft (Java) | 4 GB | 6-8 GB | Single-threaded, clock speed matters more than cores |
| Minecraft (Bedrock) | 2 GB | 4 GB | Lighter than Java edition |
| Palworld | 8 GB | 16 GB | Needs both RAM and CPU |
| Terraria | 2 GB | 4 GB | Very lightweight |
| Valheim | 4 GB | 6 GB | RAM usage scales with world size |
| ARK: Survival Evolved | 8 GB | 16 GB | One of the heaviest game servers |
| CS2 / TF2 | 2 GB | 4 GB | CPU-bound, low RAM needs |
GoZen’s VPS plans start at 4 vCPUs / 6 GB RAM / 100 GB NVMe, which handles Minecraft, Valheim, and most medium-weight servers. For heavier games (Palworld, ARK), look at the Dedicated VPS plans with AMD EPYC processors.
Location Matters
Pick the datacenter closest to your players. Lower latency means better gameplay:
- US East (Ashburn, VA): best for East Coast / Central US players
- US Central (Kansas City): balanced for all US players
- Europe (Amsterdam, Munich): best for EU players
See GoZen Datacenter Locations for the full list.
Setting Up a Minecraft Server (Java Edition)
This is the most popular game server. The process is similar for other games.
Step 1: Prepare the VPS
SSH into your server and update:
sudo apt update && sudo apt upgrade -y
Install Java (Minecraft needs Java 21 for recent versions):
sudo apt install openjdk-21-jre-headless -y
java -version
Step 2: Create a Dedicated User
Don’t run game servers as root:
sudo useradd -m -s /bin/bash minecraft
sudo su - minecraft
Step 3: Download the Server
mkdir ~/server && cd ~/server
# Download the latest server jar (check minecraft.net for the current URL)
wget https://piston-data.mojang.com/v1/objects/LATEST_HASH/server.jar
Step 4: First Run and EULA
java -Xmx4G -Xms4G -jar server.jar nogui
This creates the configuration files and stops because you need to accept the EULA:
nano eula.txt
# Change eula=false to eula=true
Step 5: Configure the Server
Edit server.properties:
nano server.properties
Key settings:
# Server name shown in the multiplayer browser
motd=My GoZen Server
# Maximum players
max-players=20
# Game mode: survival, creative, adventure, spectator
gamemode=survival
# Difficulty: peaceful, easy, normal, hard
difficulty=normal
# Render distance (lower = less RAM, 10 is a good balance)
view-distance=10
# Simulation distance
simulation-distance=8
# Network compression threshold (leave at 256)
network-compression-threshold=256
Step 6: Create a Start Script
Create a script with optimized JVM flags:
nano ~/server/start.sh
#!/bin/bash
cd ~/server
java -Xmx4G -Xms4G \
-XX:+UseG1GC \
-XX:+ParallelRefProcEnabled \
-XX:MaxGCPauseMillis=200 \
-XX:+UnlockExperimentalVMOptions \
-XX:+DisableExplicitGC \
-XX:G1NewSizePercent=30 \
-XX:G1MaxNewSizePercent=40 \
-XX:G1HeapRegionSize=8M \
-XX:G1ReservePercent=20 \
-XX:G1MixedGCCountTarget=4 \
-XX:InitiatingHeapOccupancyPercent=15 \
-XX:G1MixedGCLiveThresholdPercent=90 \
-XX:SurvivorRatio=32 \
-jar server.jar nogui
chmod +x ~/server/start.sh
Adjust -Xmx4G and -Xms4G based on your VPS RAM. Leave at least 2 GB for the OS.
Step 7: Run as a Service
Create a systemd service so the server starts on boot and restarts on crashes:
sudo nano /etc/systemd/system/minecraft.service
[Unit]
Description=Minecraft Server
After=network.target
[Service]
User=minecraft
WorkingDirectory=/home/minecraft/server
ExecStart=/home/minecraft/server/start.sh
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable minecraft
sudo systemctl start minecraft
Check the status:
sudo systemctl status minecraft
Step 8: Open the Port
# Minecraft uses port 25565
sudo ufw allow 25565/tcp
Players connect using your VPS IP address: your.server.ip:25565
Performance Optimization
Use Paper Instead of Vanilla
PaperMC is a high-performance Minecraft server that’s compatible with the vanilla client but runs significantly faster. It includes built-in optimizations for chunk loading, entity processing, and tick rates.
Replace server.jar with the Paper jar:
cd ~/server
wget https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/LATEST/downloads/paper-1.21.4-LATEST.jar -O server.jar
Monitor Resource Usage
# Check CPU and RAM usage
htop
# Check disk usage
df -h
If RAM usage consistently stays above 80%, upgrade your VPS.
Automated Backups
Back up your world data regularly:
# Add to crontab (crontab -e)
0 */6 * * * tar -czf /home/minecraft/backups/world-$(date +\%Y\%m\%d-\%H\%M).tar.gz /home/minecraft/server/world/
Keep the last 7 days of backups. Also use GoZen VPS snapshots for full-server backups before major changes.
Other Game Servers
The process is similar for most games:
- Create a dedicated user
- Install dependencies (SteamCMD for Steam-based servers)
- Download the server files
- Configure the server
- Create a systemd service
- Open the required ports
SteamCMD (for Steam-based games)
Many game servers (Palworld, Valheim, ARK, CS2) use SteamCMD:
sudo apt install steamcmd -y
# Or install manually from Valve's repo
Then download the game server files:
steamcmd +login anonymous +app_update GAME_APP_ID validate +quit
Each game has its own App ID. Check the SteamCMD dedicated server list.
Troubleshooting
| Problem | Fix |
|---|---|
| Players can’t connect | Check firewall (sudo ufw status). Make sure the game port is open for the correct protocol (TCP/UDP) |
| Server crashes with “Out of memory” | Increase -Xmx value or upgrade your VPS RAM |
| Lag spikes | Reduce view distance, install PaperMC, check for heavy plugins |
| High CPU usage | Reduce simulation distance, limit entity counts, use optimized server software |
| World corruption after crash | Restore from your latest backup. This is why automated backups matter |
What to Do Next
- First Boot VPS Setup - secure your VPS before running game servers
- Server Hardening Basics - protect your server from attacks
- Managing VPS Snapshots - back up your game server
Last updated 07 Apr 2026, 00:00 +0200.