PingDirectory

Running the server as a Microsoft Windows service

The server can run as a Windows service on Windows Server 2016, 2019, and 2022. This enables logging out of a machine without the server being stopped.

Register the service

Steps

  1. Stop the server using the bin\stop-server command. A server cannot be registered while it is running.

  2. Register the server as a service. From a Windows command prompt, run bat\register-windows-service.bat.

  3. After a server is registered, start the server from the Windows Services Control Panel or with the bat\start-server.bat command.

    Command-line arguments for the start-server.bat and stop-server.bat scripts are not supported while the server is registered to run as a Windows service. Using a task to stop the server is also not supported.

Run multiple service instances

Only one instance of a particular service can run at one time. Services are distinguished by the wrapper.name property in the <server-root>\config\wrapper-product.conf file. To run additional service instances, change the wrapper.name property on each additional instance. Descriptions of the services can also be added or changed in the wrapper-product.conf file.

Deregister and uninstall

While a server is registered as a service, it cannot run as a non-service process or be uninstalled. Use the bat\deregister-windows-service.bat file to remove the service from the Windows registry. The server can then be uninstalled with the uninstall.bat script.

Log files

The log files are stored in <server-root>\logs, and file names begin with windows-service-wrapper. They are configured to rotate each time the wrapper starts or because of file size. Only the last three log files are retained. These configurations can be changed in the <server-root>\config\wrapper.conf file.