A quick guide on spinning up a GreedyCraft server in docker with the itzg/docker-minecraft-server container and docker-compose on Linux.
- Download the GreedyCraft server files zip file.
- Extract the files to a temporary folder. We need to make some changes.
run.sh This is the shell file the docker container will expect, if you do not rename the file, the server will fail to start.
- Edit run.sh to include the JVM custom flags. See the
README_SERVER_INSALLATION.txt for more information about this. For example, assuming a 20GB allocation you could use:
java -Xmx20G -Xms20G -Xss4M -Dfile.encoding=GBK -Dsun.rmi.dgc.server.gcInterval=1800000 -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:+AlwaysPreTouch -XX:+UseStringDeduplication -Dfml.ignorePatchDiscrepancies=true -Dfml.ignoreInvalidMinecraftCertificates=true -XX:-OmitStackTraceInFastThrow -XX:+OptimizeStringConcat -XX:+UseAdaptiveGCBoundary -XX:G1HeapRegionSize=32M -jar forge-1.12.2-184.108.40.20655.jar nogui
- Edit the
server.properties files per the
README_SERVER_INSALLATION.txt file. As of this writing, ensure your server.properties has the following lines somewhere in it:
- Re-zip your files. Name the zip file something like greedy.zip. The file structure in this zip should mirror the one you downloaded.
- Copy this zip file wherever you intend your server files to be. For example
- Edit your
docker-compose.yml file and add your configurations. For example, if using 20GB of memory and a data directory of
/var/docker/greedycraft and a customized server zip file at
docker-compose.yml file would look something like (Customize memory and such as needed!):
- If all is well, you should be able to start your server by reloading your compose file by running
docker-compose up -d from the same directory as your
- Monitor your server with
docker logs greedycraft assuming you named the container
greedycraft like in the example above. If you see repeating logs and
docker container ls -a shows your container either restarting or with a short uptime, you may have an issue. Stop the container and review the logs to troubleshoot. If you see
Stopping aura thread for dim xxx however, then you should be good to go! (Assuming no firewall issues and port-forwarding was setup correctly if running across networks, but those are outside the scope of this quick-guide.)
Just a quick post. I ran into an issue updating the MIM Portal. Looking at logs, I found a line reading that a step had failed. The step that failed was just a quick command line run of
net start fimservice. Odd step to fail on right?
After running the updater a few times I figured out the issue. The service just was not starting within the 5 second or so time limit of the
net start command.
Net start returned a non-zero return code and the fim portal service updater treated that as a failure.
The fix is pretty easy though. That
net start command spawns in a new cmd prompt window. When you see it, just highlight a character inside the cmd prompt window and that will freeze the command. Check to ensure the fimservice service is started, then press the “enter” key while in cmd prompt to allow it to continue.
Net start will see the service is running and return zero to the updater and the updater will happily finish up. Just keep in mind, you have to watch out for that cmd prompt, you only have about a 5 second window to catch and pause it!