
Running out of memory is one of the most common reasons a Minecraft server crashes or freezes. If you see "Out of Memory" errors, watchdog crashes, or heavy lag on a big modpack, adding RAM is often the fix. Here is how to increase RAM the right way in 2026.
How Minecraft uses RAM
Minecraft servers run on Java, and Java limits how much memory it can use with two flags:
-Xmxsets the maximum memory. This is the number you raise to add RAM.-Xmssets the starting memory. Setting this equal to-Xmxkeeps memory stable and avoids resize pauses.
For example, -Xmx8G -Xms8G gives the server 8 GB. If you only set -Xmx2G, the server can never use more than 2 GB no matter how much the machine has.
Method 1: increase RAM in your control panel
Most managed hosts, including Space-Node, use a panel like Pterodactyl where RAM is set for you based on your plan. To add RAM you simply upgrade to a larger plan, and the panel handles the Java flags automatically. There is no command line needed. This is the easiest and safest method.
Method 2: edit the startup flags manually
If you run your own server, open your start script or start.bat and change the memory flags:
java -Xmx8G -Xms8G -jar server.jar nogui
Change 8G to the amount you want. Save the file and restart the server. Never set -Xmx higher than the physical RAM on the machine, and always leave 1 to 2 GB free for the operating system.
How much RAM do you actually need?
- Vanilla or Paper survival, up to 10 players: 2 to 4 GB.
- Plugins and a medium community: 4 to 6 GB.
- Light modpacks: 6 to 8 GB.
- Heavy modpacks like ATM10 or GTNH: 10 to 16 GB.
More RAM does not make a server faster on its own. It only prevents crashes when the server needs the memory. Beyond a certain point, extra RAM does nothing for TPS, so do not overbuy.
Do not use too much RAM either
It sounds odd, but allocating far more RAM than a server needs can hurt. Very large heaps make Java garbage collection pauses longer, which shows up as periodic lag spikes. Match the RAM to the workload and use good garbage collection flags, such as Aikar's flags, for modded servers.
Fixing out-of-memory crashes
If the server still runs out of memory after adding RAM:
- Confirm the new
-Xmxvalue actually applied by checking the console at startup. - Reduce view distance and simulation distance.
- Pre-generate chunks so the server is not generating terrain under load.
- Check for a plugin or mod leaking memory using a profiler like spark.
The short answer
To add RAM, raise the -Xmx and -Xms Java flags, or upgrade your plan on a managed host so it is done for you. Give heavy modpacks 10 to 16 GB, keep some RAM free for the OS, and do not over-allocate.
Space-Node Minecraft plans let you scale RAM instantly from the panel with Aikar's flags applied for you. See the tiers on our Minecraft hosting page, or the modpack hosting page for heavy packs like ATM10.