Gaming Servers

Minecraft Paper / Purpur

Install a Minecraft Paper or Purpur server with plugin support on Linux, the standard for multiplayer servers

Paper is the most popular Minecraft server software, offering significant performance improvements over vanilla and full plugin support. Purpur is a Paper fork with additional configuration options. Both support the Bukkit/Spigot/Paper plugin API.

Paper vs Purpur vs Vanilla

SoftwarePluginsPerformanceExtra config
VanillaBaselineMinimal
PaperMuch betterGood
PurpurSame as PaperExtensive

Requirements

  • Ubuntu 22.04 / Debian 12
  • Java 21 (for Minecraft 1.21+) or Java 17 (for 1.17-1.20)
  • 2 GB RAM minimum (4+ GB recommended for plugins)
  • Port 25565 TCP

Install Java

sudo apt update
sudo apt install openjdk-21-jre-headless -y
java -version

Create a dedicated user

sudo useradd -m -s /bin/bash minecraft
sudo su - minecraft
mkdir -p /home/minecraft/server
cd /home/minecraft/server

Download Paper

Find the latest build at papermc.io/downloads:

# Replace 1.21.4 and 100 with the latest version/build
wget https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/100/downloads/paper-1.21.4-100.jar \
  -O paper.jar

Or use the API to get the latest build automatically:

VERSION="1.21.4"
BUILD=$(curl -s "https://api.papermc.io/v2/projects/paper/versions/${VERSION}/builds" \
  | python3 -c "import sys,json; builds=json.load(sys.stdin)['builds']; print(builds[-1]['build'])")
wget "https://api.papermc.io/v2/projects/paper/versions/${VERSION}/builds/${BUILD}/downloads/paper-${VERSION}-${BUILD}.jar" \
  -O paper.jar
echo "Downloaded Paper ${VERSION} build ${BUILD}"

Accept the EULA and create the start script

echo "eula=true" > eula.txt

nano /home/minecraft/start.sh
#!/bin/bash
cd /home/minecraft/server
exec java -Xms2G -Xmx4G \
  -XX:+UseG1GC \
  -XX:+ParallelRefProcEnabled \
  -XX:MaxGCPauseMillis=200 \
  -XX:+UnlockExperimentalVMOptions \
  -XX:+DisableExplicitGC \
  -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
chmod +x /home/minecraft/start.sh

These JVM flags (Aikar's flags) are optimized for Minecraft's garbage collection pattern.


Run as systemd service

exit
sudo nano /etc/systemd/system/minecraft.service
[Unit]
Description=Minecraft Paper Server
After=network.target

[Service]
Type=simple
User=minecraft
WorkingDirectory=/home/minecraft/server
ExecStart=/home/minecraft/start.sh
ExecStop=/usr/bin/screen -S minecraft -X stuff "stop\n"
Restart=on-failure
RestartSec=10s

[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable minecraft
sudo systemctl start minecraft
sudo systemctl status minecraft

Firewall

sudo ufw allow 25565/tcp

Install plugins

Plugins go in /home/minecraft/server/plugins/. Download .jar files from:

  • Hangar, official Paper plugin repository
  • Modrinth, modern plugin platform
  • SpigotMC, large legacy plugin library
# Example: download EssentialsX
wget https://github.com/EssentialsX/Essentials/releases/download/2.20.1/EssentialsX-2.20.1.jar \
  -P /home/minecraft/server/plugins/

# Restart to load
sudo systemctl restart minecraft

Plugins are loaded on server start. To reload without restart (if the plugin supports it):

/reload confirm   # in-game or via console

Essential plugins

PluginPurposeDownload
EssentialsXCore commands (spawn, home, warp, kits)Hangar
EssentialsX ChatChat formattingHangar
LuckPermsPermission managementHangar
WorldEditIn-game world editingModrinth
WorldGuardRegion protectionModrinth
VaultEconomy/permissions APISpigotMC
GriefPreventionLand claiming systemHangar
CoreProtectBlock logging/rollbackHangar

Server console via screen

# Attach to server console
sudo -u minecraft screen -r minecraft

# Detach without stopping: Ctrl+A, then D

Or use the systemctl journal:

journalctl -u minecraft -f

Install Purpur instead of Paper

Purpur is a drop-in replacement for Paper:

# Download Purpur (same version as your world)
VERSION="1.21.4"
wget "https://api.purpurmc.org/v2/purpur/${VERSION}/latest/download" \
  -O purpur.jar

Replace paper.jar with purpur.jar in your start script.


Server update

sudo systemctl stop minecraft

# Download new paper.jar
sudo -u minecraft wget https://... -O /home/minecraft/server/paper.jar

sudo systemctl start minecraft

Always back up your world before updating:

sudo tar -czf /backup/minecraft-$(date +%F).tar.gz /home/minecraft/server/

On this page