How to Install a Minecraft Server on a VPS
You run your own Minecraft server on a Linux VPS with Java and the official Minecraft server file. You open port 25565 and let the server run as a service, so it is always online. With your own VPS you decide the settings, plugins and number of players yourself, without the limits of a shared game server.
How much memory do you need?
For a small server with a few players, 4 GB of RAM is enough. With mods, plugins or many players, choose 8 GB or more. An NVMe VPS ensures fast loading of the world.
Step 1: install Java
apt update
apt install openjdk-21-jre-headless screen -y
java -version Check on minecraft.net which Java version the latest Minecraft version requires and install a newer version if necessary.
Step 2: download the server
Copy the download link of the server file on minecraft.net and download it on your VPS:
mkdir -p /opt/minecraft && cd /opt/minecraft
wget -O server.jar DOWNLOADLINK Step 3: accept the EULA and start the server
java -Xms2G -Xmx3G -jar server.jar nogui
sed -i s/eula=false/eula=true/ eula.txt
screen -S minecraft java -Xms2G -Xmx3G -jar server.jar nogui The first start creates the eula.txt file. After accepting, the server really starts. With Ctrl + A and then D you leave it running in the background.
Step 4: open the port
ufw allow 25565/tcp Players now connect to the IP address of your VPS. With an A record on, for example, mc.jedomein.nl they use an easy name.
Useful commands
screen -r minecraftopens the server console again.stopshuts down the server cleanly from the console.Related articles
Fast NVMe VPS for your apps
NVMe storage with high IOPS and low latency for Docker, databases, AI models and self-hosted apps, in the data centre in Amsterdam.