Learn how to install MATLAB Production Server™ on Microsoft® Windows®. This video takes you through the steps of obtaining a license from the MathWorks License Center, followed by installing the network license server, MATLAB Production Server, and whichever versions of MATLAB® Runtime are needed.
It also covers important post-installation steps, such as setting up the server for the first time and creating server instances. These steps are executed in the video using the Windows command line interface. The following link to the documentation for MATLAB Production Server also covers how to use the graphical dashboard to manage the post-installation steps: https://www.mathworks.com/help/mps/
This video takes you through the process of installing MATLAB Production Server on-premises and start a server instance. This example uses the Windows command line for server creation, configuration, and startup.
Before you begin, make sure you have all of the following:
First, activate your license by signing in to the MathWorks License Center with your MathWorks Account. Find the license for MATLAB Production Server and click on it. Go to the Install and Activate tab, then click Activate to Retrieve License File. Enter the fixed MAC address of the license server into the Host ID field, and give this activation a name you can easily identify.
On the next screen, download the license file. You’ll need this later. Also, note that if you want to perform an offline installation, you’ll need this File Installation Key.
Now that your license is activated, you’ll need to download the MathWorks installer. You can navigate there by going to Manage Products tab, where you can quickly direct yourself to the MathWorks Downloads page. Choose your product version, select your operating system, save the installer, and launch it from the setup .exe.
Here, you’ll install the Network License Manager, which manages software licenses for MathWorks products. Instead of signing in, click Advanced Options > I want to install network license manager. After accepting the terms of the license agreement, you’ll need to provide the path to the license file you downloaded earlier. Find the license file, proceed to the next page where you’ll specify the installation folder for the Network License Manager, and leave the option selected to install the license manager as a Windows service. Make sure everything looks good, and click Begin Install.
After the license manager is installed, you must start it up using the license management utility contained in lmtools.exe. You can find it in the etc folder of your license manager installation. Go to the Start/Stop/Reread tab and simply click Start Server. Go to the Server Status tab and perform a status enquiry to verify that the license manager was successful in reading the MATLAB Production Server license file. This will be indicated by text that enumerates the total number of licensed workers.
Now that the license manager has started, return to the MathWorks installer and install MATLAB Production Server. After signing in and accepting the license agreement, you’ll see a list of licenses associated with your account. Select the one for MATLAB Production Server, then select the folder where you want to install it. You’ll be prompted to select a license file, which is NOT the same as the license file downloaded from the License Center. Instead, navigate to the etc folder of your license manager installation, and choose the license.dat file. It contains information for linking to the license server, including the host and port name. On the next screen, make sure MATLAB Production Server is selected, and after confirming the details, click Begin Install.
After the installation is complete, you’ll see the final steps to set up your environment to use MATLAB Production Server, the most important of which is installing MATLAB Runtime on your system. Optionally, you can add the script folder mentioned here to your system PATH environment variable, which gives the administrative convenience of being able to run MATLAB Production Server commands from any folder.
Let’s talk a bit about MATLAB Runtime, which is a standalone set of shared libraries that can be downloaded by anyone, even if they don’t have any MathWorks-related licenses. It enables the execution of compiled MATLAB applications and components, even on computers that do not have MATLAB installed.
As mentioned here, MATLAB Production Server will work with the last six versions of MATLAB Runtime. You might need to install multiple releases of MATLAB Runtime, depending on which releases of MATLAB were used to compile the applications you plan to deploy.
Download and install the relevant versions of MATLAB Runtime from the MathWorks website. This example downloads the one for Release 2020a on Windows. The installation process is very straightforward: find the setup .exe, accept the license agreement, choose the installation folder, and Install. Repeat this process for any other versions you require.
After the MATLAB Runtime installation is complete, you’ll need to configure all the server instances that you create with MATLAB Production Server to use the versions of MATLAB Runtime you install. Simply open a command prompt with admin privileges, and navigate to the script folder of your MATLAB Production Server installation. The mps-setup command will search your system for all installed MATLAB Runtime versions. Follow the prompts to set the default version of MATLAB Runtime to be used by all server instances.
Now we can create an instance of MATLAB Production Server that can run packaged applications. Use the mps-new command with a server name of your choosing. To start that server instance, use mps-start with the -C option and the server name.
Use mps-status with the -C option and the server name, and look for the text indicating that a license has been checked out to verify that your server is running.
Using commands with the Windows command prompt enables you to automate these administrative processes, but do note that you can use a browser-based dashboard interface to create, configure, and manage your server instances. You can learn more about the browser interface and find answers to other questions in the online documentation for MATLAB Production Server.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .Select web site
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.