Minecraft Server
Minecraft Java Edition server with RCON support.
Overview
Minecraft Java Edition is the original version of Mojang's legendary sandbox game that revolutionized open-world creativity and multiplayer gaming. First released in 2009, Minecraft allows players to build, explore, and survive in procedurally generated worlds made of blocks, supporting both creative building and survival gameplay modes. The Java Edition remains the most feature-rich version with extensive modding support, regular updates, and the ability to run custom servers with various modifications and plugins.
This Docker stack combines the itzg/minecraft-server image with RCON (Remote Console) capabilities to create a fully-featured multiplayer Minecraft server environment. The itzg image is the most popular containerized Minecraft solution, supporting multiple server types including Vanilla, Paper, Forge, Fabric, and Quilt, while RCON provides remote administration capabilities for server management without requiring in-game access. The configuration enables persistent world storage, memory optimization, and flexible server type switching.
This setup is perfect for families wanting private servers, gaming communities requiring reliable uptime, and developers testing Minecraft mods or plugins. The combination of Docker containerization with the mature itzg image provides stability and easy updates, while RCON support enables automated server management and integration with external tools like Discord bots or web dashboards.
Key Features
- Multi-server type support including Vanilla, Paper, Forge, Fabric, Quilt, and Modpack installations
- RCON protocol integration for remote server administration and command execution
- Automatic Java Edition version management with support for latest, specific, or snapshot builds
- Memory allocation optimization with configurable JVM heap size settings
- Operator permissions system with environment variable configuration for admin users
- Custom MOTD (Message of the Day) display for server branding and information
- Interactive TTY support for direct console access and real-time log monitoring
- Automatic EULA acceptance handling for legal compliance and server startup
Common Use Cases
- 1Private family Minecraft servers with whitelist protection and custom rules
- 2Gaming community hosting with modded content and plugin-based gameplay enhancements
- 3Educational institutions running Minecraft Education Edition alternatives for STEM learning
- 4Content creators and streamers hosting subscriber-only servers for community engagement
- 5Minecraft mod and plugin developers requiring test environments with quick reset capabilities
- 6Home lab enthusiasts running 24/7 servers for friends with automated backups and monitoring
- 7LAN party organizers needing portable server instances with custom maps and game modes
Prerequisites
- Docker Engine 20.10+ and Docker Compose V2 for container orchestration support
- Minimum 3GB RAM available (2GB for Minecraft + 1GB for system overhead)
- Port 25565 available for Minecraft client connections and port 25575 for RCON access
- Valid Minecraft Java Edition account for each player connecting to the server
- Basic understanding of Minecraft server administration and player permission systems
- Sufficient disk space for world data storage (worlds can grow to several GB over time)
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 minecraft: 3 image: itzg/minecraft-server:latest4 container_name: minecraft5 restart: unless-stopped6 ports: 7 - "${MC_PORT:-25565}:25565"8 - "${RCON_PORT:-25575}:25575"9 environment: 10 - EULA=TRUE11 - TYPE=${SERVER_TYPE:-VANILLA}12 - VERSION=${MC_VERSION:-LATEST}13 - MEMORY=${MEMORY:-2G}14 - RCON_PASSWORD=${RCON_PASSWORD:-minecraft}15 - ENABLE_RCON=true16 - OPS=${OPS:-}17 - MOTD=${MOTD:-A Minecraft Server}18 volumes: 19 - minecraft_data:/data20 networks: 21 - minecraft-network22 tty: true23 stdin_open: true2425volumes: 26 minecraft_data: 2728networks: 29 minecraft-network: 30 driver: bridge.env Template
.env
1# Minecraft Server2MC_PORT=255653RCON_PORT=255754SERVER_TYPE=VANILLA5MC_VERSION=LATEST6MEMORY=2G7RCON_PASSWORD=minecraft8OPS=9MOTD=A Minecraft ServerUsage Notes
- 1Server at localhost:25565
- 2RCON at localhost:25575
- 3Set OPS for admin players
- 4Supports Paper, Forge, Fabric, etc.
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 minecraft:5 image: itzg/minecraft-server:latest6 container_name: minecraft7 restart: unless-stopped8 ports:9 - "${MC_PORT:-25565}:25565"10 - "${RCON_PORT:-25575}:25575"11 environment:12 - EULA=TRUE13 - TYPE=${SERVER_TYPE:-VANILLA}14 - VERSION=${MC_VERSION:-LATEST}15 - MEMORY=${MEMORY:-2G}16 - RCON_PASSWORD=${RCON_PASSWORD:-minecraft}17 - ENABLE_RCON=true18 - OPS=${OPS:-}19 - MOTD=${MOTD:-A Minecraft Server}20 volumes:21 - minecraft_data:/data22 networks:23 - minecraft-network24 tty: true25 stdin_open: true2627volumes:28 minecraft_data:2930networks:31 minecraft-network:32 driver: bridge33EOF3435# 2. Create the .env file36cat > .env << 'EOF'37# Minecraft Server38MC_PORT=2556539RCON_PORT=2557540SERVER_TYPE=VANILLA41MC_VERSION=LATEST42MEMORY=2G43RCON_PASSWORD=minecraft44OPS=45MOTD=A Minecraft Server46EOF4748# 3. Start the services49docker compose up -d5051# 4. View logs52docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/minecraft-server/run | bashTroubleshooting
- OutOfMemoryError in logs: Increase MEMORY environment variable value or reduce server view distance and entity limits
- RCON connection refused errors: Verify RCON_PORT is properly forwarded and RCON_PASSWORD matches client configuration
- Players cannot connect to server: Check firewall rules allow port 25565 and verify MC_PORT environment variable matches client settings
- Server stuck on 'Loading libraries' message: Insufficient memory allocation, increase MEMORY value to at least 2G for modded servers
- World corruption after container restart: Ensure proper shutdown using RCON 'stop' command rather than killing container process
- Mod loading failures with Forge/Fabric: Verify VERSION environment variable matches mod compatibility requirements and all dependencies are present
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Ad Space
Shortcuts: C CopyF FavoriteD Download