Setting up your MC Server

As of Minecraft snapshot 20W16A minecraft servers now have jmx monitoring enabled. This means that using external programs you can measure the performance of your minecraft server and graph it or use data analytics to generate notifications if performance begins to degrade. This guide assumes you have some idea how to use linux, docker and how to run a minecraft server.

mkdir snapshot
cd snapshot

Now lets run the server really quick to generate the eula and

java -jar server.jar

Now we can agree to the eula.

nano eula.txt

Change false to true and save using ctrl+x and hit y.

Now edit the file


Change enable-jmx-monitoring to true and save.

Setting up

Lets make our

screen -d -m -S "snapshot" java -Xms1G -Xmx6G -jar server.jar

This makes a start script that makes a screen in the backgroud that runs the server. If you don't know about screen read about it here.

My complete looks like most of the extra flags are from Aikar's website which I found through the optimizations guide for servers.


screen -d -m -S "snapshot" java -Xms1G -Xmx6G -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=100 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:G1MixedGCLiveThresholdPercent=35 -XX:+AlwaysPreTouch -XX:+ParallelRefProcEnabled -jar server.jar

Make sure you add run permissions to your before running it.

chmod +x