
This tool generates a ready-to-use start.bat (Windows) or start.sh (Linux/macOS) script for your Java Edition Minecraft server. Choose your operating system, memory allocation, Java version, and garbage collection flags to build a launch file with optional auto-restart.
Loading the tool…
Running a Minecraft server on a VPS, dedicated machine, or home computer requires a startup script to launch the server JAR with the right Java arguments. This generator builds scripts with the following options:
start.bat file for Windows (with an optional pause at the end) or a start.sh file for Linux and macOS.-Xms) and maximum (-Xmx) heap size to the exact same value to prevent memory resizing pauses during gameplay.nogui flag to disable the default graphical window and save system resources.Java garbage collection (GC) manages how your server frees up unused memory. While Minecraft server performance depends mostly on single-thread CPU speed, poor GC settings can cause noticeable lag spikes when memory is cleared.
Aikar Flags (G1GC): This is a widely used set of G1GC JVM flags for Paper servers, and it can also be used with Purpur, Spigot, Fabric, Quilt, Forge, or NeoForge. The generator automatically adjusts the G1GC tuning values based on your RAM size:
G1NewSizePercent=30, G1MaxNewSizePercent=40, G1HeapRegionSize=8M, G1ReservePercent=20, and InitiatingHeapOccupancyPercent=15.G1NewSizePercent=40, G1MaxNewSizePercent=50, G1HeapRegionSize=16M, G1ReservePercent=15, and InitiatingHeapOccupancyPercent=20.ZGC (Java 21+): Available when selecting Java 21 or Java 25. If you choose Java 21, the generator adds -XX:+ZGenerational (which is only added on Java 21). You can also select None if you prefer to run the server without extra garbage collection flags.
Your server needs enough RAM for loaded chunks, active players, plugins, and mods. However, you should not assign all of your machine's memory to the Java process. On a VPS, leave about 1 to 1.5 GB of RAM for the operating system so the system does not run out of memory.
Before running your new start script for the first time, remember these basic setup steps:
start.bat or start.sh in the same folder as your server JAR file.eula.txt and setting eula=true.25565 (or use a tunnel like playit.gg if hosting at home without port forwarding).Setting the initial heap size (-Xms) and maximum heap size (-Xmx) to the same amount claims all designated RAM at startup. This prevents the Java Virtual Machine from pausing the server to request more memory from the operating system while players are online.
On a VPS, you should leave about 1 to 1.5 GB of RAM for the operating system instead of assigning all available memory to the Minecraft server.
At 12 GB or more, Aikar flags switch to larger-heap values: G1NewSizePercent 40 (up from 30), G1MaxNewSizePercent 50 (up from 40), G1HeapRegionSize 16M (up from 8M), G1ReservePercent 15 (down from 20), and InitiatingHeapOccupancyPercent 20 (up from 15).
You need a start.bat (Windows) or start.sh (Linux/macOS) script when hosting a server yourself on a home computer, VPS, or dedicated server where you have root or terminal access and manage the files directly.