EQVPS

Setting Up a Minecraft Server on a VPS

Jul 27, 2026 · 4 min read · EQVPS Team

This is the hands-on companion to our VPS for a game server page. That one is about which plan fits; this one is about actually standing the server up — Paper, a proper systemd service, the config that saves you RAM, the firewall, and backups. By the end you'll have a Minecraft server that survives a crash, survives a reboot, and doesn't quietly eat your whole box.

One honest note before we start: the CPU and RAM limits from the use-case page still apply. Paper on a Small or Medium plan is great for a friend group. A 150-mod pack for a big community is not what these plans are for, and no amount of config fixes that. With that clear, let's build.

1. Install Java

Paper runs on Java. Install a headless JDK — for a current Minecraft version that's Java 21:

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

If your Minecraft version is older, install the Java it asks for (17 for the 1.18-1.20 era). The server logs will complain loudly if the version is wrong.

2. Set up the server directory and Paper

Run the server as its own user, not root — if something ever goes wrong, you want the blast radius small.

sudo adduser --system --group --home /opt/minecraft minecraft
sudo -u minecraft mkdir -p /opt/minecraft/server
cd /opt/minecraft/server

Download the Paper jar for your Minecraft version (grab the URL from their downloads page) and save it as server.jar:

sudo -u minecraft wget -O server.jar "PASTE_PAPER_DOWNLOAD_URL_HERE"

Run it once to generate the config files, then accept the EULA:

sudo -u minecraft java -Xms1G -Xmx3G -jar server.jar --nogui
# it stops immediately asking you to accept the EULA
sudo -u minecraft sed -i 's/eula=false/eula=true/' eula.txt

The -Xmx3G is the JVM heap ceiling. On a 4 GB Small plan, ~3 GB for the JVM leaves the OS breathing room. Don't set it to your full RAM — the JVM has overhead beyond the heap, and the OOM killer doesn't negotiate.

3. Tune server.properties to save RAM

This is where you buy yourself performance for free. Open server.properties and set:

view-distance=8
simulation-distance=6
max-players=10

Remember the single-thread reality: Minecraft's tick leans on one core. If TPS drops, more RAM won't help — lower simulation-distance and mob caps will.

4. Run it as a systemd service

This is the part that turns "a jar I ran once" into "a server." Create /etc/systemd/system/minecraft.service:

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

[Service]
User=minecraft
Group=minecraft
WorkingDirectory=/opt/minecraft/server
ExecStart=/usr/bin/java -Xms1G -Xmx3G -jar server.jar --nogui
Restart=on-failure
RestartSec=10
SuccessExitStatus=0 143

[Install]
WantedBy=multi-user.target

Restart=on-failure is the line that matters — if the JVM crashes, systemd brings it back in ten seconds. SuccessExitStatus=... 143 stops systemd from treating a normal SIGTERM shutdown as a failure. Enable and start it:

sudo systemctl daemon-reload
sudo systemctl enable --now minecraft
sudo systemctl status minecraft
sudo journalctl -u minecraft -f   # live logs

Now it starts on boot, restarts on crash, and logs go to journald.

5. Open the firewall port

Minecraft listens on TCP 25565 by default. Open only that:

sudo ufw allow 25565/tcp
sudo ufw enable

Give your friends the server's IP (and :25565 if you changed the port). Don't open anything you don't need — the whole point of running your own box is that you decide what's reachable.

6. Back up the world

The one that people skip until the day they wish they hadn't. A simple script:

#!/bin/bash
cd /opt/minecraft/server
TS=$(date +%Y%m%d-%H%M)
tar czf /opt/minecraft/backups/world-$TS.tar.gz world world_nether world_the_end

Run it from cron, and — this is the important half — copy the archive off the server, to object storage or another machine. A backup on the same disk as the world dies with the disk. If your world matters, run save-off and save-all in the server console before the tar so you never snapshot mid-write.

That's the whole thing

Java, Paper, tuned config, a systemd service that auto-restarts, a firewall port, and backups that live somewhere else. That's a Minecraft server that behaves like one.

If you don't have a box yet: pick a planSmall ($8) for a small group, Medium ($12) if you're pushing ten players — pay in USDC or USDT (no KYC, no documents), and you'll have root in about 60 seconds. Then work down this page. And the honest reminder one last time: this is the right setup for vanilla or Paper with friends. A heavy modpack for a big community needs different hardware, and we'd rather you hear that from us first.

FAQ

Which Java version do I need?

Recent Minecraft versions want Java 17 or newer; the latest want Java 21. Install the OpenJDK build your Minecraft version calls for — running the server once will tell you clearly if the Java version is wrong. Use a headless JRE/JDK so you're not pulling in a desktop stack you'll never use.

How do I keep the server running after I log out?

Run it as a systemd service. That gives you start/stop/status commands, logs via journalctl, automatic restart if the JVM crashes, and start-on-boot — far better than a screen session you have to remember to reattach to. The service file is in the guide.

How much RAM should I give the JVM?

Set -Xmx a bit under your plan's total RAM so the OS keeps some — on a 4 GB Small plan, around 3 GB for the JVM is sensible. Don't set -Xmx equal to your whole RAM; the OS and the JVM's own overhead need headroom or you'll get killed by the OOM reaper.

How do I back up the world?

Stop the server (or run save-off/save-all first), tar the world folder, and copy the archive off the box — to object storage or another server. Put it on a cron. A backup sitting on the same disk as the world isn't a backup; it dies with the disk.

← Back to blogSee plans & pricing →