What is the licensing order and license file search path for MATLAB?

124 views (last 30 days)
What is the order that MATLAB will use to search for licenses as of MATLAB R2008a or later?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 15 Sep 2023
Edited: MathWorks Support Team on 15 Sep 2023
MATLAB will first look for a license_info.xml file. 
If this file sets the licensing mode (licmode) to "online" or "onlinelicensing", then MATLAB will ignore all other license paths and files, and will instead communicate with MathWorks to authenticate your license. 
For more info on what the license_info.xml file should look like, and its file locations, please refer to the following article:
What does the license_info.xml file look like for New Licensing Technology and where should it be saved?
If the file does not exist or sets the licensing mode to "file", then MATLAB will search for licenses in the following order. In the below paths, note that "R20XXx" would pertain to your specific release, i.e. R2022b. 
  1. Any license files or license servers specified with the -c startup flag override all other entries on the license search path.
  2. MATLAB will check against the registry keys
    • HKEY_LOCAL_MACHINE\Software\FLEXlm License Manager\MLM_LICENSE_FILE
    • HKEY_LOCAL_MACHINE\Software\FLEXlm License Manager\LM_LICENSE_FILE
    • On Unix, it will check for /home/$USER/.flexlmrc instead
  3. MATLAB will check against the environment variables MLM_LICENSE_FILE or LM_LICENSE_FILE.
    • LM_LICENSE_FILE is checked first if both are set
  4. MATLAB will check the user's userprofile or home location
    • On Windows, this will be %appdata%\MathWorks\MATLAB\R20XXx_licenses
      • For example, C:\Users\username\AppData\Roaming\MathWorks\MATLAB\R2021a_licenses\
    • On Linux, this will be /home/$USER/.matlab/R20XXx_licenses
      • For example, /home/user/.matlab/R2021a_licenses/
    • On macOS, this will be /Users/$USER/Library/Application Support/MathWorks/MATLAB/
      • For R2016b and older /home/user/.matlab/R2021a_licenses/
  5. MATLAB will check in the "licenses" folder under the MATLAB installation. 
    • On Windows, this will be C:\Program Files\MATLAB\R20XXx\licenses
    • On MacOS, this will be /Applications/MATLAB_R20XXx/licenses
    • On Linux, this will be /usr/local/matlab/licenses
Note: In the license file locations, MATLAB will search for a license.dat first and then any .lic in alphabetical order.

More Answers (0)

Categories

Find more on Manage Products in Help Center and File Exchange

Tags

No tags entered yet.

Products


Release

R2008a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!