noflags.sh

Options

The name of the file used to launch the server.
Enable the built-in GUI for the server.
Enable automatic restart on crash or stop.

Result

#!/bin/sh java -Xms4096M -Xmx4096M -XX:+UseZGC -jar server.jar --nogui