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:

GameMinimum RAMRecommended RAMCPU Notes
Minecraft (Java)4 GB6-8 GBSingle-threaded, clock speed matters more than cores
Minecraft (Bedrock)2 GB4 GBLighter than Java edition
Palworld8 GB16 GBNeeds both RAM and CPU
Terraria2 GB4 GBVery lightweight
Valheim4 GB6 GBRAM usage scales with world size
ARK: Survival Evolved8 GB16 GBOne of the heaviest game servers
CS2 / TF22 GB4 GBCPU-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:

  1. Create a dedicated user
  2. Install dependencies (SteamCMD for Steam-based servers)
  3. Download the server files
  4. Configure the server
  5. Create a systemd service
  6. 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

ProblemFix
Players can’t connectCheck 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 spikesReduce view distance, install PaperMC, check for heavy plugins
High CPU usageReduce simulation distance, limit entity counts, use optimized server software
World corruption after crashRestore from your latest backup. This is why automated backups matter

What to Do Next

Last updated 07 Apr 2026, 00:00 +0200. history

Was this page helpful?