Created
September 2, 2022 23:32
-
-
Save djotaku/aa9640311bed5e4bbf59f15faf887733 to your computer and use it in GitHub Desktop.
minecraft systemd unit file
This file contains hidden or 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 | |
Group=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 | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment