How to Set Up a Minecraft Server (PaperMC)
This guide covers setting up a high-performance **PaperMC** server for Minecraft 1.21+. Paper is a modified version of Spigot/Bukkit that offers massive performance improvements and bug fixes.
Prerequisites
- Java 21: Minecraft 1.21+ strictly requires Java 21 (JDK 21).
- RAM: At least 4GB is recommended for modern versions.
Step 1: Download the Server Jar
Do not download the default server.jar from Mojang if you want performance. Instead, go to the PaperMC Downloads page and get the latest build for your version.
Rename the downloaded file to server.jar for simplicity.
Step 2: First Run & EULA
Create a startup script or run the server from the terminal:
The server will start and immediately stop. This is normal. It will generate a file called eula.txt.
Open eula.txt and change eula=false to eula=true to accept the Mojang EULA.
Step 3: The Startup Script
For a reliable server, you should use a script to launch it. Create a file named start.sh (Linux) or start.bat (Windows):
Adjust the -Xms (min RAM) and -Xmx (max RAM) values to match your server's capacity. Always leave 1-2GB for the OS.
Step 4: Connecting
Once the server says "Done!", you can connect using your server's IP address in the Minecraft Multiplayer menu.
Tip: If you are hosting on your home PC, you will need to Port Forward port 25565 (TCP/UDP) on your router to let friends connect.