serv CLI, the startup scripts, and the Minecraft server jar itself.
PopLock requires Java to run the Minecraft server. Install it before starting:PaperMC 1.21.4 requires Java 21. Check
java -version to confirm.Prerequisites
Install the system packages that PopLock’s scripts depend on:| Package | Purpose |
|---|---|
tmux | Runs the Minecraft server in a persistent background session |
jq | Parses JSON for version checks and the API |
curl | Downloads server jars and checks for updates |
unzip | Reads version info embedded inside the server jar |
Installation
Create the server directory
Create the directory that will hold all server files and give your user ownership of it:The full directory structure after setup will look like this:
Install serv and snapshot.sh
Copy both management scripts to
/usr/local/bin/ and mark them executable:serv is the primary command you’ll use to control the server. snapshot.sh is the automated daily backup script, typically run by cron.Install start.sh and log4j2.xml
Copy the startup loop and the Log4j configuration into the server directory:
start.sh contains the server launch loop with automatic restart logic. log4j2.xml suppresses noisy console output from server commands.Download server.jar
Get the latest PaperMC build for your target Minecraft version. Replace The file must be named exactly
BUILDNUM with the current build number, which you can find on papermc.io/downloads:server.jar.After initial setup, you can run
serv update at any time to automatically pull and apply the latest PaperMC build for your current Minecraft version.Accept the EULA
Mojang requires you to accept the Minecraft End User License Agreement before the server will start:
Next steps
Your server is running. Here are a few things to set up next:REST API
Install the lightweight Node.js HTTP API so you can manage the server remotely — including from Discord via n8n.
Resource pack
Install the PopLock custom textures and redesigned UI for all Java Edition players.
Automated snapshots
Set up the nightly cron job that takes automated daily snapshots with in-game countdown warnings.
serv commands
Full reference for every serv subcommand — backup, restore, update, and more.