This project runs a Minecraft Java server with Docker.
The stack in docker-compose.yml starts three services:
minecraft-paper: the game server (itzg/minecraft-server)websockify: TCP-to-WebSocket bridgenginx: HTTP endpoint for the tunnel (/minecraft-tunnel)
Current game settings in Compose:
- Server type: Paper
- Version:
1.21.11 - Memory:
4G - Server port:
25575 - Online mode:
FALSE
This setup is Java Edition only.
docker-compose.yml: service definitionsnginx.conf: tunnel proxy configurationminecraft_data/: world data, server properties, plugins, logs
From this folder, run:
docker compose up -d --force-recreateStop everything:
docker compose downSee container state:
docker compose psSee server logs:
docker compose logs -f minecraft-paperYou should eventually see:
Done (...s)! For help, type "help"
Use this server address in the game client:
127.0.0.1:25575
For another device on your home network, use your PC LAN IP:
<your-lan-ip>:25575
Run websocat in a separate terminal:
websocat.exe -b -E tcp-l:127.0.0.1:25576 ws://127.0.0.1:80/minecraft-tunnelThen connect Minecraft Java to:
127.0.0.1:25576
Important notes:
- Do not use
ws://0.0.0.0:80/...as a destination. 0.0.0.0is for listening, not dialing.- Do not bind
websocatto25575because Docker already uses that port.
If the game client cannot connect:
-
Check containers:
docker compose ps
minecraft-papershould becomehealthy. -
Check listening ports on Windows:
Test-NetConnection -ComputerName 127.0.0.1 -Port 25575 Test-NetConnection -ComputerName 127.0.0.1 -Port 80
-
If using
websocat, also check:Test-NetConnection -ComputerName 127.0.0.1 -Port 25576
-
Review logs for startup errors:
docker compose logs --tail 200 minecraft-paper nginx websockify
- World and server files are stored in
minecraft_data/. - Plugins are loaded from
minecraft_data/plugins/. - Geyser and Floodgate were removed from this setup.