Skip to content

Instantly share code, notes, and snippets.

@gambtho
Last active December 12, 2019 20:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gambtho/456d3639fb0f923bc5a073b6c57a3066 to your computer and use it in GitHub Desktop.
Save gambtho/456d3639fb0f923bc5a073b6c57a3066 to your computer and use it in GitHub Desktop.
[Unit]
Description=start and stop the minecraft-server
[Service]
WorkingDirectory=/minecraft
User=minecraft
Group=minecraft
Restart=on-failure
RestartSec=20 5
ExecStart=/usr/bin/java -Xms1G -Xmx1G -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=100 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:G1MixedGCLiveThresholdPercent=35 -XX:+AlwaysPreTouch -XX:+ParallelRefProcEnabled -Dusing.aikars.flags=mcflags.emc.gs -jar server.jar
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment