Minecraft

Guide to Minecraft Server Startup Flags

MinecraftยทMarch 22, 2026ยท14 min read

๐Ÿ”ง What are startup flags?

The flags are parameters used when starting a Minecraft server to optimize performance and control resource allocation such as RAM and CPU usage. These flags are particularly important when the server manages many players or mods.

๐Ÿš€ Types of flags in your panel

In your panel you have three options to configure the flags:

  • Default flags
  • Create a custom flag (star.sh)
  • Default flags with 95% RAM limit

Default flags

Flags

These are standard configurations recommended for most servers. They use basic memory allocation and JVM configuration parameters. If you're not sure how to adjust the flags, this option is safe for most users.

๐Ÿš€ Typical default flags command:

java -Xms128M -Xmx8256M -Dterminal.jline=false -Dterminal.ansi=true $( [[ ! -f unix_args.txt ]] && printf %s "-jar server.jar" || printf %s "@unix_args.txt" )

Explanation:

  • -Xms128M: The server will use a minimum of 128MB of RAM.
  • -Xmx8256M: The server can use up to a maximum of 8256MB (8 GB) of RAM.

Create a custom flag (start.sh)

Flags

Here you can manually adjust the flags to maximize performance according to your server's needs. You must edit the file start.sh and add the flags you consider necessary. This is useful for servers with high demand, many players, or several mods/plugins. Pre-built servers probably already have the file start.sh already configured and ready to use, you just need to assign the permissions (777) so the panel can run it.

๐Ÿ”จ Example of advanced flags to optimize performance:

java -Xms4G -Xmx8G -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -jar server.jar nogui

Advanced explanation:

  • -Xms4G and -Xmx8G: Allocates between 4 GB and 8 GB of RAM.
  • -XX:+UseG1GC: Enables the G1 garbage collector, the most recommended for Minecraft servers.
  • -XX:MaxGCPauseMillis=100: Optimizes garbage collector pauses to last less than 100 ms.
  • -XX:+UnlockExperimentalVMOptions: Allows the use of experimental Java options for greater customization.
  • -XX:+DisableExplicitGC: Disables manual garbage collection that can affect performance.

Default flags with 95% RAM limit

Flags

This option limits RAM usage to 95% of the allocated server RAM, preventing the system from running out of memory. It is ideal for servers where you want to ensure the server doesn't consume all the system's RAM.

๐Ÿ› ๏ธ Typical command with 95% RAM limit:

java -Xms4G -Xmx9.5G -jar server.jar nogui

Explanation:

  • -Xms4G: Uses a minimum of 4 GB of RAM.
  • -Xmx9.5G: Limits maximum RAM usage to 95% of the 10 GB allocated to the server.

๐Ÿ’ก Additional recommendations

  • Monitor RAM usage: If the server experiences high player peaks, consider increasing the maximum RAM limit.
  • Test before major changes: If you customize the flags, test the performance with a few players before applying it in production.
  • Garbage collector: Using Garbage First (G1) is recommended for servers with more than 4 GB of RAM.

Done! This guide should help you understand and configure the flags on your Minecraft server through your panel. If you need help with a specific adjustment or have more questions, we're here to help! ๐Ÿ˜Š

Conclusion

We hope this guide has been useful and remember, don't hesitate to ask on HolyHosting Discordย or contact our support team.

Follow us on Twitter (@HolyHosting) to stay up to date.

holyhosting logo

Cheers!!๐ŸŒŸ

Stuffyย @ HolyHosting

Still have questions?

Come chat with us and we will get back to you as soon as possible!

Contact Support