Private customers Business customers

Host a Minecraft server on your VPSSet it up yourself instead of renting it ready-made

On a VPS, you set up as many Minecraft instances as you like and decide on every start parameter. This guide shows installation, RAM allocation, autostart and hardening - and first answers the more important question: is building it yourself actually the better choice in your case?

Paper & Vanillasystemd autostartJava 2545 minutes

Published on

VPS or ready-made game server - the honest comparison

Before you put an hour into the setup, the comparison is worth it. Both routes have clear strengths:

CriterionVPS (set up yourself)Ready-made game server
Setupcommand line, around one hourweb interface, a few minutes
Several instancesas many as you like, limited only by RAMone plan per server
Modpack installationmanually via SFTP1-click from CurseForge
Other services in parallelyes - TeamSpeak, website, botsno
Maintenance, updates, securityyour jobour job
Java version, start parametersfreely selectablepre-configured

In short: if you want a server for yourself and a few friends and simply want to play, a ready-made Minecraft server is the better choice - with web interface, 1-click modpacks and unlimited slots. The VPS pays off if you want to run several instances in parallel, build a network or bundle Minecraft with other services on one machine. A broader comparison is in Rent or self-host a Minecraft server.

Rent a VPS from €2.95 / month

Prepaid without a contract, full root access.

View plans & prices

Choice of plan and RAM requirements

Minecraft is above all memory-hungry. As a rule of thumb for the server process:

  • Vanilla or Paper, 5-10 players: 2 GB of RAM for the instance
  • Paper with plugins, 10-20 players: 4 GB of RAM
  • Medium-sized modpack: 6-8 GB of RAM
  • Large modpack such as All the Mods: 10 GB and more

Allow an additional 1 GB or so for the operating system and background services. A plan with 4 GB of RAM therefore carries roughly a 3 GB instance - no more. If you do not plan this buffer in, you will later wonder about crashed server processes. More detail on sizing is in the guide How much RAM does a Minecraft server need?

NVMe storage is rarely the bottleneck: a vanilla world stays below one gigabyte for a long time, large modpacks take up a few gigabytes with all their files.

Step 1: Install Java

Minecraft Java Edition 26.1 and newer requires Java 25; versions 1.20.5 to 1.21.11 run on Java 21. On Debian and Ubuntu, first check which versions your package sources offer:

sudo apt update
apt search openjdk 2>/dev/null | grep jre-headless

If openjdk-25-jre-headless is listed, install it together with screen:

sudo apt install openjdk-25-jre-headless screen -y
java -version

If your distribution does not offer Java 25 yet, use the Eclipse Temurin packages from Adoptium - the setup for Debian and Ubuntu is described on their official website. The headless variant saves space because the graphical libraries are left out - a server does not need them.

If you deliberately run an older Minecraft version, install the matching JRE as well and specify it with its full path in the start command. Background and error messages are explained in Change the Java version.

Step 2: Create a user and install the server

The Minecraft server should not run as root either:

sudo adduser --disabled-login --gecos "Minecraft" minecraft
sudo -u minecraft -s
cd /home/minecraft
mkdir survival && cd survival

Now download the server file. For most people, Paper is the best choice: fully compatible with Bukkit and Spigot plugins while performing much better than vanilla. You will find the current download address on the official Paper website:

wget -O server.jar "PAPER-DOWNLOAD-URL"

First start to have the configuration files generated:

java -Xms2G -Xmx2G -jar server.jar nogui

The server stops with a note about the EULA. That is expected - accept it:

sed -i 's/eula=false/eula=true/' eula.txt

Then start it again. On the second start, the server generates the world, which takes one to two minutes depending on the settings. Afterwards, shut it down cleanly in the server window with stop.

Step 3: Start parameters and configuration

The most important settings are in server.properties. Typical adjustments:

server-port=25565
max-players=20
difficulty=normal
view-distance=8
simulation-distance=6
online-mode=true
motd=Welcome to my server

Two values deserve special attention. view-distance is the most effective lever against performance problems - every step lower noticeably saves RAM and CPU. And online-mode=true must definitely stay enabled: it verifies your players' Mojang accounts and prevents anyone from impersonating someone else.

A complete overview of all options is in the guide server.properties explained.

On memory allocation: set -Xms and -Xmx to the same value. This prevents the Java VM from growing the heap at runtime - a common cause of stutters. And leave the operating system its buffer: on a plan with 8 GB of RAM, give the instance 6 to 7 GB at most.

Step 4: Autostart via systemd

So that the server survives a VPS reboot, set up a systemd unit. Combining it with screen has a practical advantage: you can attach to the server console at any time later.

sudo nano /etc/systemd/system/minecraft-survival.service
[Unit]
Description=Minecraft Server (survival)
After=network.target

[Service]
User=minecraft
WorkingDirectory=/home/minecraft/survival
Type=forking
ExecStart=/usr/bin/screen -dmS mc-survival java -Xms2G -Xmx2G -jar server.jar nogui
ExecStop=/usr/bin/screen -p 0 -S mc-survival -X eval 'stuff "stop"\\015'
Restart=on-failure
RestartSec=20

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable --now minecraft-survival
sudo systemctl status minecraft-survival --no-pager

You attach to the console like this:

sudo -u minecraft screen -r mc-survival

To leave without stopping the server: Ctrl+A, then D. The ExecStop entry is important - it sends the stop command to the console so that the server saves its world cleanly. Without it, systemd would kill the process hard, which may well cost game progress.

Step 5: Firewall and connection

sudo ufw allow 25565/tcp
sudo ufw status

Then connect in the game via YOUR-SERVER-IP:25565. If the server runs on the default port, the IP address alone is enough.

If you have your own domain, you can point it to the server with an A record. For a different port without entering it in the client, you also need an SRV record - see Set up an SRV record for Minecraft.

Run several instances in parallel

This is the real reason to take a VPS instead of a ready-made game server. Create a separate directory with its own port for each instance:

/home/minecraft/survival   -> Port 25565
/home/minecraft/creative   -> Port 25566
/home/minecraft/modded     -> Port 25567

For each instance, copy the systemd unit under a new name, adjust the directory, screen name and RAM allocation and open the port. Keep an eye on the total: three instances with 2 GB each need 6 GB plus a buffer for the operating system.

If all instances should be reachable under one shared address, you also need a proxy such as Velocity or BungeeCord. One thing is security-critical here: the individual servers must then no longer be reachable directly from the internet, otherwise players bypass the proxy's authentication. Bind them to 127.0.0.1 and only open the proxy port. The concept is explained in Minecraft server network.

Do not forget backups

A deleted or damaged world is lost for good without a backup. A simple nightly cron job is enough:

sudo -u minecraft crontab -e
0 4 * * * tar czf /home/minecraft/backups/survival-$(date +\%F).tar.gz -C /home/minecraft/survival world world_nether world_the_end

Keep two things in mind: in cron, the percent sign must be escaped, otherwise cron cuts off the command. And a backup on the same server is only half the job - also move it to an external target. How to automate that is covered in the guide Set up backups.

Frequently asked questions

For vanilla or Paper with 5 to 10 players, around 2 GB; with plugins and up to 20 players, more like 4 GB. Medium-sized modpacks need 6 to 8 GB, large ones such as All the Mods 10 GB and more. Always allow around 1 GB extra for the operating system - the server process must not use up the entire plan.

If you simply want to play, not really: a ready-made game server is set up in minutes and has a web interface, 1-click modpacks and unlimited slots. The VPS pays off as soon as you want to run several instances in parallel, build a network with Velocity or BungeeCord or bundle Minecraft with TeamSpeak, bots and a website on one machine.

Yes, that is one of the main advantages. Create a separate directory with its own port and its own systemd unit for each instance. The only limit is your plan's memory: three instances with 2 GB each need 6 GB plus a buffer for the operating system.

Minecraft Java Edition 26.1 and newer requires Java 25; versions 1.20.5 to 1.21.11 need Java 21. Install it from your distribution's package sources if available, otherwise use the Eclipse Temurin packages from Adoptium. For deliberately older Minecraft versions, you need an older JRE, which you then specify with its full path in the start command.

Only with a systemd unit set up. A clean ExecStop entry that sends the stop command to the server console is important. Without it, systemd ends the process hard, which can lose unsaved world changes.

Yes. The DDoS protection with 250 Gbit/⁠s capacity works at network level and therefore applies to all services on your VPS. Against application-level attacks - such as bot waves connecting en masse - a whitelist or a plugin that limits connection rates also helps.

VPS or ready-made game server?

On the VPS, you build everything yourself and run as many instances as you like. If you would rather play straight away, take a pre-configured Minecraft server with web interface, 1-click modpacks and unlimited slots.

View VPS plans & prices