Main Content

Install Server Instance as Windows Service

You can configure an on-premises MATLAB® Production Server™ instance to start when the host machine starts by registering the server instance as a Windows® service.

Create New Server Instance as Windows Service

To create a new on-premises server instance and register it as a Windows service, run the mps-new command with the --service option at the system command prompt.

mps-new C:\TEMP\server --service

You can assign a different name, description, and user for the Windows service than the defaults by providing arguments to mps-new.

The Windows service created for the server instance does not start automatically. To start the server instance, start the service, or start the server at the command prompt using the mps-start. You can edit the configuration for the instance before starting it.

The Windows service created for the server instance starts when the host machine starts. When the host machine restarts, the server instance restarts with it.

Make Existing Server Instance a Windows Service

To create a new Windows service for an existing on-premises server instance, use the mps-service command with the create option at the system command prompt.

mps-service -C C:\TEMP\server create

You can change the name, description, and user for the Windows service by providing arguments to mps-service.

The Windows service created for the server instance is configured to start when the machine starts. When the host machine is restarted, the server instance restarts with it.

Recovery Options for Server Instance Running as Windows Service

You can specify how your system responds if the server instance running as a Windows service fails.

  1. Open Service Control Manager in Windows.

  2. Locate and double-click the server instance service that you want to configure for failure recovery.

  3. Specify recovery options in the Recovery tab.

Recovery tab in Service Control Manager in Windows

Manage Instances Using Dashboard

If you use the MATLAB Production Server dashboard to create and start your server instances, you must use only the dashboard and not command-line scripts to stop or delete those instances. For example, for server instances that you create using the dashboard, it is not recommended that you use command-line scripts such as mps-service list or mps-service delete to list and delete server instances.

Work With Network Drives

If you want to use network drives with a server instance that runs as a Windows service, it is recommended that you specify UNC paths to the network drives instead of mapped drive letters. When you configure a server instance to run as a Windows service, the default user account for the service is SYSTEM. However, the user account that starts the server, either using mps-start at the command line or by starting the Windows service, is not SYSTEM, but is a dedicated domain account—the user account that is logged in to the computer. Using UNC paths makes the network drives accessible to both the user accounts.

Depending on the permissions on the network share, you might choose to configure the Windows service to run under a dedicated domain account and grant to the dedicated domain account necessary permissions on the network share.

See Also

| |

Related Topics