5 min read

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. Typical requirements:

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 AMD EPYC VPS (Business Cloud) plans, which give you dedicated AMD EPYC cores.

Location Matters

Pick the datacenter closest to your players. Lower latency means better gameplay:

  • US East (Washington DC, Manassas, VA): East Coast and Central US players
  • US West (Los Angeles, San Francisco): West Coast players
  • Canada (Montreal): Canadian and US Northeast players
  • Europe (Amsterdam, London): EU and UK players
  • Asia-Pacific (Singapore, Tokyo): players in Asia

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 the Java version your Minecraft release requires. Versions 1.20.5 to 1.21.x need Java 21, and newer releases can need a newer Java, so check the release notes for the version you run:

  # Replace 21 with the Java version your Minecraft release needs
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.

Download the current Paper build for your Minecraft version from papermc.io/downloads/paper (copy the link of the download button), then replace server.jar with it:

  cd ~/server
wget "PASTE_THE_PAPER_DOWNLOAD_LINK" -O server.jar
  

Check that the file is a real jar before restarting (file server.jar should report a Java archive or Zip file, not HTML).

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. As the minecraft user, create the backup folder:

  mkdir -p /home/minecraft/backups
  

Then add two jobs with crontab -e, one for the backup and one that deletes backups older than 7 days:

  # World backup every 6 hours
0 */6 * * * tar -czf /home/minecraft/backups/world-$(date +\%Y\%m\%d-\%H\%M).tar.gz /home/minecraft/server/world/

# Keep 7 days of backups
30 4 * * * find /home/minecraft/backups -name "world-*.tar.gz" -mtime +7 -delete
  

The server keeps writing to the world while tar runs, so a copy can occasionally be inconsistent. For a clean copy, run save-off and then save-all in the server console (or over RCON) before the backup, and save-on after it. 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 21 Oct 2026, 00:00 +0300. history

Was this page helpful?