1
0
Files
hytale-server-admin/hytale.service
2026-01-17 15:59:24 +01:00

29 lines
701 B
Desktop File

[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 --enable-native-access=ALL-UNNAMED -jar HytaleServer.jar --assets ../File.zip
Restart=on-failure
RestartSec=10
# Security hardening
NoNewPrivileges=true
ProtectSystem=strict
ReadWritePaths=/opt/hytale
ProtectHome=read-only
PrivateTmp=true
[Install]
WantedBy=multi-user.target