Understanding the config
[Unit] Description=myServer[Service] ExecStart=bash index.sh SocketBindAllow=3000 IOWeight=500 MemoryMax=128M MemorySwapMax=0M CPUQuota=100% ReadWritePaths=+/etc/xmanage/volumes/1cff94816b WorkingDirectory=/etc/xmanage/volumes/1cff94816b PrivateDevices=true ProtectControlGroups=true ProtectHome=true ProtectKernelTunables=true RestrictSUIDSGID=true DynamicUser=true[Install] WantedBy=default.targetThat’s default server service configuration. It’s complicated, or? Let me explain it!
[Unit]Description=myServerNothing special, just server description
[Service] ExecStart=bash index.shNothing special too, server startup command
SocketBindAllow=3000Allows server to bind on port 3000
IOWeight=500Server’s Input/Output Priority
MemoryMax=128M MemorySwapMax=0M CPUQuota=100%Server’s resources limit like CPU, RAM and Swap
ReadWritePaths=+/etc/xmanage/volumes/1cff94816bWorkingDirectory=/etc/xmanage/volumes/1cff94816bSets server’s working directory and allows write/read from this directory
PrivateDevices=true ProtectControlGroups=true ProtectHome=true ProtectKernelTunables=true RestrictSUIDSGID=trueSecurity options, we’ll leave it for now
DynamicUser=trueVery strict security option, if you don’t want to limit your server, change this value to false and set User=root
[Install] WantedBy=default.targetBasically the priority of startup on the boot, starts with the default priority with the rest of default services