1
0
Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
2026-01-17 15:37:34 +01:00
commit 2295825b35
5 changed files with 181 additions and 0 deletions

27
hytale.service Normal file
View File

@@ -0,0 +1,27 @@
[Unit]
Description=Hytale Game Server
After=network.target
[Service]
Type=simple
User=mars3142
Group=mars3142
WorkingDirectory=/opt/hytale/Server
# SDKMAN Java path for user mars3142
Environment="JAVA_HOME=/home/mars3142/.sdkman/candidates/java/current"
Environment="PATH=/home/mars3142/.sdkman/candidates/java/current/bin:/usr/local/bin:/usr/bin:/bin"
ExecStart=/home/mars3142/.sdkman/candidates/java/current/bin/java -jar HytaleServer.jar --assets ../Assets.zip
Restart=on-failure
RestartSec=10
# Security hardening
NoNewPrivileges=true
ProtectSystem=strict
ReadWritePaths=/opt/hytale
ProtectHome=read-only
[Install]
WantedBy=multi-user.target