[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 ../Assets.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