This is a containerized way to run a Minecraft server securly and always up to date. The Minecraft container runs PaperMC, a Spigot fork with performance improvements.
To start a server with console access, run:
docker run --read-only -p 25565:25565 -v ./minecraft:/minecraft carlgo11/minecraft
To start a server without access to the console, run:
docker run -p 25565:25565 -v ./minecraft:/minecraft -d carlgo11/minecraft
The flag --read-only
can also be added for extra security.
Template compose file:
version: '3.3'
services:
minecraft:
image: carlgo11/minecraft
restart: unless-stopped
read_only: true
stdin_open: true
tty: true
ports:
- '25565:25565'
volumes:
- './minecraft:/minecraft'
tmpfs:
- '/tmp/:exec'
To run the server short term with console access, do:
docker-compose run minecraft
To run the server normally, do:
docker-compose up -d
name | description |
---|---|
MC_VERSION | Desired Minecraft version (+v1.8.8 supported) |