Create a Server

Prerequisites

Before creating a server, ensure you have:

  • Installed MATLAB® Production Server™ software.

  • Added the script folder to your system PATH environment variable. Doing so enables you to run server commands such as mps-new from any folder on your system.

    Note

    You can run server commands from the script folder. The script folder is located at $MPS_INSTALL\script, where $MPS_INSTALL is the location where MATLAB Production Server is installed. For example, on Windows, the default location is: C:\Program Files\MATLAB\MATLAB Production Server\ver\script. ver is the version of MATLAB Production Server.

Procedure

Before you can deploy your MATLAB code with MATLAB Production Server, you need to create a server to host your deployable archive.

A server instance is considered to be one unique configuration of the MATLAB Production Server product. Each configuration has its own parameter settings file (main_config) as well as its own set of diagnostic files.

To create a server configuration or instance, do the following:

  1. From the system command prompt, navigate to where you want to create your server instance.

  2. Enter the mps-new command from the system prompt:

    mps-new [path/]server_name [-v]
    where:

    • path is the path to the server instance and configuration you want to create for use with the MATLAB Production Server product. When specifying a path, ensure the path ends with the server_name.

      If you are creating a server instance in the current folder, you do not need to specify a full path. Only specify the server name.

    • server_name — is the name of the server instance and configuration you want to create.

    • -v — enables verbose output, giving you information and status about each folder created in the server configuration.

    Upon successful completion of the command, MATLAB Production Server creates a new server instance.