Main Content

Update or Modify Network License Files

About Network Licenses

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:

Inside the Network License File

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.

  • Each 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---------------BEGIN---------------BEGIN
# MATLAB license passcode file.
# LicenseNo: 123456           HostID: 6C4B905F446E
# R2021b
INCREMENT MATLAB MLM 46 30-jan-2025 13 FDC7243F4976  \
        VENDOR_STRING=vi=0:at=200:ae=1:lu=300:lo=CN:ei=1234567:lr=1:2p=0:  \
        DUP_GROUP=UH asset_info=123456 ISSUED=21-Nov-2021 BORROW=720  \
        NOTICE=product=MATLAB SN=123456 SIGN="00C8 0547 EFDF 50D7 B9CE  \
        4C9D 3348 561B E9E3 6CCA 7986 C2F6 38C8 794F EE84"
INCREMENT SIMULINK MLM 46 30-jan-2025 1 7DE4D05FF067  \
        VENDOR_STRING=vi=0:at=200:ae=1:lu=300:lo=CN:ei=1234567:lr=1:2p=0:  \
        DUP_GROUP=UH asset_info=123456 ISSUED=21-Nov-2021 BORROW=720  \
        NOTICE=product=SIMULINK SN=123456 SIGN="00BE C534 0A32 1821  \
        AFCE D040 2085 3E00 9005 4983 7EFB 875F E4A7 FEE6 9548"

License Processing

When you install the network license manager or MATLAB software, the installer processes the network licenses for use on the server and client machines, respectively:

During Network License Manager Installation on Server

On the server, the installer:

  • Makes a copy of the network license file named license.dat, processes the file to add the SERVER and DAEMON lines, and puts this copy in the /etc folder where you are installing the network license manager.

  • The SERVER line identifies the server host and port number. The DAEMON line identifies the name of the network license manager daemon.

  • For Network Named User licenses, when the installer 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 MAC address is 03:42:f8:1b:b2:72, the SERVER and DAEMON lines in your license file would look like this:

    SERVER thunderball 03:42:f8:1b:b2:71
    DAEMON MLM "C:\Program Files\MATLAB\R2024a\etc\win64\MLM.exe" \
                options="C:\Program Files\MATLAB\R2024a\etc\mlm.opt"

During MATLAB Installation on Client Computer

First, you must copy the license.dat file configured during the installation of the network license manager and put it either on the client machine or somewhere network accessible before you can run the installer.

Then, during installation, the installer creates a copy of license.dat, and processes it to remove 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 products.

It names this configured file network.lic and puts the file in matlabroot\licenses.


Do not give users the license file you download from License Center. They can install only with the license file that was specially configured during the installation of the network license manager.

MATLAB License Search Path

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:

  1. 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.

  2. Environment variables MLM_LICENSE_FILE and LM_LICENSE_FILE.

  3. The profile folder of the person starting the program

  4. The \licenses folder in the MATLAB installation for files named license.dat or any file with the extension .lic.

When MATLAB is checked out from a network license server, all toolbox checkouts in that same session will also come from that license server. If a license file on the path is not a server license (that is, it is a standalone license file for Individual, Designated Computer, or Trial), toolboxes can still be checked out from that file or from the license server.

Set MATLAB License Search Path

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 -c option.

    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 variable.

    MLM_LICENSE_FILE specifies the location of the license file for MathWorks products. MATLAB searches for this environment variable first.


Although you can set the environment variable LM_LICENSE_FILE, use of this variable is discouraged as it affects all Flex-enabled products. Instead, use <VENDOR>_LICENSE_FILE.


If you use the environment variable MLM_LICENSE_FILE, you must delete matlab/licenses/network.lic.

Update Network License

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 Get New MATLAB Release.

You must be a license administrator to perform a license file update.

To update the license file on the server:

  1. Go to the License Center on the MathWorks website and sign in to your account.

  2. Select the licenses you want to update.

  3. Click Install and Activate.

  4. Get the license file for the server you are updating.

  5. Stop the network license manager.

  6. 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:

    1. In the existing license, delete all content except the SERVER and DAEMON lines at the top of the file.

    2. In the new license, copy all content starting from below the SERVER and DAEMON lines to the end.

    3. Paste the copied content into the existing license below the SERVER and DAEMON lines.

    4. 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.

  7. 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.

  8. 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".

Related Topics

External Websites