CRAFTUTILS

Start File Generator

Generate a start.bat or start.sh for your Minecraft server with optimised JVM flags.

start.bat

@echo off
:start
java -Xms4096M -Xmx4096M --add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 +PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar paper.jar nogui
echo Server stopped. Restarting in 5 seconds...
timeout /t 5
goto start
Copied!
How it works — examples & FAQ

What is a start file?

A start file (start.bat on Windows, start.sh on Linux/macOS) is the script that launches your Minecraft server. It tells Java how much memory to allocate and which performance flags to use.

JVM flag presets

  • Aikar’s flags— the most widely used optimisation set for Minecraft servers. Tuned G1GC settings that reduce lag spikes and improve garbage collection. Recommended for most servers.
  • GraalVM optimised— designed for servers running on GraalVM instead of HotSpot. Enables the JVMCI compiler for better peak performance.
  • Basic— just sets the memory allocation. Useful when you want full control over flags yourself.

FAQ

How much RAM should I allocate?

For a small server (1–5 players), 4–6 GB is typical. Larger servers with many plugins may need 8–12 GB. Don’t allocate more than your machine has free — leaving room for the OS matters.

Should I enable the GUI?

The server GUI shows a basic console and player list. Most people run servers headless (GUI off) and use the terminal or RCON instead.

What does auto-restart do?

The script loops so if the server crashes or you type /stop, it waits 5 seconds then starts again. Disable it if you want the server to stay stopped after /stop.