Skip to content
This repository has been archived by the owner on Apr 28, 2024. It is now read-only.

dockcenter/paper

Repository files navigation

PaperMC Automatically Built Docker Image

Watch paper release GitHub

This is a PaperMC docker image with optimized flag provided by official docs.

We use GitHub Actions to track PaperMC builds and automatically build Docker image.

What is PaperMC?

Paper is a high performance fork of the Spigot Minecraft Server that aims to fix gameplay and mechanics inconsistencies as well as to improve performance. Paper contains numerous features, bug fixes, exploit preventions and major performance improvements not found in Spigot.

For more information, please reach to PaperMC official documentation.

PaperMC

How to use this image

Start a PaperMC server

With this image, you can create a new PaperMC Minecraft server with one command (note that running said command indicates agreement to the Minecraft EULA). Here is an example:

sudo docker run -p 25565:25565 dockcenter/paper

While this command will work just fine in many cases, it is only the bare minimum required to start a functional server and can be vastly improved by specifying some options.

How to extend this image

There are many ways to extend the dockcenter/paper image. Without trying to support every possible use case, here are just a few that we have found useful.

Environment Variables

The dockcenter/paper image uses several environment variables which are easy to miss. JAVA_MEMORY environment variable is not required, but it is highly recommended to set an appropriate value according to your usage.

JAVA_MEMORY

This variable is not required, but is highly recommended. By setting this value, you set the java -Xms and Xmx flag. For more information about JVM memory size, refer to this Oracle guide.

Default: 6G

JAVA_FLAGS

This optional environment variable is used in conjunction with JAVA_MEMORY to provide additional java flag. We use PaperMC officially recommended value as the default value.

Default: -XX:+UseStringDeduplication -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -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 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true"

Volume

The server data is stored in /data folder, and we create a volume for you. To use your host directory to store data, please mount volume by adding the following options:

Using volume:

-v <my_volume_name>:/data

Using bind mount:

-v </path/to/folders>:/data

LICENSE

Be careful using this container image as you must meet the obligations and conditions of the Minecraft EULA as not doing so will be subject you or your organization to penalty under US Federal and International copyright law.

The code for the project that builds the dockcenter/paper image and pushes it to Docker Hub is distributed under the MIT License.

Please, don't confuse the two licenses.