Start A PaperMC Minecraft Server In Docker Or Podman Container


If you want to start a PaperMC Minecraft server inside a Docker or Podman container, this is for you.


Before We Start


I’m going to be using Linux, I’m also going to be using the terminal, You can still follow along if you use a GUI and Windows or MacOS, use your brain and connect the dots.

Docker and Podman are 1:1 there will be no difference in how the server performs, but Podman is easier to work with.

If you are using Podman, replace “docker” with “podman” in commands.

When using Docker, I recommend using the official installation guide from Docker. Podman users usually have it pre-installed or can download it from their Linux distribution’s repo.

The PaperMC Docker Image


Download the PaperMC Docker Image

I’m using marctv’s PaperMC Docker image because it’s “Sponsored OSS” and updates frequently.

Open your terminal and run docker pull marctv/minecraft-papermc-server:latest.

Setting Up The PaperMC Docker Image

Create a folder for PaperMC, if you’re using Linux, in terminal run mkdir ~/.PaperMC.

In terminal, run the commands one by one, changing or removing them specific to your setup, otherwise the server might not work.

docker run \
--restart unless-stopped \ # If You Are Doing a 24/7 Server Use This Line, Otherwise Don't Add It.
--name NAMEHERE \ # Name Your Server Here.
-e MEMORYSIZE='1G' \ # Set The Amount Of Ram Dedicated To Your Server.
-e JAVAFLAGS='' \ # If You Need Any Java Flags Use This, Otherwise Don't Add This Line. The default flags are Aikar's flags.
-v ~/.PaperMC:/data:rw \ # Use If Non SELinux Distribution or Windows/MacOS.
-v ~/.PaperMC:/data:Z \ # Use with SELinux Enabled, Don't Use The One Above.
-p 25565:25565 \ # This Is Port If Using Non Default Edit Here If Need More Than One Add More "-p" Lines With Port.
-i marctv/minecraft-papermc-server:latest

Press enter, then the server will start.

Updating The Server

Updating the server is simple, stop the running container by running in terminal docker stop (The Name You Gave Your Server) afterwards run docker pull marctv/minecraft-papermc-server:latest once it starts, it’ll be updated.

Installing Plugins


After you downloaded the plugins in the terminal, run mv /location/of/plugin ~/.PaperMC/plugins then restart the container, then you are good to go.

My Recommendations


If you aren’t planning to run the server 24/7 you should install a Docker/Podman GUI, it makes maintenance and updates much easier.

Docker users, I recommend you install Docker Desktop.

Podman users, I recommend Podman Desktop.

Also, If by chance you use Podman and Flatpak, I recommend installing Pods from Flathub.

Congratulations! Now you have a fully working PaperMC Minecraft server.

Leave a Comment

Your email address will not be published. Required fields are marked *