papermc/templates/papermc.service.j2
changeset 33 ad75fc2d2853
parent 19 31de177274a1
child 108 f00f45a9512d
equal deleted inserted replaced
32:78242f9f4010 33:ad75fc2d2853
       
     1 [Unit]
       
     2 Description=PaperMC Server
       
     3 Documentation=https://paper.readthedocs.io/en/latest/server/getting-started.html
       
     4 
       
     5 Wants=network.target
       
     6 After=network.target
       
     7 
       
     8 [Service]
       
     9 User={{papermc_user}}
       
    10 Group={{papermc_user}}
       
    11 WorkingDirectory={{papermc_dir}}
       
    12 Restart=on-failure
       
    13 RestartSec=20 5
       
    14 ExecStart=/usr/bin/java -Xms{{papermc_mem}} -Xmx{{papermc_mem}} -jar server.jar
       
    15 
       
    16 PrivateTmp=true
       
    17 ProtectSystem=full
       
    18 NoNewPrivileges=true
       
    19 PrivateDevices=true
       
    20 
       
    21 [Install]
       
    22 WantedBy=multi-user.target