Skip to main content

Prerequisites

Install the required system packages before proceeding:
sudo apt install tmux jq curl unzip

Directory structure

All server files live under a single root directory:
/usr/local/games/minecraft_server/java/
├── server.jar
├── start.sh
├── log4j2.xml
├── server.properties
├── whitelist.json
├── world/
│   └── datapacks/
│       └── poplock_datapack.zip
└── backups/
    ├── jars/
    ├── snapshot_YYYYMMDD_HHMMSS.tar.gz
    └── minecraft_backup_YYYYMMDD_HHMMSS.tar.gz

Installation steps

1

Create the server directory

Create the directory tree and take ownership of it:
sudo mkdir -p /usr/local/games/minecraft_server/java
sudo chown -R $USER:$USER /usr/local/games/minecraft_server/java
2

Install serv

Copy the serv CLI to /usr/local/bin and make it executable:
sudo cp serv /usr/local/bin/serv
sudo chmod +x /usr/local/bin/serv
3

Install snapshot.sh

Copy the snapshot script to /usr/local/bin and make it executable:
sudo cp snapshot.sh /usr/local/bin/snapshot.sh
sudo chmod +x /usr/local/bin/snapshot.sh
4

Install start.sh

Copy the startup loop script into the server directory and make it executable:
cp start.sh /usr/local/games/minecraft_server/java/start.sh
chmod +x /usr/local/games/minecraft_server/java/start.sh
5

Install log4j2.xml

Copy the log4j configuration file into the server directory. This suppresses noisy console output:
cp log4j2.xml /usr/local/games/minecraft_server/java/log4j2.xml
6

Place server.jar

Drop your PaperMC or Vanilla server.jar into the server directory. The file must be named exactly server.jar.To download the latest PaperMC build directly:
# Replace 1.21.4 and BUILDNUM with current values from https://papermc.io/downloads
curl -o /usr/local/games/minecraft_server/java/server.jar \
  "https://api.papermc.io/v2/projects/paper/versions/1.21.4/builds/BUILDNUM/downloads/paper-1.21.4-BUILDNUM.jar"
Alternatively, use serv update after completing the rest of this guide to pull the latest build automatically.
7

Accept the EULA

Minecraft requires you to accept the end-user license agreement before the server will start:
echo "eula=true" > /usr/local/games/minecraft_server/java/eula.txt
8

Install the alert datapack

The PopLock datapack provides the in-game alert sound used by the snapshot countdown. Download it directly into the datapacks directory:
sudo wget -O /usr/local/games/minecraft_server/java/world/datapacks/poplock_datapack.zip \
  https://github.com/Scyne/PopLockRP/raw/refs/heads/main/poplock_datapack.zip
The world/datapacks/ directory is created by the server on its first run. If you are installing the datapack before the first launch, create the directory manually first:
mkdir -p /usr/local/games/minecraft_server/java/world/datapacks
Once the server is running, activate the datapack once from the console:
datapack enable "file/poplock_datapack.zip"
It will load automatically on every subsequent restart.

Next steps

With installation complete, set up the automated daily snapshot cron job so worlds are backed up every night — see Snapshot & Cron.