Skip to content

Latest commit

Β 

History

54 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐳 mc-server

Minecraft servers in Docker

Docker Pulls Docker Stars GitHub Issues

  • Prebuilt Docker images for multiple Minecraft versions
  • Minimal Docker Compose setup
  • Quick startup and ready-to-play

Tip

When creating your Docker Compose or starting the server, use a supported version as the image tag. Like myferr/mc-server:1.21.6, myferr/mc-server:1.20.6, myferr/mc-server:1.19.4, etc.

Quick Start

Pull & Run with Docker

docker run -d -p 25565:25565 -e EULA=TRUE --name mc-server myferr/mc-server:1.21.6

Set EULA to TRUE to agree to Minecraft's EULA. Required for running the server.

Minimal Docker Compose

services:
  mc-server:
    image: myferr/mc-server:1.21.6
    container_name: mc-server
    ports:
      - "25565:25565"

Start the server:

docker compose up -d

Configuration

You can configure the Minecraft server through environment variables in either docker run or docker-compose.yml.

Supported Variables

Variable Values (examples) Default Description
DIFFICULTY peaceful, easy, normal, hard easy Sets the difficulty level of the world.
MOTD Any string (e.g. "Hello World!") "Welcome to my server!" Message shown in the server list (supports formatting codes).
GAMEMODE survival, creative, adventure, spectator survival Sets the default gamemode for new players.
HARDCORE true, false false Enables or disables hardcore mode.

Server icons

A Minecraft server icon is a visual representation of the game's logo or a custom design that can be used to identify the server in the server list, to apply the logo to the server just by placing it in the server-icon.png file in the server directory. Make sure it's a .png and a 64x64 pixel size.

To apply a server icon in your Docker Compose add the following lines:

volumes:
  - ~/desktop/server-icon.png:/server/server-icon.png

Full example:

services:
  mc-server:
    image: myferr/mc-server
    container_name: mc-server
    ports:
      - "25565:25565"
    volumes:
      - ~/desktop/server-icon.png:/server/server-icon.png

Docker Run

docker run -d -p 25565:25565 \
  -e MOTD="Welcome to my server!" \
  -e DIFFICULTY=normal \
  -e GAMEMODE=survival \
  -e HARDCORE=false \
  myferr/mc-server:latest

Docker Compose

services:
  mc-server:
    image: myferr/mc-server:latest
    ports:
      - "25565:25565"
    environment:
      - DIFFICULTY=normal
      - MOTD=Welcome to my server!
      - GAMEMODE=survival
      - HARDCORE=false

Supported Versions

Version Supported?
1.21.11 βœ…
1.21.10 βœ…
1.21.9 βœ…
1.21.8 βœ…
1.21.7 βœ…
1.21.6 βœ…
1.21.5 βœ…
1.21.4 βœ…
1.21.3 βœ…
1.21.2 βœ…
1.21.1 βœ…
1.21 βœ…
1.20.6 βœ…
1.20.5 βœ…
1.20.4 βœ…
1.20.3 βœ…
1.20.2 βœ…
1.20.1 βœ…
1.20 βœ…
1.19.4 βœ…
1.19.3 βœ…
1.19.2 βœ…
1.19.1 βœ…
1.19 βœ…
1.18.2 βœ…
1.18.1 βœ…
1.18 βœ…
1.17.1 βœ…
1.17 βœ…
1.16.5 βœ…
1.16.4 βœ…
1.16.3 βœ…
1.16.2 βœ…
1.16.1 βœ…
1.16 βœ…
1.15.2 βœ…
1.15.1 βœ…
1.15 βœ…
1.14.4 βœ…
1.14.3 βœ…
1.14.2 βœ…
1.14.1 βœ…
1.14 βœ…
1.13.2 βœ…
1.13.1 βœ…
1.13 βœ…
1.12.2 βœ…
1.12.1 βœ…
1.12 βœ…
1.11.2 βœ…
1.11.1 βœ…
1.11 βœ…
1.10.2 βœ…
1.10.1 βœ…
1.10 βœ…
1.9.4 βœ…
1.9.3 βœ…
1.9.2 βœ…
1.9.1 βœ…
1.9 βœ…
1.8.9 βœ…
1.8.8 βœ…
1.8.7 βœ…
1.8.6 βœ…
1.8.5 βœ…
1.8.4 βœ…
1.8.3 βœ…
1.8.2 βœ…
1.8.1 βœ…
1.8 βœ…

License

This project is licensed under the MIT license and is completely open-source.

About

🐳 Minecraft servers in Docker

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Packages

Contributors

Languages