Minecraft server JVM flags generator
Pick how much RAM your server gets and what kind of server it is, and get the widely used Aikar's flags in the right format: a user_jvm_args.txt for modpacks, or a start script for Paper and vanilla.
user_jvm_args.txt
How much RAM?
- Vanilla / Paper, a few friends: 4–6 GB. More doesn't make it faster.
- Big modpacks (All The Mods and similar): 8 GB minimum, 10–12 GB is comfortable with a few players.
- Leave room for the operating system and everything else on the machine. The flags pre-allocate the whole amount at startup (
-Xms=-XmxplusAlwaysPreTouch), so that memory is taken right away.
Where it goes
- NeoForge / Forge: replace the contents of
user_jvm_args.txtin the server folder. The start command reads it via@user_jvm_args.txt. Memory settings in panels like Crafty don't apply then; this file wins. More on modpacks in Crafty. - Modern modpacks (Minecraft 1.20.5+) need Java 21. If
javaon your server is a different version, put the full path to Java 21 in the Java command field. - Paper / vanilla: save as
start.sh,chmod +x start.sh, run it.