Last active
June 8, 2022 17:58
-
-
Save mrpjevans/dac16bb17dee38bf1a1a5be63645459f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Minecraft Server | |
After=network.target | |
[Service] | |
User=minecraft | |
Nice=1 | |
KillMode=none | |
SuccessExitStatus=0 1 | |
ProtectHome=true | |
ProtectSystem=full | |
PrivateDevices=true | |
NoNewPrivileges=true | |
WorkingDirectory=/usr/local/minecraft/server | |
ExecStart=/usr/bin/java -Xmx4096M -Xms512M -jar server.jar nogui | |
ExecStop=/usr/local/minecraft/tools/mcrcon/mcrcon -H 127.0.0.1 -P 25575 -p password stop | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment