Install License Key
This page is applicable for the latest image version
mcx-rtos-v.2024.01. For other mcx-rtos-images checkout: Older versions.
Motorcortex Libraries require a
[hardwarekey].lic) file to run in a production environment. This section will explain how to acquire and install
license.lic file. You can always run your Motorcortex application without a license key, but the program will exit after 30 minutes.
- Motorcortex.io account
- Motorcortex Controller with running a application connected to laptop
Log into the Motorcortex controller from the console using a screen and keyboard or through ssh as described in Remote Access & File Transfer.
Acquire The License File.
For generating a license file the controller Hardware key is needed.
Email this hardware key and list of components to
You wil receive a
123456789.licfile trough E-mail, where the filename corresponds to the Hardware Key.
Installing the license file on the controller.
The license file can be stored in any location on the controller and can have any filename, as long as the “license” tag in the config.json file points to this file.
You can therefore add the license file into the configuration package so you can deploy it through the portal. The drawback is that for every controller hardware, you need to have a separate configuration package. The solution is to install the license in a differnt location than the configuration folder, so it does not get overwritten if you deploy the configuration and the license file stays with the machine.
Preferred method: install the license file in /etc/motorcortex
The license file can be stored in a location that is not affected by deploying a configuration. The license now stays with the controller regardless of the configuration that is deployed. A convenient location for the license is
/etc/motorcortex/, this file directory is not overwritten when deploying a new configuration.
If you upgrade mcx-os this procedure has to be repeated.
Inside config.json change license path to:
copy the license to the controller via ssh
scp 123456789.lic firstname.lastname@example.org:. This will copy the license to the admin home folder: /home/admin/123456789.lic.
Log into the controller and move the license file to
/etc/motorcortex/with following command:
sudo mv /home/admin/123456789.lic /etc/motorcortex/
- To make sure that the target name of the license file in the config.json file is a generic name, like “license.lic”, so you can deploy the configuration to any hardware without having to adjust the name of the license file every time, you can create a symbolic link with that generic name “license.lic”:
ln -s 123456789.lic license.lic
- Confirm if the
symbolic linkis created:
In the output you should see:
license.lic -> 123456789.lic
license is bound to the controller hardware and will not be overwritten when deploying a configuration.
Installing the license in the configuration package
Go to login to your
motorcortex.ioaccount and open
Browse to the configuration package.
123456789.licfile in the configuration package (if you have to upload the file press
UPLOADtab on the right).
line #10change “licence.pem” to the name of your
Press save and exit the file.
Now you can deploy the configuration to the controller and the license should be correctly installed.
Check If The License File Is Valid
A license file is
valid if it matches the controllers
Hardware Key and application:
List of Components and
List Of Features. The status of the license can be seen in the log of the motorcortex application:
mcx-lastlog | grep License
If your license check turns out
invalid: check if your
List Of Components and
List Of Features matches your application.