Paper is the most widely used Minecraft Java server for community servers: it stays compatible with the official game, accepts Bukkit and Spigot plugins, and fixes many performance problems of Mojang's server. This guide installs it on a Linux VPS, with automatic start, remote console and backups.
1. Which VPS for Minecraft
Like FiveM, a Minecraft server mostly relies on a single core to simulate the world: a fast processor beats lots of cores. Memory depends on the number of players, the view distance and the plugins.
| Server | Memory allocated to Minecraft | Recommended VPS |
|---|---|---|
| Friends, fewer than 10 players, few plugins | 3 to 4 GB | 4 GB RAM |
| Community of 10 to 40 players | 6 GB | 8 GB RAM |
| Public server, many plugins or a modpack | 10 to 12 GB | 16 GB RAM |
Always leave 1 to 2 GB to the system: if Java takes all the VPS memory, the system kills the server abruptly.
2. Install Java
Minecraft versions 1.20.5 to 1.21 require Java 21. Check the version required for your Minecraft version on Paper's download page.
apt update && apt install -y openjdk-21-jre-headless tmux
java -version
Then create a dedicated user: the server must not run as root.
adduser --system --group --home /opt/minecraft minecraft
3. Install Paper
On papermc.io/downloads/paper, choose your Minecraft version and copy the link to the latest build.
cd /opt/minecraft
sudo -u minecraft wget -O paper.jar "LINK_COPIED_FROM_PAPERMC"
sudo -u minecraft java -Xmx2G -jar paper.jar --nogui
The first launch stops immediately: it generates the files and asks you to accept the Minecraft licence agreement. If you accept it:
sudo -u minecraft sed -i 's/eula=false/eula=true/' /opt/minecraft/eula.txt
4. Tune memory
Give Java the same value for minimum (-Xms) and maximum (-Xmx) memory: it reserves everything up front instead of growing its memory mid-game. The options below are the ones recommended by the Paper team for the G1 garbage collector; example for 6 GB:
java -Xms6G -Xmx6G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 \
-XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch \
-XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M \
-XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 \
-XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 \
-XX:G1RSetUpdatingPauseIntervalPercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem \
-XX:MaxTenuringThreshold=1 -jar paper.jar --nogui
Above 12 GB allocated, the recommendations change slightly; Paper's page on start-up flags covers them. More memory is not always better: an allocation that is too large lengthens garbage collection pauses.
5. systemd service
Save the previous command in /opt/minecraft/start.sh, make it executable with chmod +x, then create the service:
cat > /etc/systemd/system/minecraft.service <<'EOF'
[Unit]
Description=Minecraft Paper server
After=network-online.target
Wants=network-online.target
[Service]
User=minecraft
WorkingDirectory=/opt/minecraft
ExecStart=/opt/minecraft/start.sh
Restart=on-failure
RestartSec=15
TimeoutStopSec=90
[Install]
WantedBy=multi-user.target
EOF
chown minecraft:minecraft /opt/minecraft/start.sh
systemctl daemon-reload
systemctl enable --now minecraft
Paper saves the world and shuts down cleanly when systemd sends it the stop signal. TimeoutStopSec=90 gives it time to write everything on a large world.
6. Access the console
Started by systemd, the server has no terminal. To type commands such as op or whitelist, enable the RCON remote console in server.properties:
enable-rcon=true
rcon.port=25575
rcon.password=A_LONG_PASSWORD
Restart the server, then use a command-line RCON client such as mcrcon from the VPS itself. Do not open port 25575 in the firewall: RCON sends the password in clear text. Logs are shown with journalctl -u minecraft -f or in /opt/minecraft/logs/latest.log.
7. Ports and domain name
ufw allow 25565/tcp comment 'Minecraft Java'
So your players can connect with play.myserver.com instead of an IP address, create an A record pointing to the VPS. If you use a port other than 25565, add an SRV record named _minecraft._tcp.play giving the port: the game reads it automatically. See configuring DNS.
Bedrock players, on console or mobile, can join a Java server thanks to the Geyser plugin, which uses port 19132 over UDP.
8. Optimise
- Pre-generate the world with a plugin such as Chunky before opening the server: generating new terrain is the most expensive operation.
- Lower
simulation-distanceinserver.properties, for example to 6, while keeping a largerview-distance: players see far, but the server only simulates near them. - Measure before changing with the spark profiler, built into Paper: the
spark profilercommand shows which plugin or area of the world slows the server down.
9. Back up the world
A Minecraft world is easily corrupted if it is copied during a write. Before each backup, force a save and suspend saving, then re-enable it at the end. With RCON:
mcrcon -p A_LONG_PASSWORD "save-off" "save-all flush"
# copy or Borg backup of the /opt/minecraft folder
mcrcon -p A_LONG_PASSWORD "save-on"
Send the copy off the server every night: see backups with Borg.
To size the memory for your number of players and plugins, use our server calculator (in French).
Frequently asked questions
How much RAM for a Minecraft server?
Allow 3 to 4 GB for a server among friends, 6 GB for a community of a few dozen players, and 10 to 12 GB for a public server loaded with plugins or a modpack. Always leave an extra 1 to 2 GB of memory to the system.
Paper, Spigot or Vanilla?
Paper for most servers: it is compatible with Spigot and Bukkit plugins and much faster than the official server. Mojang's Vanilla server is only useful if you refuse any change to the game's behaviour. For Forge or Fabric mods, you need a Forge, NeoForge or Fabric server instead of Paper.
My server lags. What should I do?
Run the spark profiler to identify the cause instead of adding memory at random. The most common causes are terrain generation, entity farms, too large a simulation distance or a resource-hungry plugin.
Can Bedrock players join a Java server?
Yes, with the Geyser plugin, plus Floodgate if you want them to connect without a Java account. Geyser listens on port 19132 over UDP by default, which must be opened in the firewall.



