0% found this document useful (0 votes)
57 views

Matlab Web App Server Quick Start Guide

Uploaded by

Juphil Pleto
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
57 views

Matlab Web App Server Quick Start Guide

Uploaded by

Juphil Pleto
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

MATLAB Web App Server

Quick Start Guide

Overview
MATLAB Web App Server™ lets you host MATLAB® apps and Simulink® simulations as interactive web apps. You
can create apps using App Designer, package them using MATLAB Compiler™, and host them using MATLAB Web
App Server. Your end users can access and run the web apps using a browser without installing additional software.

Preparing for Product Installation


You can install MATLAB Web App Server on Windows®, Linux®, and macOS. Review the specific supported versions
and platforms. When sizing the server, MathWorks recommends using 1 processor core (or virtual core) per 4
workers and 1GB RAM per worker (end user). For example, provide a 4-core, 16GB RAM machine to serve web apps
to 16 end users. MATLAB Web App Server requires a separate network license manager. The license manager needs
minimal resources to run. A single-core machine with 2GB of RAM will suffice. Obtain the Mac address of the
system running the license manager, as you will need it to generate your license file (use the command ipconfig /all
on Windows or ifconfig on Linux and macOS to determine the Mac address).
Obtain your File Installation Key (FIK) and License File from MathWorks License Center and specify the Mac
address of the license server in the Host ID field.

Installing MATLAB Web App Server Product


Install MATLAB Web App Server using the installation media or the online installer. On Windows, run setup.exe.
On Linux, run ./install. Select File Installation Key Based Installation and enter the FIK you obtained from the
MathWorks License Center. When asked which products to install, select MATLAB Web App Server.

Installing MATLAB Runtimes


You must individually install each version of MATLAB Runtime that you wish to support on your MATLAB Web
App Server installation. Download the appropriate MATLAB Runtime installers corresponding to your operating
system and install them on your MATLAB Web App Server machine.

Installing the Network License Manager


If your organization already has a network license manager running, you can skip this step and add the MATLAB
Web App Server license file to your existing license file on the license server. Copy the contents of the new license
file into the old one beneath the # END-----------------END-----------------END line at the bottom of the license file.
Restart the license server to apply those changes.

mathworks.com
If you do not have license manager installed, you can install it using MATLAB installer.
1. Run MATLAB installer and select the “Log in with a MathWorks Account”.
2. Accept the Software License Agreement.
3. Sign in using your MathWorks Account email address and password.
4. Select your MATLAB Web App Server license number from the list of linked licenses.
5. Choose the installation folder.
6. Select the “License Manager” from the list of products to install.
7. When prompted, browse to the “license.lic” file downloaded from the MathWorks License Center.
8. To start the license manager to start at boot time, select “Configure the license manager as a service”
(Windows only).
For more information, refer to the article, How do I install or update the Network License Manager?
On Windows systems, the license manager starts automatically. For Linux systems, start the license manager using
the ./lmstart script in the etc directory, which is within the installation directory you specified during the install
process. By default, the license manager will listen for license checkout requests on port 27000. For more
information, refer to the license manager installation and management documentation.

Setting up MATLAB Web App Server


1. As an administrator, run the webapps-setup script from MATLAB Web App Server scripts directory.
The default location is:

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. Enter information about the license manager 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
3. Specify a user account to run the server service and the apps service. To use the default account, press Enter.
4. 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 installations on your machine as long as they are installed in the default
installation location. If you do not have a MATLAB Runtime version installed, you can press Enter to continue
with the rest of the setup process. After setting up your license manager, run webapps-runtime script to specify
the server to use with MATLAB Web App Server.
5. To start the server, run webapps-start script. A message appears to indicate the server is running with a URL for
MATLAB Web Apps homepage. Save the URL.

mathworks.com
Command-Line Scripts for Windows, Linux, and macOS

webapps-setup Set up MATLAB Web App Server


webapps-config Configure MATLAB Web App Server
webapps-runtime Configure MATLAB Runtime for use with MATLAB Web App Server
webapps-uninstall Uninstall MATLAB Web App Server services
webapps-start Start MATLAB Web App Server service
webapps-stop Stop MATLAB Web App Server service
webapps-status Get status of MATLAB Web App Server

Create, Deploy, and Run Web App (Requires MATLAB and


MATLAB Compiler Installation)

Create Web App


From the MATLAB desktop, launch the Web App Compiler from the app gallery or type webAppCompiler at
the MATLAB command prompt. Select the MATLAB app you want to package as a web app, enter the required
metadata, and click Package to generate a web app archive.

Deploy Web App


You can deploy web apps to the server in one of two ways:
Option 1: Copy the web app archive (.ctf file) generated by Web App Compiler (in MATLAB Compiler) to the apps
folder configured by the server. The default location is:
Windows %ProgramData%\MathWorks\webapps\R2020a\apps
Linux /local/MathWorks/webapps/R2020a/apps
macOS /Library/Application Support/MathWorks/webapps/R2020a/apps

Option 2: This option requires that Authentication and Role-Based Access are enabled on the server, and you are
designated as an author while configuring Role-Based Access. From the MATLAB Web App Server home page:
1. Login.
2. Click Manage Apps > Upload App.
3. Select the file webAppArchiveName.ctf and click Open to upload the web app.

Run Web App


Go to MATLAB Web Apps home page and click the web app tile to run it.

Additional Resources
• MATLAB Web App Server System Requirements
• MATLAB Web App Server Documentation
• MATLAB Runtime Installer Download
• MathWorks Installation Support

mathworks.com

© 2020 The MathWorks, Inc. MATLAB and Simulink are registered trademarks of The MathWorks, Inc. See mathworks.com/trademarks for a list of additional trademarks.
Other product or brand names may be trademarks or registered trademarks of their respective holders.

You might also like