How to use your Minecraft server start script
A start script is a small text file that holds the command that launches your server, so you start it with a double-click instead of typing the command every time. It belongs in the same folder as the server jar.
On Windows
-
Choose Windows above and download the file. Or copy the text into Notepad and save it as
start.batwith "Save as type" set to "All files", so it does not becomestart.bat.txt. - Put
start.batin the folder that holds your server jar. -
Double-click it. The first run creates
eula.txtand stops. Open that file, changeeula=falsetoeula=true, save it and run the script again.
The script ends with pause, so the window stays open after the server stops and you can read any error.
On Linux or macOS
- Choose Linux or macOS and save the script as
start.shin the server folder. - Open a terminal in that folder and make the script executable once with
chmod +x start.sh. - Start the server with
./start.sh, then accept the EULA the same way as on Windows.
Both scripts switch to their own folder first, so the server finds its world and settings wherever you launch it from.
What the options mean
Memory
The number becomes both -Xms, the memory Java starts with, and -Xmx, the most it may use. Whole numbers are
written as 4G. A value such as 2.5 is written in megabytes as 2560M, because Java rejects a decimal point there.
Do not give the server all the RAM in the machine. Java needs memory on top of that number and so does the operating system: Paper's documentation recommends staying about 1000 to 1500 MB below what you have available. The Minecraft server RAM calculator helps you pick the number.
Plain or Aikar's flags
Plain means no tuning flags at all. As of October 2026, Paper's advice is to try that first on Java 17, 21 or newer, and to try Aikar's flags if you have garbage collection problems or run an older Minecraft or Java version. The flags tune Java's G1 garbage collector for the way Minecraft uses memory, and this tool writes them exactly as Paper publishes them. Paper recommends at least 6 to 10 GB of memory with them, or as much as you can spare.
More than 12 GB
Aikar's original post changes five
values when the server has more than 12 GB: G1NewSizePercent=40, G1MaxNewSizePercent=50,
G1HeapRegionSize=16M, G1ReservePercent=15 and InitiatingHeapOccupancyPercent=20. As of October
2026 Paper's page no longer lists this adjustment, so the tool applies it only when you tick the box. Aikar's own warning applies: if you
see more old generation collections afterwards, go back to the base flags.
No server window
--nogui stops the server from opening its graphical window. You type commands in the console window instead. Untick it if
you want that window.
Restart loop
With the loop on, the script starts the server again 10 seconds after it exits. That covers crashes, but it also means the
stop command no longer ends things: the server comes back. To shut down for good, type stop, wait for the
countdown to appear, then press Ctrl+C (on Windows, then answer Y) or close the window.
Which Java version each Minecraft release needs
The script runs whichever java is installed, so the right version has to be on the machine. These are the minimums as of
October 2026. The newest release is 26.3, from 15 September 2026.
| Java Edition release | Minimum Java |
|---|---|
| 26.1 to 26.3 | Java 25 |
| 1.20.5 to 1.21.11 | Java 21 |
| 1.18 to 1.20.4 | Java 17 |
| 1.17 and 1.17.1 | Java 16 |
| 1.12 to 1.16.5 | Java 8 |
| 1.6.1 to 1.11.2 | Java 6 |
| 1.5.2 and older | Java 5 |
For 1.16.5 and older, Java 8 is the safe pick: it meets every minimum in those rows, and it is what Mojang's launcher uses for 1.7.2 to
1.16.5. Server software can ask for more: Paper recommends Java 21 for Paper 1.20 to 1.21.11, so check Paper's requirements table if you run Paper. To see what
you have, type java -version in a terminal.
Common mistakes
- The jar name does not match. Java answers
Error: Unable to access jarfile. Copy the exact file name, version numbers included, into the field above. - The file is really
start.bat.txt. Windows hides file extensions by default. Turn on file name extensions in File Explorer's View menu and rename the file. - Java is missing or too old.
'java' is not recognizedmeans it is not installed or not on your PATH. AnUnsupportedClassVersionErrormeans the installed Java is older than the server needs. - More memory than the machine has. Java stops at startup with an insufficient memory error. Lower the number.
On a managed host you can skip this
A start script only matters when you launch Java yourself. On a managed host the startup command is usually set for you, and the parts you may change sit in the control panel, so you normally have nothing to upload. What carries over is the rest of the setup: build your settings file with the server.properties generator, write the line players see in the server list with the MOTD generator, and once the server is up, test it from outside with the server status checker.
Sources
The data and rules in this tool were last checked on against:
- PaperMC docs: Aikar's flags
- PaperMC docs: start script generator and which flags to choose
- PaperMC docs: getting started (Java versions and the basic start command)
- Aikar: Tuning the JVM, G1GC garbage collector flags for Minecraft (the adjustment above 12 GB)
- Minecraft Wiki: Tutorial, update Java (Java version per release)
- Minecraft Wiki: Tutorial, setting up a Java Edition server
- Mojang version manifest (latest release and the Java version each release declares)
- Minecraft.net: download the Java Edition server