Use this guide to activate and rehost licenses in an offline container. We recommend binding persistent volumes so entitlements survive container restarts/crashes.
Important
Once a license is activated in a container, it is tied to that specific container instance. To move the license to another container or host, you must rehost (deactivate) it from the original container first. You cannot directly transfer licenses between different container instances without rehosting.
- Docker container running (see
container-setup.md) - Valid FactoryTalk® Optix™ entitlement key
- Access to an online machine with FactoryTalk® Optix™ Entitlement CLI installed
- Persistent volumes configured (recommended)
An activation request is a file containing specific information needed to activate a license. It must be generated by the offline container's Entitlement Cli. It must be processed by an online platform's Entitlement Cli.
A rehost request is a file containing specific information needed to rehost (deactivate, free) a license. It must be generated by the offline container's Entitlement Cli. It must be processed by an online platform's Entitlement Cli.
There are two ways to transfer request and entitlement files between the host and the container:
- Recommended: Using mounted persistent volumes to share request and entitlement files between the host and the container
- Alternative: Using manual copy procedure to copy request and entitlement files between the host and the container
This is the recommended way to manage offline licensing in Docker containers, as it allows entitlements and request files to persist across container restarts and be easily accessible from the host machine, simplifying the offline activation and rehosting workflows.
Persistent volumes allow entitlements and request files to survive container restarts and be accessible from the host machine.
Before running the container, create the host directories:
sudo mkdir -p /opt/Rockwell_Automation/docker_entitlement
sudo mkdir -p /opt/Rockwell_Automation/docker_request
sudo chmod 755 /opt/Rockwell_Automation/docker_*docker run -itd -p 49100:49100 -p 50080:80 -e ADMIN_PASSWORD=YourSecurePassword -v /opt/Rockwell_Automation/docker_entitlement:/opt/Rockwell_Automation/entitlement -v /opt/Rockwell_Automation/docker_request:/opt/Rockwell_Automation/request --name optix-runtime-container optix-runtime-imagedocker exec -it optix-runtime-container /bin/bash| Location | Host Path | Container Path |
|---|---|---|
| Entitlements | /opt/Rockwell_Automation/docker_entitlement/ |
/opt/Rockwell_Automation/entitlement/ |
| Requests | /opt/Rockwell_Automation/docker_request/ |
/opt/Rockwell_Automation/request/ |
Note
Under Ubuntu and Debian, entitlements are read from /opt/Rockwell_Automation/entitlement/ inside the container. Files written to the container path are automatically accessible on the host via the mounted volume.
Use this workflow to activate a license in an offline container.
Inside the container, generate a request file for your entitlement key:
FTOptixEntitlementCli --offlineActivate --entitlementKey AAAAA-BBBBB-CCCCC-DDDDD-EEEEE --outputActivationRequestFile /opt/Rockwell_Automation/request/You should see a message like:
Exported the Activation Request file for entitlement AAAAA-BBBBB-CCCCC-DDDDD-EEEEE to /opt/Rockwell_Automation/request/AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.reqThis generates /opt/Rockwell_Automation/request/AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.req.
This request is visible on the host under /opt/Rockwell_Automation/docker_request/AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.req
Note
If you get any message like /dev/eei_dir/eeprom: No such file or directory, OPEN ERROR 2, TAG_Open(TA) 0 ERROR: -1110 -1110, or Kubernetes service account token file not found, you can safely ignore it. These messages are expected if the current device does not support those bindings and do not affect the licensing process, a different technique will be used by the licensing tool and the procedure will continue as normal.
Use the FactoryTalk® Optix™ Entitlement CLI on the online host to process the request and obtain the entitlement.
Run the following command on the online machine:
sudo FTOptixEntitlementCli --onlineActivate --activationRequestFile /opt/Rockwell_Automation/docker_request/AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.req --outputEntitlementFile /opt/Rockwell_Automation/docker_entitlementYou should see a message like:
Entitlement activated successfully
Entitlement successfully savedIf successful this generates entitlement file which is visible on host under /opt/Rockwell_Automation/docker_entitlement/AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.ent.
In the container it should be visible under /opt/Rockwell_Automation/entitlement/AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.ent.
As the entitlement volume for docker is mounted, the entitlement should be automatically visible in the container. Verify the installed entitlements with:
FTOptixEntitlementCli --showInstalledEntitlementYou should see your entitlement in the list:
AAAAA-BBBBB-CCCCC-DDDDD-EEEEE Check the details of your specific entitlement:
FTOptixEntitlementCli --showDetails --entitlementKey AAAAA-BBBBB-CCCCC-DDDDD-EEEEEYou should see details about the entitlement similar to:
Entitlement Key: AAAAA-BBBBB-CCCCC-DDDDD-EEEEE
Status: Valid
Entitlement Type: optix-runtime-s
Host Type: Container
Tenant ID: 12345678901234567890123456789012
CPU Architecture: x86
Operating system: LinuxUse this workflow to free an activated license for usage on other instance.
Inside the container, generate a rehost request file for your entitlement key:
FTOptixEntitlementCli --rehost --entitlementKey AAAAA-BBBBB-CCCCC-DDDDD-EEEEE --outputRehostRequestFile /opt/Rockwell_Automation/request/You should see a message like:
Exported the Rehost Request file for entitlement AAAAA-BBBBB-CCCCC-DDDDD-EEEEE to /opt/Rockwell_Automation/request/AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.reqThis request is visible on the host under /opt/Rockwell_Automation/docker_request/AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.req
Run the following command on the online machine:
sudo FTOptixEntitlementCli --rehost --rehostRequestFile /opt/Rockwell_Automation/docker_request/AAAA-BBBBB-CCCCC-DDDDD-EEEEE.reqYou should see a message like:
Entitlement rehosted successfullyCheck the details of your specific entitlement to confirm the rehost was successful:
FTOptixEntitlementCli --showDetails --entitlementKey AAAAA-BBBBB-CCCCC-DDDDD-EEEEEYou should see that the entitlement is not found:
Entitlement not foundThis is an alternative way to manage offline licensing in Docker containers, using docker cp to manually copy request and entitlement files between the host and the container. It is less convenient than using mounted persistent volumes, but can be used if volume mounting is not possible.
In this setup, we need no special configuration when running the container.
docker run -itd -p 49100:49100 -p 50080:80 -e ADMIN_PASSWORD=YourSecurePassword --name optix-runtime-container optix-runtime-imagedocker exec -it optix-runtime-container /bin/bashUse this workflow to activate a license in an offline container.
Inside the container, generate a request file for your entitlement key:
FTOptixEntitlementCli --offlineActivate --entitlementKey AAAAA-BBBBB-CCCCC-DDDDD-EEEEE --outputActivationRequestFile /docker/example/activation/request/pathYou should see a message like:
Exported the Activation Request file for entitlement AAAAA-BBBBB-CCCCC-DDDDD-EEEEE to /docker/example/activation/request/path/AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.reqThis generates /example/docker/activation/request/path/AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.req inside container filesystem.
We have to copy this file to the host machine.
On the host machine run
docker cp optix-runtime-container:/docker/example/activation/request/path/AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.req /host/example/activation/request/path/AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.reqUse the FactoryTalk® Optix™ Entitlement CLI on the online host to process the request and obtain the entitlement.
Run the following command on the online machine:
sudo FTOptixEntitlementCli --onlineActivate --activationRequestFile /host/example/activation/request/path/AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.req --outputEntitlementFile /host/example/activation/entitlement/pathYou should see a message like:
Entitlement activated successfully
Entitlement successfully savedIf successful this generates entitlement file which is visible on host under /host/example/activation/entitlement/path/AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.ent.
On the host machine run
docker cp /host/example/activation/entitlement/path/AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.ent optix-runtime-container:/docker/example/activation/entitlement/path/AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.entRemember that entitlement files must be located in /opt/Rockwell_Automation/entitlement/ inside the container for it to be visible to the licensing system.
Use this workflow to free an activated license for usage on other instance.
Inside the container, generate a rehost request file for your entitlement key:
FTOptixEntitlementCli --rehost --entitlementKey AAAAA-BBBBB-CCCCC-DDDDD-EEEEE --outputRehostRequestFile /docker/example/rehost/request/pathYou should see a message like:
Exported the Rehost Request file for entitlement AAAAA-BBBBB-CCCCC-DDDDD-EEEEE to /docker/example/rehost/request/path/AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.reqThis generates /docker/example/rehost/request/path/AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.req inside container filesystem.
We have to copy this file to the host machine.
On the host machine run
docker cp optix-runtime-container:/docker/example/rehost/request/path/AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.req /host/example/rehost/request/path/AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.reqRun the following command on the online machine:
sudo FTOptixEntitlementCli --rehost --rehostRequestFile /host/example/rehost/request/path/AAAAA-BBBBB-CCCCC-DDDDD-EEEEE.reqYou should see a message like:
Entitlement rehosted successfully