Host a Minecraft Java Edition server on your VPS with full control over mods, plugins, and settings.
- Install Java (Minecraft 1.21+ requires Java 21):
apt update && apt install openjdk-21-jre-headless - Create a directory for the server:
mkdir /opt/minecraft && cd /opt/minecraft - Download the latest PaperMC jar (recommended over vanilla for performance and plugin support).
- Accept the Minecraft EULA:
echo "eula=true" > eula.txt - Start the server — adjust memory to suit your plan (example for 2 GB RAM):
java -Xms1G -Xmx1500M -jar paper.jar nogui - Edit
server.propertiesto set your server name, game mode, max players, and other settings, then restart. - Open port 25565 (TCP) in the portal upstream firewall and locally:
ufw allow 25565/tcp - Players connect using your VPS IP address and the default port 25565.
Keep it running: Create a systemd service for the server so it restarts automatically after a reboot. Set Restart=on-failure and use screen or tmux for an interactive console.
RAM guidance: Allow at least 1 GB for the JVM overhead on top of your server heap. A 2 GB KVM plan can comfortably run a small server (up to ~10 players).