Documentation

Configure MATLAB Web App Server

To configure MATLAB®Web App Server:

  1. Navigate to the MATLAB Web App Server installation location and run the server application. For information about installing the server, see Install MATLAB Web App Server.

    PlatformSteps

    Windows®

    (Administrator)

    Default location of the server application is:

    C:\Program Files\MATLAB\MATLABWebAppServer\R2019a\application

    Right-click MATLABWebAppServer.exe and select Run as administrator.

    Linux®

    Default location of the server application is:

    /usr/local/MATLAB/MATLABWebAppServer/R2019a/application

    At the shell prompt, type:

    run_MATLABWebAppServer.sh <MATLAB_Runtime_Location>

    For example:

    run_MATLABWebAppServer.sh /usr/local/MATLAB/MATLAB_Runtime/v95

    macOS

    Default location of the server application is:

    /Applications/MATLAB/MATLABWebAppServer/R2019a/application

    Double-click the app MATLABWebAppServer.app

  2. Click the Service Registration tab, and select one of two options:

    • Register the web apps service using a default account

      Selecting this option registers the web apps service using a default account name MATLABWebAppsGuest.

      PlatformAccount and Service Name

      Windows

      Account Name: MwWebAppsGuestR2019a

      Service Name: MATLAB Web Apps (R2019a)

      Linux

      Account Name: mwguest

      Service Name: mw-webapps-R2019a

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

      macOS

      Account Name: _mwguest

      Service Name: mw-webapps-R2019a

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

    • Register the web apps service using an existing local account

      Selecting this option registers the web apps service using an existing local account name and password.

  3. You can start or stop the installed service from the Configure and Run tab. The service is automatically started once the service is successfully registered. If the service does not start automatically, click Start.

    1. Start/Stop the server.

    2. Open the web apps home page.

    3. Open the app folder containing the web app archive (.ctf) files.

    4. Open the server log folder.

    5. Specify the port number. Default port is 9988.

    6. Startup Timeout (sec): Defines the maximum time to prepare a new session for the requested app, in seconds. If server is under heavy load or hardware is not adequate, you may need to tweak this setting. Default value is 45 seconds.

    7. Session Timeout (min): Defines the time interval in minutes after which session will be stopped on the server. When session is running and browser tab is opened, periodic heartbeat messages will let server know that user is still interested in the session. If session was abandoned for reasons like computer going to sleep or network disconnected, this interval will define for how long the session will be kept alive on the server. Default value is 5 minutes.

    8. Enable SSL and use HTTPS. For more information, see Enabling HTTPS.

  4. Once you have installed and started the server, click the Open App Folder button to open the folder where compiled web apps are served from. Then serve your web apps by dropping their appName.ctf files in this folder. If the path specified for App Path does not exist, it is created after you start the service.

  5. To open your web apps home page, click Open Home Page.

    You can also configure the service by specifying:

    • the port number used for your web apps

    • timeout values for the session and for startup time

    After making any changes, click Apply to save your configuration.

  6. To stop the service, go to the Configure and Run tab, and click Stop.

  7. To unregister the service, go to the Service Registration tab, and click Unregister.

Note

  1. The maximum number of sessions that the server supports is limited to 32. However, the amount of RAM on the machine may limit you to fewer than 32 sessions.

  2. The server limits the number of MATLAB Compiler™ licensed users who can upload and run web apps to 10.

Related Topics