Skip to content

lubocode/minecraft-server-hibernation

 
 

Repository files navigation

Minecraft Server Hibernation

mvsh - logo

Go script originally written by gekigek99
Modified for docker usage by lubocode

This image does NOT contain a minecraft server installation.
Please insert your minecraft server files into the associated volume. Your minecraft server file should lie in the top level of the volume and should be named minecraft_server.jar
If you want to deviate from this, use the arguments specified below. Similarly, if you want to change the amount of RAM for your MC server, have a look at the arguments as well.

The script operates on port 25555 inside the Docker and passes traffic through to 25565 for the MC server, which is MCs standard port.
Map the internal port to whatever external port fits you. 25565 would save you the hassle of having to specify a port in the MC client server settings.

Usage example:

docker run \
    -p 25555:25555 \
    -v /absolute/path/to/mc/folder:/minecraftserver:rw \
    -e minRAM=512M \
    -e maxRAM=2G \
    -e mcPath=/minecraftserver/ \
    -e mcFile=minecraft_server.jar \
    minecraftserver-hibernate

The volume name inside the container corresponds to the mcPath string.

Please report bugs here
As there are only two people working on the script and only me on the docker implementation, we may miss some bugs from time to time and appreciate all help.

Languages

  • Go 95.1%
  • Dockerfile 4.9%