Set Up MATLAB Web App Server

You can set up the server once you complete installing the MATLAB® Web App Server™ product. For information on installing the product, see Install or Uninstall MATLAB Web App Server Product.

License Manager

You can set up the MATLAB Web App Server without a license manager. However, you will need a license manager running on your network prior to using the MATLAB Web App Server. For more information, see Installation Procedures for Network License Manager (Installation and Licensing).

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

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

Set Up the Server

  1. After installing the MATLAB Web App Server product, navigate to the folder containing the MATLAB Web App Server command-line scripts.

    Operating SystemDefault Location of Command-Line Scripts

    Windows® (Administrator)

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

    Linux® (sudo)

    /usr/local/MATLAB/MATLAB_Web_App_Server/R2020a/script

    macOS (sudo)

    /Applications/MATLAB/MATLAB_Web_App_Server/R2020a/script

  2. At the operating system command line, launch the interactive setup interface by typing:

    Operating SystemCommand

    Windows (Administrator)

    
    webapps-setup

    Linux (sudo)

    macOS (sudo)

    MATLAB Web App Server registers two services:

    • A service to run the server.

    • A service to run the apps.

    For platform-specific service names, see Service Information, Groups, and Folder Locations.

  3. Enter information about the license server at the prompt. You can specify this information in one of two ways:

    • Port Number@License Server Name. For example: 27000@myLicenseServer.

    • Path to the license file. For example: C:\myLicenses\license.lic.

    If you do not have a license manager set up, you can just press Enter to continue with the rest of the setup process. After setting up your license manager, use webapps-config to connect with the license manager.

  4. Specify a user account to run the server service and the apps service. To use the default accounts press Enter. For account names, see Service Information, Groups, and Folder Locations.

    The default account for running the server service processes HTTP and HTTPS traffic and manages authentication. The account has permissions to write to the apps folder that contains web apps. It can read an SSL private key and authentication configuration associated with the server.

    The default account for running the apps service has the permissions of a standard user on the machine. The account can read and execute web apps as well as generate logs.

  5. Specify the MATLAB Runtime versions you want to use by typing y or n at the prompt. The setup utility automatically finds all MATLAB Runtime versions installed on your machine as long as they are installed in the default installation location.

    If you do not have MATLAB Runtime installed, follow the instructions in Install MATLAB Runtime, and configure it using webapps-runtime.

With the setup complete, you can start the server using webapps-start.

Service Information, Groups, and Folder Locations

Setting up the MATLAB Web App Server creates two services and folders for uploading apps, capturing logs, and managing the server configuration.

Service Information

Operating SystemServer Service InformationApps Service Information

Windows

Account Name: MwWebAppServerR2020a

Service Name: mw-webapps-R2020a

Account Name: MwWebAppWorkerR2020a

Service Name: mw-webapps-launcher-R2020a

Linux

Account Name: MwWebAppsServerR2020a

Service Name: mw-webapps-R2020a

Service File: /etc/systemd/system/mw-webapps-R2020a.service

Account Name: MwWebAppsWorkerR2020a

Service Name: mw-webapps-launcher-R2020a

Service File: /etc/systemd/system/mw-webapps-launcher-R2020a.service

macOS

Account Name: MwWebAppsServerR2020a

Service Name: com.mathworks.mw-webapps-R2020a

Service File: /Library/LaunchDaemons/com.mathworks.mw-webapps-R2020a.plist

Account Name: MwWebAppsWorkerR2020a

Service Name: com.mathworks.mw-webapps-launcher-R2020a

Service File: /Library/LaunchDaemons/com.mathworks.mw-webapps-launcher-R2020a.plist

Groups

Operating SystemGroup NameDescription

Windows

MwWebAppAuthorsR2020a

Members of this group can upload applications to the server.

Linux

MwWebAppsAuthorsR2020a

Members of this group can upload applications to the server.

macOS

MwWebAppsAuthorsR2020a

Members of this group can upload applications to the server.

Folder Locations

Operating SystemFolders

Windows

Apps Folder: %ProgramData%\MathWorks\webapps\R2020a\apps

Logs Folder: %ProgramData%\MathWorks\webapps\R2020a\logs

Config Folder: %ProgramData%\MathWorks\webapps\R2020a\config

Linux

Apps Folder: /local/MathWorks/webapps/R2020a/apps

Logs Folder: /local/MathWorks/webapps/R2020a/logs

Config Folder: /local/MathWorks/webapps/R2020a/config

macOS

Apps Folder: /Library/Application Support/MathWorks/webapps/R2020a/apps

Logs Folder: /Library/Application Support/MathWorks/webapps/R2020a/logs

Config Folder: /Library/Application Support/MathWorks/webapps/R2020a/config

Related Topics