Skip to content

Minecraft Start Script and RAM Calculator

A ready start script with Aikar flags, the Java version your Minecraft needs and a memory setting that leaves room for the system.

Paper

The most widely used plugin server. Runs Bukkit, Spigot and Paper plugins and fixes many performance problems. A good default for most servers.

Official download: papermc.io · Documentation: docs.papermc.io

This Minecraft version needs Java 25.

Memory

The script leaves 1 to 1.5 GB for Java itself and the system.

Java heap: 6656M

start.sh
#!/usr/bin/env bash
cd "$(dirname "$0")"
java -Xms6656M -Xmx6656M -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 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar paper.jar --nogui

On the first start the server creates eula.txt and stops. Change eula=false to eula=true to accept the Minecraft EULA, then start it again.

Make the script executable once: chmod +x start.sh

Commands, flags and Java versions as in the official documentation of each project.

How to use the start script

  1. Choose the server software, the Minecraft version and your operating system.
  2. Enter the RAM of your plan, or let the tool estimate it from players, view distance and mods.
  3. Download the script, put it next to the server jar and start it.

Next step: server.properties Generator

Frequently asked questions

What are Aikar flags?

Java settings for the G1 garbage collector that PaperMC recommends for Minecraft servers. They keep pauses short and avoid lag spikes from memory clean-up.

Why are -Xms and -Xmx the same?

With the same value Java takes all memory at the start and never has to grow or shrink the heap. PaperMC recommends it together with the Aikar flags.

My plan has 8 GB. Why does the script use less?

Java needs memory beyond the heap, and so does the system. PaperMC recommends about 1000 to 1500 MB less than the plan, so 8 GB becomes about 6.5 GB.

Which Java version do I need?

Minecraft 26.1 and newer need Java 25, 1.20 to 1.21.11 Java 21 and 1.17 to 1.19 Java 17. The tool shows the version for the Minecraft you choose.

How exact is the RAM estimate?

It is a starting point, not a measurement. View distance, the number of loaded chunks and mods matter more than the player count. Watch your server with a tool like spark and adjust.