papermc/templates/papermc.service.j2
author Luke Hoersten <luke@hoersten.org>
Sat, 13 Jun 2020 14:58:31 -0500
changeset 42 edb53dfadfb5
parent 33 ad75fc2d2853
child 108 f00f45a9512d
permissions -rw-r--r--
Moved to ext4 for permissions on hdd.

[Unit]
Description=PaperMC Server
Documentation=https://paper.readthedocs.io/en/latest/server/getting-started.html

Wants=network.target
After=network.target

[Service]
User={{papermc_user}}
Group={{papermc_user}}
WorkingDirectory={{papermc_dir}}
Restart=on-failure
RestartSec=20 5
ExecStart=/usr/bin/java -Xms{{papermc_mem}} -Xmx{{papermc_mem}} -jar server.jar

PrivateTmp=true
ProtectSystem=full
NoNewPrivileges=true
PrivateDevices=true

[Install]
WantedBy=multi-user.target