bundlewrap/bundles/minecraft/files/minecraft.service

40 lines
671 B
SYSTEMD
Raw Normal View History

2022-11-06 17:52:38 +00:00
[Unit]
Description=Minecraft Server
Requires=network.target
After=network.target
[Service]
Type=simple
NotifyAccess=main
ExecStart=/usr/bin/java ${java_opts} -jar /home/minecraft/minecraft_server.jar --nogui
Restart=always
RestartSec=10
User=minecraft
Group=minecraft
WorkingDirectory=/home/minecraft
LimitNOFILE=8192
LimitNPROC=256
UMask=0022
NoNewPrivileges=true
ProtectSystem=true
ReadOnlyPaths=/
ReadWritePaths=/home/minecraft
PrivateTmp=true
PrivateDevices=true
PrivateUsers=true
ProtectHostname=true
ProtectClock=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectKernelLogs=true
ProtectControlGroups=true
[Install]
WantedBy=multi-user.target