Skip to content
Wallet live · USDT TRC20 · USDT BEP20 · BTC · ETH · SOL · XMR Free SSL · Malware scan · Instant image 24/7 desk · @rexahost
RexaHostRexaHost

VPS

How to Host a Minecraft Server on a VPS (Java Edition)

· 6 min read

How to Host a Minecraft Server on a VPS (Java Edition)

Run your own Minecraft Java server on a Linux VPS: choosing the right plan, installing Java and Paper, running it as a service, opening ports, backing up worlds and keeping it lag-free.

Key takeaways

  • A VPS gives you full control over versions, plugins, mods and backups, often for less than game hosting panels.
  • 2 to 4 GB of RAM suits a small Paper server; modpacks need 8 GB or more.
  • Per-core CPU speed matters because the main game loop is largely single-threaded.
  • Run the server as a systemd service under a dedicated user, and open only port 25565.
  • Back up worlds automatically and pick a location near your players.

Running your own Minecraft server is one of the most popular reasons people rent their first VPS. Compared with a shared game host, a VPS gives you full control: any version, any plugin or mod, your own backup schedule and room to run other services such as a Discord bot or a map renderer. This guide covers sizing, installation and the operational habits that keep a server running smoothly.

Why host Minecraft on a VPS?

  • Control: choose your server software, version, plugins and settings freely.
  • Dedicated resources: your RAM is allocated to your server on KVM.
  • Flexibility: run several servers, a proxy network or extra tools on the same machine.
  • Learning: it is a fun, practical way to learn Linux administration.

The trade-off is that you manage the server yourself. If you prefer a one-click panel, you can install a game panel on the VPS, but the guide below uses the command line so you understand each piece.

How much RAM and CPU do you need?

Server typePlayersRAMSuggested planPrice
Vanilla/Paper, friends2 to 82 GBVPS Basic (1 vCPU / 2 GB)$5.98
Paper with plugins, small community10 to 254 GBVPS Pro (2 vCPU / 4 GB)$11.58
Light modpacks or larger community20 to 408 GBVPS Business (4 vCPU / 8 GB)$21.18
Heavy modpacks, networksVaries12 to 16 GB+VPS Advanced or Enterprise$27.98 / $39.98

These are starting points. Player behaviour matters a lot: many players exploring new terrain at once generates chunks, which is CPU-intensive, while large redstone farms and entity-heavy builds can slow any server. Pre-generating the world and limiting view distance help a great deal.

Leave about 1 GB for the operating system. On a 4 GB VPS, give Minecraft around 3 GB.

Choose a location near your players

Ping affects how responsive the game feels. Pick the Standard location closest to most players: US (Ashburn) for North America, UK, Netherlands, Germany or France for Europe, Singapore or Japan for Asia, India for South Asia, Brazil for South America and Australia for Oceania. See our guide to choosing a server location.

Step 1: Prepare the VPS

Deploy Ubuntu 24.04 or Debian 12, then secure it: create a sudo user, use SSH keys, update packages and enable a firewall. Our Linux VPS security checklist covers this in detail.

Step 2: Install Java

Recent Minecraft versions require a modern Java runtime (Java 21 for current releases). On Ubuntu 24.04:

sudo apt update
sudo apt install openjdk-21-jre-headless
java -version

Check the Java version required by your chosen Minecraft version; older versions may need an older runtime.

Step 3: Create a dedicated user and download Paper

sudo adduser --system --group --home /opt/minecraft minecraft
sudo -u minecraft -s
cd /opt/minecraft
# Download the Paper build for your version from the official PaperMC site
# and save it as paper.jar
java -Xms3G -Xmx3G -jar paper.jar --nogui

The first run creates eula.txt and stops. Read the Minecraft EULA, then set eula=true in the file and run again to generate the world. Stop the server with stop once it has loaded.

Setting -Xms and -Xmx to the same value gives Java a fixed heap and avoids resizing pauses. The Paper community publishes recommended JVM flags (often called Aikar's flags) that tune garbage collection for Minecraft; they are worth applying.

Step 4: Run it as a systemd service

Create /etc/systemd/system/minecraft.service:

[Unit]
Description=Minecraft Server
After=network.target

[Service]
User=minecraft
WorkingDirectory=/opt/minecraft
ExecStart=/usr/bin/java -Xms3G -Xmx3G -jar paper.jar --nogui
Restart=on-failure
RestartSec=10

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now minecraft
sudo journalctl -u minecraft -f

For an interactive console, many admins run the server inside screen or tmux instead, or enable RCON with a strong password bound to localhost.

Step 5: Open the firewall port

sudo ufw allow 25565/tcp

Keep SSH allowed and everything else closed. Do not expose RCON publicly.

Step 6: Configure server.properties

  • view-distance: lower values (such as 8) reduce load significantly.
  • simulation-distance: controls how far entities and redstone tick.
  • max-players: set realistically for your plan.
  • white-list=true and enforce-whitelist=true for private servers.
  • online-mode=true to verify accounts with Mojang and block impersonation.

Step 7: Back up your worlds

Worlds represent hours of your players' work. Back them up automatically:

  1. Use save-off and save-all via RCON before copying, then save-on, or use a backup plugin that handles this.
  2. Archive the world folders with a timestamp.
  3. Ship copies off-site and keep several days of history.

See our 3-2-1 backup guide for a complete approach.

Performance tips

  • Pre-generate the world with a chunk pre-generation plugin before opening to players.
  • Use Paper's configuration to tune entity limits and redstone behaviour.
  • Profile lag with a profiler plugin such as spark to find the farm or plugin causing problems.
  • Limit plugins to ones you need and keep them updated.
  • Restart periodically during quiet hours if memory use creeps up.

Protecting your server

Game servers sometimes attract denial-of-service attacks, especially popular public ones. RexaHost places a DDoS filter in front of the network. Keep your server IP out of public places you do not control, consider a proxy setup for large networks, and read our DDoS response runbook so you know what to do if it happens.

Bedrock Edition and crossplay

Bedrock Edition (consoles, mobile and Windows) uses a different server software and UDP port 19132. If you want Java and Bedrock players together, a compatibility plugin such as Geyser can bridge them on a Paper server. Remember to open the UDP port as well.

Plugins vs mods

Plugins and mods are often confused. Plugins run on Paper and similar servers, add features such as permissions, economies or anti-grief protection, and work with unmodified game clients. Mods change the game itself and usually require players to install the same modpack, using a loader such as Fabric or Forge. Modded servers typically need much more RAM and CPU than plugin servers, so size your plan accordingly and test with your actual modpack before inviting a crowd.

Running multiple servers

On a larger VPS you can run several servers side by side, for example a survival world and a creative world. Give each its own directory, user or service unit and port, and budget RAM so the total stays below what the VPS has. Larger communities often use a proxy such as Velocity in front of several backend servers, letting players move between worlds without disconnecting. When your network grows beyond a single VPS, a VDS with guaranteed resources is the next step.

Common problems

ProblemLikely causeFix
"Can't keep up!" warningsCPU overloaded, chunk generation, heavy farmsPre-generate, reduce view distance, profile
Server crashes with OutOfMemoryErrorHeap too small for players or modsIncrease -Xmx or upgrade RAM
Players cannot connectFirewall or wrong portOpen 25565/tcp; check server-port
Rubber-bandingHigh ping or server lagChoose nearer location; check TPS

Ready to play

A RexaHost Linux VPS gives you KVM isolation, NVMe storage, a dedicated IPv4 and a choice of ten Standard locations. Start with VPS Basic for friends, step up to VPS Pro for a small community, and resize as you grow. Pay with USDT, BTC or other supported coins.

Frequently asked questions

How much RAM does a Minecraft server need?

A small vanilla or Paper server for a few friends runs on 2 to 4 GB. Modded servers and larger communities usually need 8 GB or more.

Is CPU or RAM more important for Minecraft?

Both matter, but the main server thread is largely single-threaded, so per-core speed affects tick rate. Enough RAM prevents garbage collection pauses and crashes.

Which port does Minecraft Java use?

TCP 25565 by default. Bedrock Edition uses UDP 19132.

Should I use Paper instead of vanilla?

For most multiplayer servers, yes. Paper is a performance-focused server compatible with vanilla clients and supports plugins.

Where should I host my Minecraft server?

Choose the location closest to most of your players to keep ping low. RexaHost offers ten Standard locations including the US, UK, Germany, Singapore and Brazil.

#minecraft server#minecraft vps#game server#paper#java

Plans in this article

Servers mentioned here

VPS Basic

Standard
$2.79 /mo
$5.38Save 48% billed monthly
  • 1 vCPU
  • 2 GB RAM
  • 60 GB NVMe
  • 3 TB traffic
  • Root access · dedicated IPv4
  • Ashburn · London · Amsterdam · Frankfurt +6
Most popular

VPS Pro

Standard
$4.69 /mo
$10.42Save 55% billed monthly
  • 2 vCPU
  • 4 GB RAM
  • 120 GB NVMe
  • 5 TB traffic
  • Root access · dedicated IPv4
  • Ashburn · London · Amsterdam · Frankfurt +6

VPS Business

Standard
$8.39 /mo
$19.06Save 56% billed monthly
  • 4 vCPU
  • 8 GB RAM
  • 240 GB NVMe
  • 7 TB traffic
  • Root access · dedicated IPv4
  • Ashburn · London · Amsterdam · Frankfurt +6

Keep reading

Related articles

Live Chat · offline