Run a Paper Minecraft server on a VPS with correct RAM flags and systemd auto-restart. Real commands for Ubuntu 22.04/24.04.
Paper is the performance-optimised server most public servers run. Vanilla/modded differs only in the jar file. RAM guidance: our entry plan, Core VPS 4 (8 GB), runs ~10–20 players with plugins - give Java 5–6 GB.
ssh root@YOUR_SERVER_IP apt update && apt install -y openjdk-21-jre-headless screen adduser --disabled-password --gecos "" mc
su - mc mkdir server && cd server # grab the latest Paper build for your MC version from papermc.io/downloads wget -O paper.jar "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/230/downloads/paper-1.21.4-230.jar" echo "eula=true" > eula.txt
exit # back to root cat > /etc/systemd/system/minecraft.service <<'EOF' [Unit] Description=Paper Minecraft After=network-online.target [Service] User=mc WorkingDirectory=/home/mc/server ExecStart=/usr/bin/java -Xms2G -Xmx3G -jar paper.jar --nogui Restart=always RestartSec=10 [Install] WantedBy=multi-user.target EOF systemctl daemon-reload && systemctl enable --now minecraft journalctl -u minecraft -f # watch it boot
Server address for players: `YOUR_SERVER_IP` (port 25565 opens automatically). Tune `-Xmx` to ~70% of your plan's RAM. Need a bigger box? Core VPS 6 (12 GB) runs 20+ players with plugins.