Creating a Self-Hosted Minecraft Server with Paper
Introduction
Paper is a high-performance Minecraft server platform based on Spigot. It offers significant performance improvements over vanilla Minecraft, extensive configuration options, and support for the massive Bukkit and Spigot plugin ecosystem. If you want to run a server with plugins, Paper is the most popular choice.
What You Will Need
Before starting, make sure you have the following.
- A computer or VPS to host the server
- Java 21 or later installed
- A stable internet connection
- Basic familiarity with the terminal or command prompt
Step 1 — Install Java
Paper requires Java 21 or later. Check if Java is already installed.
java -version
If not, install it on Ubuntu or Debian with the following command.
sudo apt update && sudo apt install openjdk-21-jdk -y
On Windows download and install the Java 21 JDK from https://adoptium.net.
Step 2 — Create a Server Directory
Create a dedicated folder for your Paper server.
On Linux run the following commands.
mkdir ~/minecraft-paper-server
cd ~/minecraft-paper-server
On Windows create a folder called minecraft-paper-server in a convenient location.
Step 3 — Download Paper
Go to https://papermc.io/downloads/paper and download the latest Paper JAR for the Minecraft version you want. Move the downloaded JAR into your server directory.
Rename it to paper.jar for convenience.
mv paper-*.jar paper.jar
Step 4 — Accept the Minecraft EULA
Run the server once to generate the EULA file.
java -jar paper.jar nogui
The server will stop after generating eula.txt. Open the file and change the following line.
eula=false
Change it to the following.
eula=true
Save the file.
Step 5 — Start the Server for the First Time
Run the server again to generate all configuration files and the world.
java -Xmx2G -Xms1G -jar paper.jar nogui
Wait for the server to fully load. You will see Done in the console when it is ready. Stop the server with the stop command in the console.
Step 6 — Configure the Server
Paper generates several configuration files. The main ones are the following.
server.properties is the standard Minecraft server configuration. paper-global.yml contains Paper-specific global settings. paper-world-defaults.yml contains Paper-specific per-world default settings.
Open server.properties and adjust the key settings.
server-port=25565 sets the port. max-players=20 sets the player limit. gamemode=survival sets the default game mode. difficulty=normal sets the difficulty. motd=A Paper Server sets the server list message. online-mode=true requires legitimate Minecraft accounts.
Step 7 — Important Paper Configuration Options
Open paper-global.yml to configure Paper-specific behaviour. Some useful settings are the following.
Under async-chunks, enable=true enables asynchronous chunk loading which significantly improves performance. Under velocity, enabled=true and secret= are used if you run Paper behind a Velocity proxy for a network of servers.
Open paper-world-defaults.yml for world-specific tweaks. Some useful settings are the following.
anticheat.anti-xray.enabled=true enables Paper's built-in anti-xray system. chunks.prevent-moving-into-unloaded-chunks=true prevents players from entering unloaded chunks which can cause crashes.
Step 8 — Create the plugins Folder
Paper uses a plugins folder for all Bukkit and Spigot plugins. Create it if it does not exist.
mkdir plugins
Step 9 — Create a Start Script
On Linux create start.sh with the following content.
#!/bin/bash
java -Xmx2G -Xms1G -jar paper.jar nogui
Make it executable and run it.
chmod +x start.sh
./start.sh
On Windows create start.bat with the following content.
java -Xmx2G -Xms1G -jar paper.jar nogui
pause
Step 10 — Connect to Your Server
Open Minecraft and go to Multiplayer. Add a server with the address localhost if connecting from the same machine, or your server's local IP address for other devices on the network.
Find your local IP on Linux with the following command.
ip a
On Windows use the following command.
ipconfig
Step 11 — Opening Your Server to the Internet
Forward port 25565 on your router for TCP and UDP traffic pointing to your server machine's local IP. Players outside your network can connect using your public IP address found at https://whatismyip.com.
Useful Server Commands
op username grants operator status. deop username removes it. kick username removes a player. ban username bans a player permanently. ban-ip address bans an IP address. whitelist add username adds to the whitelist. whitelist on enables whitelist mode. stop saves and shuts down the server.
Performance Tips for Paper
Paper includes many optimisations over vanilla but there are additional steps you can take for better performance.
Allocate enough RAM. For a small server with a few players, 2GB is fine. For 20 or more players, 4GB to 8GB is recommended.
Use the Aikar JVM flags which are optimised for Minecraft servers. Replace the java command in your start script with the following.
java -Xms2G -Xmx2G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -jar paper.jar nogui
Install the Spark performance profiler plugin to monitor server performance in real time. Download it from https://modrinth.com/plugin/spark.
Keeping the Server Running with Screen
On Linux use screen to keep the server alive after closing your terminal.
sudo apt install screen -y
screen -S minecraft
./start.sh
Detach with Ctrl+A then D. Reattach with the following command.
screen -r minecraft
Conclusion
You now have a high-performance Paper Minecraft server ready for plugins. Paper's compatibility with the Bukkit and Spigot plugin ecosystem gives you access to thousands of plugins for everything from economy systems to minigames. See the tutorial on installing plugins on a Paper server for a detailed guide on finding and managing plugins.