Configuration
Each operating system may vary on which config items they choose to support.
You can provide configuration to the server service create and server service update commands as CLI parameters like so:
server service create startType=auto standardOutPath=logs/out.txtOr you can put them in your server.json like so:
server set service.startType=auto
server set service.standardOutPath=logs/out.txtOr you can set them as global defaults for all services like so:
config set server.defaults.service.startType=auto
config set server.defaults.service.standardOutPath=logs/out.txtserviceName - The name/ID of the service
displayName - The human readable name of the service
description - The description of the service
username - The username to run as. On Windows, format of
domain\userormachine\loginpassword - The password of the user above (Windows only)
startType - one of the strings
auto,delayed,ondemand,disableddependOnGroup - An array of service groups that need started first. Comma-delimited list when passed the CLI (Windows only)
dependOnService - An array of other services that need started first. Comma-delimited list when passed the CLI
processPriority - One of the strings
realtime,high,aboveNormal,normal,belowNormal,idle(Windows only)CPUAffinity - The string "all" or CPU IDs, starting from 0 such as "0-2,4" which would use the first, second, third, and 5th CPU core. (Windows only)
exitAction - One of the strings
Restart,Ignore,ExitrestartDelayMS - Number of milliseconds to delay restart when
exitActionisrestart.restartThrottleMS - Throttles how quickly to restart if the app runs for only a short time. Set the number of milliseconds for this threshold. (Windows only)
standardOutPath - Path to a file to write the "out" logs. Similar to the
server logbut also includes the raw output of theserver startcommand itself. Useful for debugging failed starts. (Windows only)errorOutPath - Path to a file to write the "error" logs. Similar to the
server logbut also includes the raw output of theserver startcommand itself. Useful for debugging failed starts. Can be set to the same path as the "out" log. (Windows only)rotateLog - true/false to enable log rotation (Windows only)
rotateLogOnline - true/false to enable log rotation while service is running as opposed to only during a restart. (Windows only)
rotateLogSeconds - Number of seconds between log rotations. (Windows only)
rotateLogKB - Number of Kilobytes of log file size before rotating. When using online rotation, time is ignored and only file size taken into account. (Windows only)
Note, the standardOutPath and errorOutPath can be absolute or relative. When relative, the following logic is used to expand the paths.
Paths provided from the CLI are relative to the current working directory of the command
Paths provided in
server.jsonare relative to the location of theserver.jsonfile.Paths provided in
server.defaults.serviceconfig defaults are relative to the web root of the server.
On Linux, the systemd journal will be used for the server out. Any issues with startup can be viewed like so:
journalctl -u nameOfServiceLast updated
Was this helpful?