Install a Minecraft Server
Set up a Minecraft Java Edition server on a vps.direct Premium VPS in a few minutes.
Install a Minecraft Server
Minecraft's main server loop runs largely on a single thread, so it benefits most from high CPU clock speed. A Premium (Ryzen 7000/9000) vps.direct VPS is the right choice — the XS plan (4 GB, 2 cores) is fine for a few friends, while M or larger suits bigger communities.
For a small private server, 4 GB RAM is a reasonable minimum. Leave ~1 GB for the OS and allocate the rest to Minecraft.
1. Prepare the VPS
Use a recent Ubuntu or Debian template. Update the system and install Java and screen:
sudo apt update && sudo apt upgrade -y
sudo apt install openjdk-21-jre-headless screen -yMinecraft 1.20.5+ requires Java 21. For older versions, install the matching JDK (Java 17 for 1.18–1.20.4, Java 8 for 1.16.5 and below).
2. Create a dedicated user
Don't run the server as root:
sudo adduser --disabled-password --gecos "" minecraft3. Download the server
Switch to the new user and set up the server directory:
sudo su - minecraft
mkdir server && cd serverDownload the official Minecraft server jar (replace the version number with your target):
wget https://piston-data.mojang.com/v1/objects/<hash>/server.jarGet the exact download URL and hash for your version from the Mojang version manifest. You can also use Paper or Purpur for better performance.
4. Accept the EULA and configure
Start the server once to generate config files, then stop it:
java -Xmx3G -Xms3G -jar server.jar noguiAccept the EULA:
sed -i 's/eula=false/eula=true/' eula.txtEdit server.properties to set key options:
server-port=25565
max-players=20
motd=My vps.direct Minecraft Server5. Open the firewall
Allow the Minecraft port through your OS firewall:
sudo ufw allow 25565/tcpAlso confirm the port is open in the vps.direct control panel firewall if you've enabled it there.
6. Run the server persistently
Use screen so the server keeps running after you disconnect:
screen -S minecraft
java -Xmx3G -Xms3G -jar server.jar noguiDetach from the screen session with Ctrl+A then D. Reattach later with:
screen -r minecraftReplace -Xmx3G with roughly 75–80% of your VPS RAM, leaving room for the OS. On a 4 GB VPS, -Xmx3G is a safe ceiling.
7. Connect
Find your VPS IP in the welcome email or Client Area. In Minecraft, select Multiplayer → Add Server and enter:
YOUR_VPS_IP:25565If you set a custom server-port, use that instead.
Going further
- Custom domain — point an
Arecord at your VPS IP and connect with the hostname instead. - Performance — switch to Paper for plugin support and better TPS.
- Backups — automate world backups; vps.direct includes automated backups but keep your own off-site copies too.
- More players — upgrade to a larger plan; upgrades are immediate and pro-rated.
Troubleshooting
- Can't connect — check the firewall (
ufw status), confirm the server is listening (ss -tlnp | grep 25565), and verify the port in the control panel. - Lag / low TPS — you may need more RAM or a faster CPU; consider Paper and tune
view-distance. - Crash on start — usually wrong Java version. Check
java -versionmatches your Minecraft version. - Port already in use — another process holds 25565; change
server-portor stop the other process.
See Network Problems for deeper connectivity debugging.