Before You Begin
- Install Docker Desktop if you don’t already have it.
- Decide if your server will be local only or public with a domain.
- A domain makes connecting easier. Providers like Porkbun sell domains for $1–10/year.
Part 1: Base Server Setup
- Get the files: Download the preferred version from Releases and then extract the files to your preferred storage location.
- Accept the EULA:
- Navigate to
./minecraft-docker/server/ - Open
eula.txt - Change
eula=false→eula=true
- Navigate to
- Configure the server: Edit
server.properties. By default, whitelist is enabled (recommended). - Choose server version: Replace
server.jarin./minecraft-docker/build/to use another version (e.g., Paper). - Adjust memory (optional):
- Edit
./minecraft-docker/Dockerfile - Key arguments:
-Xms2G→ Minimum RAM-Xmx8G→ Maximum RAM
- Edit
- Start the server:
docker compose up - Whitelist players:
docker attach minecraft whitelist add <minecraft_username> - Test locally: Launch Minecraft and connect to
localhost.
Part 2: Domain + Port Forwarding (Optional)
- Find your public IP: Visit whatsmyip.com.
- Set up DNS:
- Create an A record (e.g.,
play.yourdomain.com) - Point it to your public IP
- Use port
25565
- Create an A record (e.g.,
- Allow firewall traffic (Windows):
- Open Windows Defender Firewall
- Create a new Inbound Rule for TCP port
25565
- Port forward on your router: Forward TCP
25565to your server’s local IP. - Test external access:
- Other computers connect with
play.yourdomain.com - Host machine connects with
localhost
- Other computers connect with
✅ At this point, your server should be running and accessible both locally and (if configured) via your domain.