LinuxCommandLibrary

papermc

Run PaperMC Minecraft server

TLDR

Start a server

$ papermc start
copy

Stop a server
$ papermc stop
copy

Restart a server
$ papermc restart
copy

Backup a world
$ papermc backup
copy

Restore world data from a backup
$ papermc restore [path/to/filename]
copy

Display help
$ papermc
copy

SYNOPSIS

PaperMC is a Java application and is not a native Linux command. It is executed via the Java Virtual Machine.

java -Xmx<memory>G -jar paper.jar [server_arguments...]

Where:
<memory>: The maximum amount of RAM (e.g., 2, 4, 8) in gigabytes to allocate to the server. Use 'M' for megabytes.
paper.jar: The actual filename of your downloaded PaperMC JAR file (e.g., paper-1.20.4-500.jar).
[server_arguments...]: Optional arguments passed directly to the Minecraft server (e.g., --nogui, --world).

PARAMETERS

-Xmx<size>
    Sets the maximum heap size for the JVM. Essential for allocating sufficient RAM to the Minecraft server (e.g., -Xmx4G for 4 Gigabytes).

-Xms<size>
    Sets the initial heap size for the JVM. Often set to the same value as -Xmx for consistent performance (e.g., -Xms4G).

-jar <filename>
    Specifies the JAR file to be executed (e.g., paper.jar).

--nogui
    (Minecraft server argument) Prevents the server from launching a graphical user interface (GUI) window, which is standard for headless Linux server environments.

--world <world_name>
    (Minecraft server argument) Specifies the name of the world folder to load if different from the default "world".

--port <port_number>
    (Minecraft server argument) Sets the network port the server will listen on (default is 25565).

-DIpaper.nogui=true
    (JVM property) Can be used to prevent the GUI from launching, similar to --nogui.

DESCRIPTION

PaperMC is a highly optimized, open-source Minecraft server fork based on Spigot and CraftBukkit. It aims to significantly improve server performance, stability, and provide additional features not available in vanilla Minecraft or its predecessors. While not a standalone Linux command, PaperMC is executed as a Java Archive (JAR) file using the Java Virtual Machine (JVM). Server administrators typically download the paper.jar file and run it using the java -jar command, specifying memory allocation and other JVM arguments. It's widely used for hosting large-scale Minecraft servers due to its efficiency and extensive configuration options, making it a popular choice for enhancing the multiplayer experience.

CAVEATS

Java Runtime Environment (JRE) Required: PaperMC requires a compatible Java JRE or JDK to be installed on the system (typically Java 17 or newer for recent Minecraft versions).
Not a Native Command: PaperMC is a Java application, not a standalone Linux executable. It is run using the java command.
Memory Allocation: Proper memory allocation using -Xmx is crucial for server performance and stability; insufficient RAM will lead to crashes or lag.
EULA Agreement: Upon first execution, Minecraft servers (including PaperMC) require acceptance of the Minecraft End User License Agreement (EULA). This creates an eula.txt file that must be manually changed from eula=false to eula=true.
Resource Intensive: Running a Minecraft server, especially with many players or complex plugins, can be resource-intensive, requiring adequate CPU, RAM, and disk I/O.

<I>FIRST RUN AND EULA ACCEPTANCE</I>

The first time you attempt to run a PaperMC server, it will generate several configuration files and an eula.txt file. The server will not fully start until you open eula.txt and change the line eula=false to eula=true, signifying your agreement to Minecraft's End User License Agreement.

<I>OPTIMAL MEMORY ALLOCATION</I>

It's crucial to allocate sufficient but not excessive memory to your PaperMC server using the -Xmx and -Xms JVM arguments. Allocating too little memory will result in lag and crashes, while allocating too much can lead to inefficient garbage collection and potential performance issues or "swap thrashing" if it exceeds physical RAM. A good starting point for a small server might be -Xmx2G to -Xmx4G.

<I>UPDATING PAPERMC</I>

To update your PaperMC server, you typically download the latest paper.jar file from the official PaperMC website and replace the old one. It's recommended to stop the server before replacing the JAR and to back up your server files regularly. Configuration files like server.properties and paper.yml are usually preserved across updates.

HISTORY

PaperMC originated as a fork of the Spigot Minecraft server software, which itself was built upon CraftBukkit. The project began with a strong focus on optimizing server performance, specifically addressing issues like tick lag and general server overhead common in large-scale Minecraft deployments. Over time, PaperMC introduced numerous significant architectural changes and new features, establishing itself as a leading server software due to its superior efficiency, stability, and extensive configuration options compared to its predecessors. Its development continues to be community-driven, adapting rapidly to new Minecraft versions and community needs.

SEE ALSO

java(1), screen(1), tmux(1), systemctl(1)

Copied to clipboard