Quick reference
| Command | Description |
|---|---|
serv start | Start the server in a background tmux session |
serv stop | Gracefully stop the server |
serv restart | Stop and restart the server |
serv console | Attach to the live server console |
serv status | Show online/offline status, version, uptime, memory, and player count |
serv backup | Take a full manual backup (stops and restarts the server) |
serv backup -s | Silent backup — no output, useful for scripting |
serv restore | Interactive restore menu listing all snapshots, backups, and undo points |
serv update | Check for and apply the latest PaperMC or Vanilla update |
serv chk | Check for available updates without applying them |
serv chk -s | Silent update check — no output if already up to date |
serv start
Starts the server inside a persistent background tmux session.- Checks whether a Java server process is already running. If one is found, it prints a warning and exits.
- Checks whether a tmux session named
minecraftexists without an attached Java process (a zombie session). If found, the zombie is cleaned up before proceeding. - Launches
start.shinside a new detached tmux session. - Waits 3 seconds, then checks whether the process is alive.
serv stop
Sends a gracefulstop command to the server console and waits up to 30 seconds for the process to exit cleanly.
- Creates a
stop_signalfile in the server directory. This tellsstart.shnot to restart the server after it exits. - Sends the
stopcommand to the tmux session. - Polls once per second for up to 30 seconds waiting for the Java process to exit.
- If the process is still alive after 30 seconds, force-kills it with
pkilland destroys the tmux session.
serv restart
Stops the server if running and immediately relaunches it in a new tmux session.- Sends
stopto the server console if a process is detected, waits 10 seconds, then kills the tmux session. - Creates a new detached tmux session running
start.sh.
serv stop, restart does not create a stop_signal file — the startup loop inside start.sh is free to restart on crash as normal.
serv console
Attaches your terminal to the live tmux session so you can read logs and type commands directly into the server console.Ctrl+B, then D.
The session name is minecraft and uses the socket at /tmp/minecraft-tmux. You can also attach manually:
serv status
Prints a summary of the server’s current state.- Online/offline status
- Server version (Paper
MC_VERSION-BUILDor VanillaMC_VERSION, detected from the jar) - Process uptime
- Memory usage (% of system RAM)
- Player count (requires
mcstatus— see below)
mcstatus Python package. If it is not installed:
serv backup
Takes a full backup of the entire server directory as a.tar.gz archive.
- If the server is running, stops it first (using
serv stop). - Creates
backups/minecraft_backup_YYYYMMDD_HHMMSS.tar.gzcontaining the full server directory, excludingbackups/, cache, and build artifacts. - If the server was running before the backup, restarts it automatically.
- If the server was offline when the backup started, it is left offline after the backup completes.
serv restore
Opens an interactive numbered menu listing every available archive inbackups/. Selecting an entry will restore the server to that point in time.
| Type | Filename pattern | Created by | Contains |
|---|---|---|---|
| Daily Snapshot | snapshot_YYYYMMDD_HHMMSS.tar.gz | snapshot.sh (cron) | World directories + whitelist.json + server.properties |
| Full Backup | minecraft_backup_YYYYMMDD_HHMMSS.tar.gz | serv backup | Entire server directory |
| Restore Undo | restore_undo.tar.gz | serv restore | Whatever was replaced in the last restore |
- Stop the server if it is running.
- Create an undo backup (
restore_undo.tar.gz) of whatever files are about to be replaced. - Wipe the target directories to ensure no stale chunk or player files survive.
- Extract the selected archive into the server directory.
- Remove any stale
session.lockfiles from restored world directories. - Restart the server if it was running before the restore.
serv restore again and select Restore Undo.
Example menu output:
serv update
Checks the PaperMC or Mojang API for a newer version of the server jar and, after confirmation, downloads and installs it.- Detects whether the current jar is PaperMC or Vanilla by inspecting
server.jar. - Queries the appropriate API for the latest available version.
- Displays the current version and the latest available version.
- If already up to date, exits immediately.
- If an update is available, shows a summary of the planned actions and prompts for confirmation (
[y/N]). - Stops the server if running.
- Backs up the current
server.jartobackups/jars/. - Downloads the new jar, replacing
server.jar. - If the download fails, restores the backed-up jar automatically.
- Restarts the server.
serv chk
Checks for an available update and prints the result without making any changes. Useful for monitoring or scripting.-s, no output is produced when the server is up to date, making it
suitable for use in cron jobs where you only want output when action is needed.