minecraft/server/templates/[email protected]
author Luke Hoersten <luke@hoersten.org>
Sat, 24 Jul 2021 10:29:21 -0500
changeset 169 f4f9b52ede46
parent 164 ae19501f5251
child 177 11f52d70bca4
permissions -rw-r--r--
Fixed dendrite restart handler bug.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
19
31de177274a1 Added minecraft server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
[Unit]
164
ae19501f5251 Updated minecraft to be multi-world and minimized world size.
Luke Hoersten <luke@hoersten.org>
parents: 156
diff changeset
     2
Description=Minecraft Server %I
111
1c1a911b26aa Made minecraft role support vanilla and paper forks.
Luke Hoersten <luke@hoersten.org>
parents: 108
diff changeset
     3
Documentation=https://minecraft.gamepedia.com/Tutorials/Setting_up_a_server
19
31de177274a1 Added minecraft server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
After=network.target
31de177274a1 Added minecraft server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     5
31de177274a1 Added minecraft server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     6
[Service]
111
1c1a911b26aa Made minecraft role support vanilla and paper forks.
Luke Hoersten <luke@hoersten.org>
parents: 108
diff changeset
     7
User={{minecraft_user}}
1c1a911b26aa Made minecraft role support vanilla and paper forks.
Luke Hoersten <luke@hoersten.org>
parents: 108
diff changeset
     8
Group={{minecraft_user}}
164
ae19501f5251 Updated minecraft to be multi-world and minimized world size.
Luke Hoersten <luke@hoersten.org>
parents: 156
diff changeset
     9
WorkingDirectory={{minecraft_parent_dir}}/minecraft/%i
19
31de177274a1 Added minecraft server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    10
Restart=on-failure
31de177274a1 Added minecraft server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    11
RestartSec=20 5
111
1c1a911b26aa Made minecraft role support vanilla and paper forks.
Luke Hoersten <luke@hoersten.org>
parents: 108
diff changeset
    12
ExecStart=/usr/bin/java -Xms{{minecraft_mem}} -Xmx{{minecraft_mem}} -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar server.jar nogui
19
31de177274a1 Added minecraft server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    13
31de177274a1 Added minecraft server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    14
PrivateTmp=true
31de177274a1 Added minecraft server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    15
ProtectSystem=full
31de177274a1 Added minecraft server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    16
NoNewPrivileges=true
31de177274a1 Added minecraft server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    17
PrivateDevices=true
31de177274a1 Added minecraft server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    18
31de177274a1 Added minecraft server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    19
[Install]
31de177274a1 Added minecraft server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    20
WantedBy=multi-user.target