start.bat and start.sh generator for Minecraft
Pick your system, the memory and the server type, and download the script that starts it with Aikar's flags. Put it in the server folder, next to the .jar, and double-click it.
Your computer
Your server
Memory for Java
Leave at least 1.5 GB free for Java and the system: with 8 GB in the PC and playing on the same machine, don't give it more than 4 or 5.
Options
@echo off
title Minecraft server
java -Xms4096M -Xmx4096M -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
pause
How to use it
- Download the script (or copy it into a text file with that exact name).
- Put it in the server folder, where the .jar is (or run.bat, on Forge and NeoForge).
- On Windows, double-click it. On Linux or Mac,
chmod +x start.shand./start.sh. - The first time, accept the EULA: change
eula=falsetoeula=truein eula.txt and start it again.
Not sure how much memory to give it? Try the RAM calculator. Is it lagging? The guide “Minecraft server lag” (in Spanish) explains where to look.
Frequently asked questions
What are Aikar's flags?
A set of Java startup options that tune how memory is freed (the G1 garbage collector) for the way Minecraft uses it. You notice it as fewer lag spikes every few seconds. They're the ones Paper recommends, and they work for Purpur, Fabric, Forge and NeoForge too.
How do I give my Minecraft server more RAM?
With -Xmx (the maximum) and -Xms (what it takes at startup), in the start script. Set them to the same value, which is what this tool does: that way Java doesn't keep resizing in the middle of a game.
How much RAM should I give it?
What the server needs, not all of the computer's: Java uses a bit more than what you set in -Xmx, and Windows and the game itself (if you play on the same PC) need theirs. Leave at least 1.5 GB free. To find out how much it needs for your players and mods, use the RAM calculator.
When I double-click it, the window closes straight away. What's wrong?
It's almost always Java: either it isn't installed or it's older than the server version needs (Minecraft 1.20.5 or later needs Java 21). With the “pause” at the end, the window stays open and you can read the error.
Where do the flags go in Forge or NeoForge?
Since 1.17, the installer creates a run.bat (or run.sh) that reads the Java options from the user_jvm_args.txt file. The flags go there, one per line, and you start it with run.bat. Choose “Forge or NeoForge” above and you get both files.
How do I run it on Linux?
Save start.sh in the server folder, make it executable with chmod +x start.sh and start it with ./start.sh. To keep it running after you close the terminal, launch it inside screen or tmux.
No script, and no PC left on
At NapNodes the server starts with “Start” in the panel and Java's memory is already set to your plan: there's no script to touch. There's a free Minecraft server, no card needed, so you can try it with your friends without leaving your computer on.
More free tools
Is my Minecraft server online?
Type a Minecraft server address and see whether it responds, how many are playing, its version and its MOTD.
Is my Valheim server online?
Type a Valheim server's address and port and see whether it responds, how many are playing and its name.
Is my Project Zomboid server online?
Type a Project Zomboid server's address and port and see whether it responds, how many are playing and its name.
Minecraft RAM calculator
How many GB your Minecraft server needs for its plugins or mods, the players online at once and the view distance.
How much RAM do I need? (every game)
Minecraft, Hytale, Project Zomboid, Valheim or a Discord bot: pick the game, players and mods, and see the plan that fits.
server.properties editor
Paste your server.properties, change each option with a plain-English explanation and download it. It flags the ones that no longer work.
MOTD generator
The server list message with colours and styles, a live preview and the line ready for server.properties.
Chunky pre-generation calculator
How much disk and time pre-generating your world with Chunky takes for a given radius, with the console commands ready.
Nether portal calculator
Convert Overworld coordinates to the Nether and back to link portals without duplicates. Paste your F3 line.
Project Zomboid mod list
Paste Workshop links and Mod IDs and get WorkshopItems= and Mods= written correctly, with the Build 42 backslash.
Project Zomboid settings editor
Paste your .ini and SandboxVars.lua (or start from scratch), change their 400+ options with a search box, and download them.
Minecraft UUID lookup
Type a Minecraft Java username and get its UUID, the offline one and the lines for whitelist.json and ops.json.
/give command generator
Items with enchantments, a coloured name and lore: the /give command written right for your Minecraft version.
/summon command generator
Mobs with a coloured name, more health, another size, gear or standing still: the /summon command written right for your version.
Server name generator
Name ideas for your server by game and style, with your own word if you like, and what its address would look like.
/tellraw and /title generator
Messages with colours, bold and click actions in chat or across the screen: the /tellraw or /title command ready to copy.
Which Java do I need?
Type your Minecraft version or paste the Java error and we'll tell you which Java your server or your game needs.
Gradient text generator
Type some text, pick the colours and get the gradient in “&#”, MiniMessage or “&x” for chat, the MOTD or plugins.
Server icon maker
Upload an image (or type a few letters) and get the 64×64 server-icon.png Minecraft asks for, ready for Files.
Slime chunk finder
Enter the seed and your coordinates and see the slime chunks nearest to you on a map of your Minecraft Java world.
SteamID64 finder
Paste a Steam link, a username or a STEAM_0 ID and get every form of the ID and the adminlist.txt line for Valheim.
What does it cost in electricity?
What it costs in electricity to keep the server running on your PC at home, side by side with a plan and the free server.
Discord bot permissions calculator
Tick your bot's permissions and get the number and the invite link; or paste a number and see which permissions it grants.