This repository has been archived on 2020-06-19. You can view files and clone it, but cannot push or open issues or pull requests.
ansible-minecraft/templates/paper-server.service.j2

17 lines
976 B
Django/Jinja

[Unit]
Description=PaperMC Server
After=network.target
[Service]
ExecStart=/usr/bin/java -Xmx3584M -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=100 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:-OmitStackTraceInFastThrow -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=8 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=true -Daikars.new.flags=true -Dfile.encoding=UTF-8 -Dcom.mojang.eula.agree=true -jar /etc/paper/server.jar nogui --world-dir {{ minecraft.paths.data }}/worlds
Restart=on-failure
User=nobody
Group=nogroup
WorkingDirectory={{ minecraft.paths.data }}
ProtectSystem=strict
BindPaths=-{{ minecraft.paths.data }}
TemporaryFileSystem=/:ro
[Install]
WantedBy=multi-user.target