Network licenses contain the encrypted passcodes for each product that your organization is licensed to install and run.
In general, you do not need to modify the network license file on the server or on the client computers. However, in some situations, you must edit the license file:
When you change the license server name (for example, if the license is now being hosted on a new server). See Update Network License.
When you change the port number (for example, if the port address for the server has changed). The following support article contains instructions for migrating MATLAB client installations: "Migrate MATLAB Client Installations to New License Server".
When you update the network installation with a new license file. See Update License File on License Server on the MathWorks® website.
The network license file is a specially formatted ASCII text file that contains encrypted product passcodes for each product you are licensed to run. Each product passcode identifies the number of keys available for that product. The network license manager grants or denies access to a product depending on the availability of the license keys associated with each product.
INCREMENT line identifies a product, the number of
keys available for the product, and other information. (The
INCREMENT lines in your license file might not include
every element shown in the example.)
The backslash (
\) character indicates that the line
continues onto the next line.
The lines that begin with a pound sign (#) are comments. The MathWorks installer uses the information in these comment lines such as license server host ID or Internet address when it processes the license file during installation.
# BEGIN-------cut here-------CUT HERE-------BEGIN # MATLAB license passcode file. # LicenseNo: 12345 HostID: INTERNET=184.108.40.206 INCREMENT TMW_Archive MLM 18 01-sep-2015 0 \ BC9DE773A77D15AF8 VENDOR_STRING=83 HOSTID=DEMO SN=12345 INCREMENT MATLAB MLM 18 01-sep-2015 1 \ 4C9D3348561BE9E3B USER_BASED DUP_GROUP=U SN=12345 INCREMENT SIMULINK MLM 18 01-sep-2015 1 \ 1CD148466EF58DF8B USER_BASED DUP_GROUP=U SN=12345 INCREMENT Signal_Toolbox MLM 18 01-sep-2015 1 \ 6CF74B458BA143DC3 USER_BASED DUP_GROUP=U SN=12345 # END---------cut here-------CUT HERE-------END
When you install MATLAB® software, the installer processes the network license file:
On the server, the installer:
Makes a copy of the network license file named
and puts this copy in the
/etc folder of the MATLAB installation folder.
SERVER line and a
DAEMON line to
the file. The
SERVER line identifies the server host and port
DAEMON line identifies the name of the network
license manager daemon.
Stores the processed license file in
matlabroot is the MATLAB installation folder.
When it creates an options file during installation, it also adds the
Options= syntax to the
DAEMON line in
your license file. This syntax specifies the path name of the options file.
For example, if your server is named
thunderball and its IP
address is 220.127.116.11, the
DAEMON lines in your license file would look like
SERVER thunderball INTERNET=18.104.22.168 27000 DAEMON MLM "C:\Program Files\MATLAB\R2020a\etc\win64\MLM.exe" \ options="C:\Program Files\MATLAB\R2020a\etc\mlm.opt"
On the client computer, the installer:
Creates a copy of the license file you specify named
network.lic, and puts the file in the
\licenses folder in the MATLAB client installation folder.
Deletes all the
INCREMENT lines and the
DAEMON line in the license file, leaving the
SERVER line. It also adds the statement
USE_SERVER to the file. This line points the client to
the network license file on the server, which contains all the passcodes for the
MATLAB reads the license file at startup to check for product licensing. MATLAB searches for the license file in the following locations, in the specified order:
The license file specified on MATLAB startup command line using the -c option. The -c option overrides the entire search order and uses only what was specified on the command line. This is the only path MATLAB searches.
The profile folder of the person starting the program
\licenses folder in the MATLAB installation for files named
license.dat or any
file with the extension
After it finds a MathWorks license file, MATLAB stops searching.
By default, MATLAB installs the license file on the client computer in the
\licenses folder in the MATLAB client installation folder. However, you can override that location in
one of either of the following ways:
Specify the path to the license file on the command line during
MATLAB startup using the
The -c option overrides the entire search order, including environment variables, and uses only what was specified on the command line. This is the only path MATLAB searches.
You can specify a list of paths to search. When using the
-c option, keep in mind the following:
If the path to your license file contains a space, enclose the path name in quotation marks.
If you are specifying more than one license file, make sure to enclose the entire list of license files in quotation marks.
Set environment variables.
Specifies the location of the license file, but only for MathWorks products. (Recommended, because it affects only
MathWorks products.) MATLAB searches for this environment variable first.
Specifies the location of the license file for all applications
using the network license manager on this server. It is not
recommended that you use this environment variable, as if affects
all Flex-enabled products.
You can use one option or the other, but not both.
When you receive a new license from MathWorks because the products or seat counts have changed, plan to update the license file on the network server at a time when users are least likely to be accessing a MATLAB license. This procedure requires you to stop and start the network license manager (do not perform a re-read as it can interfere with certain licenses).
This procedure assumes you are not updating the license manager software at this time. If you are, also see Update Network License Manager Software.
Do not follow this procedure to upgrade to a new release of MATLAB. To upgrade to a later release, see Upgrade MATLAB Release.
You must be a license administrator to perform a license file update.
To update the license file on the server:
Go to the License Center on the MathWorks website and sign in to your account.
Select the licenses you want to update.
Click Install and Activate.
Get the license file for the server you are updating.
Stop the network license manager.
Open both the existing license on the server and the new license in an editor. You are going to copy most of the new license into the old license with these instructions:
In the existing license, delete all content except the SERVER and DAEMON lines at the top of the file.
In the new license, copy all content starting from below the SERVER and DAEMON lines to the end.
Paste the copied content into the existing license below the SERVER and DAEMON lines.
Save the existing license. You can store the new license as a backup, remembering that the SERVER and DAEMON lines must be replaced with those specific to your organization.
If you have an options file, depending on how it is configured, you may have to update it. If you do not have an options file, skip this step.
Start the network license manager.
You can perform a status inquiry to confirm that the license file has been updated. The following support article contains instructions for performing a status inquiry: "Monitor the Usage of Licenses or Keys".