I couldn’t find any installation tutorials for Matlab Production Server across the entire network. After several days of studying the official documentation, I finally managed to figure it out by chance. In fact, Matlab Production Server is a standalone program that shares the same installation package as Matlab. The official documentation also requires us to have a separate installation key and license file, so we can proceed with the normal download and installation of the MATLAB software.
1. Download MATLAB 2024a
Follow the WeChat public account [火耳软件安装] to find MATLAB 2024a in the software directory.
2. Install Matlab Production Server
2.1 Extract the Installation Package
Extract the downloaded program to obtain three files, with the license file located in the Crack folder as license.lic.
2.2 Perform the Installation
Open R2024a_Windows.iso and run the setup.exe file to enter the installation interface. Pay special attention to the installation key screen; different keys install different programs. Below are the installation keys I have compiled:
MATLAB Production Server (install only Matlab Production Server)
40236-45817-26714-51426-39281
Other MATLAB Programs (normal installation)
21471-07182-41807-00726-32378-34241-61866-60308-44209-03650-51035-48216-24734-36781-57695-35731-64525-44540-57877-31100-06573-50736-60034-42697-39512-63953
After entering the key, you need to add the license file. Find the license.lic file in the Crack folder and add it.
Continue with the next steps until the installation is complete.
2.3 Add Environment Variables
The default installation folder is C:\Program Files\MATLAB\MATLAB Production Server\R2024a. Use your actual installation folder path as a reference. Since I installed it in the default folder, I used %folder path%\script for configuration.
C:\Program Files\MATLAB\MATLAB Production Server\R2024a\script
To verify the installation of Matlab Production Server, open a cmd window and enter mps-status. If the command is recognized and an error is reported, the installation is successful.
2.4 Replace POJIE Files
Find the libmwlmgrimpl.dll file in the Crack\bin\win64\matlab_startup_plugins\lmgrimpl folder and replace it with the one in your MATLAB Production Server installation path. I installed it in the default path, as follows:
Find the libmwlmgrimpl.dll in the POJIE folder:
Crack\bin\win64\matlab_startup_plugins\lmgrimpl\libmwlmgrimpl.dll
Replace the libmwlmgrimpl.dll file in the MATLAB Production Server installation directory:
C:\Program Files\MATLAB\MATLAB Production Server\R2024a\bin\win64\matlab_startup_plugins\lmgrimpl\libmwlmgrimpl.dll
3. Install the Runtime Environment
You must separately install the runtime environment. Download it from the official website according to your Matlab version.
Refer to the official documentation for installation: https://ww2.mathworks.cn/help/mps/server/install-the-matlab-runtime.html
Download the official Matlab runtime environment package: https://ww2.mathworks.cn/products/compiler/matlab-runtime.html
Install MATLAB Runtime
4. Start
Refer to the official documentation: https://ww2.mathworks.cn/help/mps/server/setup-and-log-in-to-matlab-production-server-dashboard.html
Do not proceed further here.
Open a command line window in the folder C:\Program Files\MATLAB\MATLAB Production Server\R2024a\dashboard by typing cmd, then enter mps-dashboard.bat setup and add the workspace folder E:\mps\dashboard.
An error will be reported as follows: No execution permission.
You can proceed as follows:
Open PowerShell as an administrator, navigate to the folder using the cd command, and execute ./mps-dashboard.bat setup, adding the workspace E:\mps\dashboard.
cd ‘.\Program Files\MATLAB\MATLAB Production Server\R2024a\dashboard\’
./mps-dashboard.bat setup
Your workspace E:\mps\dashboard
Execute ./ mps-dashboard.bat start to start the page.
./mps-dashboard.bat start
Open the page through a browser, with the default username and password both being admin.
5. Add Service Instances
Although the service can start, many issues arise when starting instances, such as the Matlab runtime environment not being configured and license file verification failures. If you encounter these issues, you can refer to the solutions in section 6.
5.1 Create a Server
5.2 Upload an Instance
You need to upload a .ctf deployable file during the upload.
Mount the instance; one service can mount multiple instances.
6. Errors and Solutions
6.1 Matlab Runtime Environment Not Added
When creating a new instance, adding a name and details, and clicking start, an error occurs indicating that the Matlab runtime environment is not configured.
Refer to the official documentation: https://ww2.mathworks.cn/help/mps/server/mpssetup.html
You can globally configure the Matlab runtime environment by executing the mps-setup [ mcrroot ] command, or you can modify the runtime environment folder in the interface and add it to MATLAB Runtime.
Execute the command mps-setup ‘C:\Program Files\MATLAB\MATLAB Runtime\R2024a’
mps-setup ‘C:\Program Files\MATLAB\MATLAB Runtime\R2024a’
6.2 License Verification Failure Cannot Start Instance
License verification fails.
Starting the instance via the command line also fails.
The error is caused by not placing the corresponding dll file in the system after installing MATLAB Production Server. Find the file in the POJIE folder:
Crack\bin\win64\matlab_startup_plugins\lmgrimpl\libmwlmgrimpl.dll
Replace the libmwlmgrimpl.dll file in the MATLAB Production Server installation directory:
C:\Program Files\MATLAB\MATLAB Production Server\R2024a\bin\win64\matlab_startup_plugins\lmgrimpl