How can I download and configure the MATLAB Runtime installer for use with MATLAB Compiler?

45 views (last 30 days)
How can I download and configure the MATLAB Runtime installer for use with MATLAB Compiler? This is required for using the "Runtime included in package" option in Application Compiler or Library Compiler, or for creating a custom MATLAB Runtime installer on an offline machine (available since R2024b+).

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 10 Oct 2025
Edited: MathWorks Support Team on 10 Oct 2025
It is important to download the MATLAB Runtime installer that matches your MATLAB release and update level according to the "version" MATLAB command (for example, R2024a Update 6). Consider one of the following options:

Option 1: Use "compiler.runtime.download" for online installations

If MATLAB has internet access, use the 'compiler.runtime.download' command to let MATLAB download the installer for you:
>> compiler.runtime.download
This option is recommended because it will download the exact MATLAB Runtime installer that matches your MATLAB release and update level. The ZIP file will be downloaded directly from the MathWorks website to your system's TEMP folder. Due to the file size of the monolithic installer (typically 2-5GB), this may take some time. Once the download is complete, MATLAB will display the exact location of the installer, for example:
MATLAB Runtime installer has been downloaded to:
"C:\Users\username\AppData\Local\Temp\username\MCRInstaller24.1\MATLAB_Runtime_R2024a_Update_6_win64.zip"
The MATLAB Compiler preferences will also be updated to reflect this location.
Note: The TEMP folder is intended for temporary files and may be cleared by the system. We recommend moving the installer to a permanent location to prevent accidental loss. To ensure the Application Compiler can find the installer in its new location, follow these steps: 
  1. Open MATLAB.
  2. Go to the HOME tab in the upper left corner.
  3. Click on "Preferences" (gear icon).
  4. In the left pane, select "MATLAB Compiler".
  5. In the right pane, under "MATLAB Runtime Installer Location", enter the full path to the MATLAB Runtime installer file as shown in the screenshot below:

Option 2: Direct URL download

If your machine is offline, or the download via MATLAB fails, the "compiler.runtime.download" function will display a message with the direct URL to download the appropriate MATLAB Runtime installer for your MATLAB release and update level (since R2020a). You can also use the following (undocumented) command to obtain the correct URL:
>> com.mathworks.toolbox.compiler.MatlabRuntimeUtils.getMCRInstallerDownloadURL
After you manually download the installer and copy the ZIP onto the MATLAB machine, update the MATLAB Compiler preference to point to this installer as shown in the instructions above. You do NOT need to run the installer.

Option 3: Use the MATLAB Runtime download page

By downloading the MATLAB Runtime installer from the table on our MATLAB Runtime Download Page, you will receive the installer for the latest update of the selected major release:
To package this runtime installer with your application, you need to ensure your MATLAB installation uses the latest update level as well using these instructions.
If you cannot update MATLAB to the latest update level, and don't currently have access to MATLAB to obtain the correct URL for the matching MATLAB Runtime installer, see the following MATLAB Answer on how to construct the URL manually:
For more information on update level compatibility with MATLAB Compiler, see:

More Answers (0)

Categories

Find more on Introduction to Installation and Licensing in Help Center and File Exchange

Products


Release

R2024a

Community Treasure Hunt

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

Start Hunting!