Server Startup Script Generator
Choose your Java server settings and generate a startup command or script.
Basic settings
JVM Launch Options (Flags)
-XX:+UseG1GC
Uses G1 Garbage Collector. It is the most optimized garbage collector for Minecraft servers.
-XX:+UseZGC
It uses ZGC. Provides very low latencies (Java 15+ required). Do not select at the same time as other GCs.
-XX:+UseShenandoahGC
Shenandoah uses GC. Aims for ultra-low pause times. Do not select at the same time as other GCs.
-XX:+UseParallelGC
Uses Parallel GC for throughput. Select only one garbage collector.
-XX:+ParallelRefProcEnabled
It parallelizes reference processing, reducing GC stalls.
-XX:MaxGCPauseMillis=200
Targets maximum GC pause time at 200ms. Helps prevent lag spikes.
-XX:+UnlockExperimentalVMOptions
Enables the use of experimental VM options (required for some other flags).
-XX:+DisableExplicitGC
Prevents plugins or the system from manually calling GC (ignores System.gc() calls).
-XX:+AlwaysPreTouch
It allocates all RAM from the operating system at startup. Startup is slower, but runtime performance is improved.
-XX:G1NewSizePercent=30
Minimum heap percentage allocated for next generation objects (30%).
-XX:G1MaxNewSizePercent=40
Maximum percentage of heap allocated for new generation objects (40%).
-XX:G1HeapRegionSize=8M
Fixes the heap region size to 8MB.
-XX:G1HeapWastePercent=5
Limits the percentage of wasted heaps to 5%.
-XX:G1MixedGCCountTarget=4
Sets the mixed GC cycle target to 4.
-XX:InitiatingHeapOccupancyPercent=15
When heap occupancy reaches 15%, GC starts marking.
-XX:G1MixedGCLiveThresholdPercent=90
Makes the live object threshold for hybrid GC 90%.
-XX:G1RSetUpdatingPauseTimePercent=5
RSet limits the update time to 5% of the total time.
-XX:SurvivorRatio=32
Adjusts the ratio of Survivor fields.
-XX:+PerfDisableSharedMem
Prevents file system I/O operations from pausing GC (important for Linux/Disk performance).
-XX:MaxTenuringThreshold=1
Sets the threshold for moving objects to the older generation (Old Gen) to 1.
-XX:+UseStringDeduplication
It reduces RAM usage by combining repeated texts (String).
-Dfile.encoding=UTF-8
Sets the character encoding to UTF-8. Solves Turkish character problems.
-Dsun.rmi.dgc.server.gcInterval=2147483646
RMI improves performance by reducing the frequency of garbage collection.
-Dlog4j2.formatMsgNoLookups=true
Protects against Log4j vulnerability (Log4Shell) (for older versions).
-Djava.net.preferIPv4Stack=true
Forces the use of IPv4 instead of IPv6. It can solve connection problems.
-XX:+UseCompressedOops
Compresses memory pointers for less than 32GB of RAM on 64-bit systems (Improves performance).
-XX:TargetSurvivorRatio=90
It makes the target occupancy rate of the Survivor area 90%.
-XX:G1ReservePercent=20
Heap reserves 20% of memory for sudden fills (prevents Out of Memory error).
-Dterminal.ansi=true
Supports color codes (ANSI) in console output.
-Dterminal.jline=false
Closes the advanced console input (JLine). Required for some administration panels.
-XX:+UseLargePages
Uses large memory pages if OS supports it (Improves performance but requires OS tuning).
-XX:+UseNUMA
Optimizes memory management on multiprocessor servers.
-XX:+UseTransparentHugePages
Recommended for using RAM over 128GB (Transparent Huge Pages).
Download the recommended Java version from Amazon Corretto.
Windows (start.bat)
Linux/macOS (start.sh)