A Docker-based Paper Minecraft server setup for version 1.21.4, based on the sems/minecraft-paper-server repository.
Before you begin, make sure you have Docker installed:
- 1.21.4 (214)
- 1.21.3 (82)
- 1.21.1 (132)
- 1.21 (130)
- 1.20.6 (151)
- 1.20.5 (22)
- 1.20.4 (499)
- 1.20.2 (318)
- 1.20.1 (196)
- 1.20 (17)
- 1.19.4 (550)
- 1.19.3 (448)
- 1.19.2 (307)
- 1.19.1 (111)
- 1.19 (81)
| Environment Variable | Description | Default Value | Required |
|---|---|---|---|
MINECRAFT_VERSION |
Minecraft version to use | 1.21.4 | No |
ACCEPT_EULA |
Accept Minecraft EULA (set to "true" if you accept them) | false | Yes |
MEMORY |
Memory allocation for the server | 2G | No |
OP_USERNAME |
Username for the first server operator | - | No |
OP_UUID |
UUID of the first server operator | - | No |
docker build -t minecraft-paper-server .Basic usage (you must accept the EULA):
docker run -d -p 25565:25565 -p 8123:8123 --name minecraft-paper-server -e ACCEPT_EULA=true minecraft-paper-serverWith custom memory allocation:
docker run -d -p 25565:25565 -p 8123:8123 --name minecraft-paper-server -e ACCEPT_EULA=true -e MEMORY=4G minecraft-paper-serverWith a different Minecraft version:
docker run -d -p 25565:25565 -p 8123:8123 --name minecraft-paper-server -e ACCEPT_EULA=true -e MINECRAFT_VERSION=1.21.3 minecraft-paper-serverWith server operator setup (get your UUID from mcuuid.net):
docker run -d -p 25565:25565 -p 8123:8123 --name minecraft-paper-server -e ACCEPT_EULA=true -e MEMORY=4G -e OP_USERNAME=YourUsername -e OP_UUID=your-uuid-here minecraft-paper-serverCreate a docker-compose.yml file:
version: '3.8'
services:
minecraft:
build: .
container_name: minecraft-paper-server
ports:
- "25565:25565"
- "8123:8123"
environment:
- ACCEPT_EULA=true
- MINECRAFT_VERSION=1.21.4
- MEMORY=4G
- OP_USERNAME=YourUsername
- OP_UUID=your-uuid-here
volumes:
- ./world:/minecraft/world
- ./plugins:/minecraft/plugins
- ./logs:/minecraft/logs
restart: unless-stoppedThen run:
docker-compose up -d- Open your Minecraft client (version 1.21.4)
- Go to Multiplayer
- Add server with address:
localhost:25565(or your server's IP address) - Connect and enjoy!
If you have Dynmap plugin installed, access it at: http://localhost:8123
docker logs minecraft-paper-serverdocker stop minecraft-paper-serverdocker start minecraft-paper-serverdocker rm minecraft-paper-serverdocker attach minecraft-paper-server(Press Ctrl+P then Ctrl+Q to detach without stopping the server)
Place plugin JAR files in the plugins/ directory before building the Docker image, or mount a volume to the plugins directory when running the container.
- Server settings: Edit
server.propertiesfile in the data directory - Dynmap settings: Edit
dynmap_config.txtfile in theminecraft/plugins/Dynmapdirectory
- Paper Server: High-performance Minecraft server software
- Phantom Spawning Disabled: By default, Phantoms are disabled (
/gamerule doInsomnia false) - Easy Version Management: Switch between Minecraft versions using environment variables
- Docker-based: Portable and easy to deploy
Based on the excellent work by sems/minecraft-paper-server
This project follows the same license as the original repository.