ESN Docs

Docs › Minecraft

Minecraft startup flags generator (Aikar's flags)

3 min readUpdated Nov 3, 2026

Set your RAM and jar name and copy a Java start command with Aikar's flags, plus ready start.sh and start.bat files.

Make a Java start command for your Minecraft server with the right memory settings and Aikar's flags, a set of garbage-collection settings written by Aikar (of the Empire Minecraft server) and recommended by the PaperMC team. They make Java clean up memory in smaller, more regular steps, which cuts the lag spikes you get from long pauses.

What the flags do #

  • -Xms and -Xmx set the starting and maximum heap. Aikar's advice is to make them the same, so Java grabs its memory once.
  • -XX:+UseG1GC picks the G1 garbage collector, and the G1… settings tune it for Minecraft, which makes lots of short-lived objects.
  • -XX:MaxGCPauseMillis=200 asks for pauses under 200 ms, so cleanups don't freeze the game.
  • -XX:+AlwaysPreTouch reserves the memory at start-up, so it's slower to boot but steadier while running.

Credit: these flags are Aikar's flags, published by Aikar and kept in PaperMC's documentation. The proxy option is the set PaperMC recommends for Velocity.

On ESN #

On ESN the panel starts your server for you and sets its memory from your plan, so you don't need a start.sh. Use this on your own PC or VPS, or ask in our Discord about custom startup flags. Not sure how much memory to give it? Try the RAM calculator.

Rather skip the setup? ESN runs Paper, Purpur, Fabric, Forge and Bedrock servers for you, online 24/7. See plans · Setup guide

More Minecraft tools: RAM calculator · server.properties · Startup flags · MOTD · Status banner · Icon maker · All tools

Still stuck? Use the live chat on the panel or ask in the ESN Systems Discord. Last updated November 3, 2026.