Set Up MATLAB Production Server Using the Command Line - MATLAB & Simulink (original) (raw)

You can run MATLAB® Production Server™ on-premises and in the cloud. To set up an on-premises server, you can use the system command line or the dashboard, which is a web-based interface. The following procedure use the command line. For information on interacting with the server using the dashboard, seeServer Management Using Dashboard. For using MATLAB Production Server on the cloud, see Cloud Deployment.

Prerequisites

Set Up the Server

  1. After installing the MATLAB Production Server product, navigate to the folder containing the MATLAB Production Server command-line scripts.
    Operating System Default Location of Command-Line Scripts
    Windows® (Administrator) C:\Program Files\MATLAB\MATLAB Production Server\R2025a\script
    Linux® (sudo) /usr/local/MATLAB/MATLAB_Production_Server/R2025a/script
    macOS (sudo) /Applications/MATLAB/MATLAB_Production_Server/R2025a/script
  2. At the operating system command line, start the interactive setup interface by typing:
    For details, see mps-setup.
    During the setup process set the default MATLAB Runtime version you want the server to use. For details, see Specify Default MATLAB Runtime for New Server Instances.

Create Server Instance

To create a server configuration or instance, enter the mps-new command from the system prompt. Specify the name of the server that you want to create as an argument to the mps-new command.

For example, to create a server instance with the name prod_server_1 located in C:\tmp and to use the verbose mode, run the following on your system command prompt.

C:\tmp>mps-new prod_server_1 -v

For more information, see Create Server Instance Using Command Line.

Configure Server Instance

After you create a new server instance, you must configure it. At a minimum, ensure that the following properties in the main_config server configuration file are set.

For more information on editing main_config, see Server Configuration Properties.

Start Server Instance

To start the server instance that you created, enter the mps-start command from the system prompt. Specify the name of the server that you want to start as an argument to the mps-start command.

For example, to start a server instance with the name prod_server_1 located in C:\tmp, run the following on your system command prompt.

C:\tmp>mps-start -C prod_server_1

For more information, see Start Server Instance Using Command Line.

See Also

mps-start | mps-setup | mps-status | mps-restart

Topics