How to run a Minecraft server on a VPS
Step-by-step Minecraft Java server on an Ubuntu VPS: installing Java, first start, running in the background, opening the port and picking a plan for your player count.
Which server to pick
Minecraft mostly needs memory. For a small group of friends on vanilla, VPS Start (4 GB) is enough. With mods, plugins and dozens of players, take VPS S (8 GB) or more.
Choose Ubuntu 24.04 when ordering; the commands below are for it.
1. Connect and install Java
Connect to the server over SSH (see “How to connect to a VPS over SSH”). Current Minecraft versions need Java 21:
apt update
apt install -y openjdk-21-jre-headless screen2. Download the server
Make a folder and download server.jar. Take the current link from the official page minecraft.net/download/server by copying the download button's address:
mkdir ~/minecraft && cd ~/minecraft
wget -O server.jar LINK_FROM_MINECRAFT.NET3. First start and the EULA
The first start creates the files and stops until you accept Mojang's licence:
java -jar server.jar nogui
sed -i 's/eula=false/eula=true/' eula.txt4. Running in the background
To keep the server running after you close SSH, start it in screen. -Xmx is how much memory the game gets: leave about 1 GB for the system (3G on VPS Start, 6G on VPS S).
screen -S mc
java -Xms1G -Xmx3G -jar server.jar noguiLeave screen without stopping the server: Ctrl+A, then D. Back to the console: screen -r mc.
5. Open the port and connect
If the ufw firewall is on, open the game port:
ufw allow 25565/tcpIn Minecraft: “Multiplayer” → “Add Server” → your VPS's IP as the address.
Good to know
- Settings (name, mode, player limit) are in server.properties; restart the server after changing them.
- Back up the world folder: the data on the server is your responsibility.
- The bot tells you if the server stops responding, and you can reboot it right from Telegram.
No-KYC VPS in Frankfurt: AMD EPYC, NVMe, root access, pay with crypto.
Choose a server