Sign inSign up

aceheliflyer/papermc

By aceheliflyer

•Updated about 2 months ago

This creates and initiates a PaperMC Minecraft server inside a Docker container.

Image
0

9.0K

aceheliflyer/papermc repository overview

⁠PaperMC Docker

Docker Image Size (tag) Docker Pulls GitHub Last Commit

This creates and initiates a PaperMC Minecraft server inside a Docker container.

This project is a derivative of Phyremaster/papermc-docker⁠.

This project also uses Aikar's flags⁠ by default.

⁠Quick Start

Here's how to get an extremely basic server up and running. To attach to the terminal refer to the following⁠.

docker run \
  -tidv $HOME/minecraft:/home/paper/minecraft \
  -p 25565:25565/tcp \
  --name "PaperMC_Server" \
  aceheliflyer/papermc:latest

Note: The latest tag is built with OpenJDK 25 for newer Minecraft versions. For older versions, use previous LTS tags.

⁠Options

ParameterSuggestedDescription
-itYesCreates an interactive terminal to the container.
-dYesDetaches the server from the terminal to allow it to run in the background.
-v-v $HOME/minecraft:/home/paper/minecraftThe bind mount or volume where you want to store the server files.
-p-p 25565:25565/tcpThe exposed port to allow incoming connections to the server.
--name--name "PaperMC_Server"The name of the container for the server. This can always be changed later.

⁠Environment Variables

ParameterDefaultDescription
MINECRAFT_VERSIONlatestThe specified version of Minecraft that you want.
PAPER_BUILDlatestThe specified build of PaperMC that you want.
MIN_MEMORY512MThe initial starting memory.
MAX_MEMORY1GThe maximum amount of memory the server is allowed to use.
RESTART_ON_CRASHtrueShould the server restart when it crashes.
JAVA_ARGSView Dockerfile⁠The arguments for Java. By default this uses Aikar's flags⁠.

⁠Further Setup & Information

⁠Attach to the Terminal

To attach to the terminal session on the server, you can run docker attach PaperMC_Server. Here you can enter all the commands you need just like any other Minecraft server. To exit the terminal without closing the server, use the keybind Ctrl+P & Ctrl+Q.

If for whatever reason you need to access the shell of the container, you can use docker exec -it PaperMC_Server ash. To exit simply type exit (although if you're accessing the shell, you probably know what you're doing).

⁠Open More Ports (For RCON, Dynmap, etc.)

For this example, we'll be opening ports for RCON. Delete your container with docker container rm PaperMC_Server. Your server files will not be deleted since they are saved inside of a volume or a bind-mount depending on what you specified previously. Re-run the command you used to create your server but add -p 25575:25575/tcp to it. Ideally the first number (the exposed host port) can be set to whatever you want, such as -p 6789:25565/tcp. This also applies if you're trying to add a plugin that requires an open port such as Dynmap or if you simply want to run your server on a port other than 25565.

Here's an example with open ports for RCON & Dynmap:

docker run \
  -tidv $HOME/minecraft:/home/paper/minecraft \
  -p 25565:25565/tcp \ # Default Minecraft Port
  -p 25575:25575/tcp \ # The default RCON Port
  -p 8123:8123/tcp \ # The Default Dynmap Port
  --name "PaperMC_Server" \
  aceheliflyer/papermc:latest

Tag summary

Content type

Image

Digest

sha256:328120bdb…

Size

83.1 MB

Last updated

about 2 months ago

docker pull aceheliflyer/papermc