Main Content

Configure Server to Use MATLAB Runtime

If you did not configure the MATLAB® Web App Server™ to use a version of MATLAB Runtime during the setup process, you can do so using the webapps-runtime command. However, before configuring the server to use a version of MATLAB Runtime, verify that you have one installed.

Note

Each release of MATLAB Web App Server is designed to support a range of six MATLAB Runtime versions. This range starts from the MATLAB Runtime version tied to the current release of MATLAB Web App Server and extends to the previous five releases. For details, see Supported MATLAB Runtime Versions.

Install MATLAB Runtime

  1. Download the MATLAB Runtime installer from the MathWorks® website or the MATLAB desktop.

    OptionSteps
    MathWorks Website

    Select the appropriate platform and release-specific installer from:

    https://www.mathworks.com/products/compiler/matlab-runtime.html

    MATLAB Desktop

    At the MATLAB command prompt, type:

    compiler.runtime.download (MATLAB Compiler)

  2. Install MATLAB Runtime using the installer. For installation instructions, see Download and Install MATLAB Runtime (MATLAB Compiler).

Configure the Server

To configure the server to use a version of MATLAB Runtime:

  1. Navigate to the command-line scripts folder.

    Operating SystemDefault Location of Command-Line Scripts

    Windows® (Administrator)

    C:\Program Files\MATLAB\MATLAB Web App Server\R2024b\script

    Linux® (sudo)

    /usr/local/MATLAB/MATLAB_Web_App_Server/R2024b/script

    macOS (Intel® processor) (sudo)

    /Applications/MATLAB/MATLAB_Web_App_Server/R2024b/script

  2. Execute the webapps-runtime command with the add option and a path to the MATLAB Runtime installation.

    webapps-runtime add <Path to MATLAB Runtime installation>

Related Topics