Skip to main content

Licensing via Environment Variables

The OPC Router can be licensed via environment variables. This method is particularly suitable for use cases involving Docker or Docker Compose. It allows you to license many systems with minimal effort.

note

An overview of the required and optional environment variables can be found here: Environment Variables for Licensing

note

A deployment token is required for licensing via environment variables. You can generate this in the license portal on the "Deployment Automation" page.

Examples​

Docker run command​

Linux​

docker run -d --pull always \
--name opcrouter5 \
-e INITIAL_USERNAME="*****" \
-e INITIAL_PASSWORD="*****" \
-e OR_I_ACCEPT_EULA=true \
-e OR_LICENSE_KEY="<license-key>" \
-e OR_LICENSE_OPCROUTERID="<router-id>" \
-e OR_LICENSE_DEPLOYMENTTOKEN="<deployment-token>" \
-e OR_INSTANCE_NAME="<instance-name>" \
-v opc-router-data:/data \
-v opc-router-logs:/var/log/opcrouter \
-p 8080:8080 \
-p 49420:49420 \
opcrouter/runtime:latest

Windows​

docker run -d --pull always `
--name opcrouter5 `
-e INITIAL_USERNAME="*****" `
-e INITIAL_PASSWORD="*****" `
-e OR_I_ACCEPT_EULA=true `
-e OR_LICENSE_KEY="<license-key>" `
-e OR_LICENSE_OPCROUTERID="<router-id>" `
-e OR_LICENSE_DEPLOYMENTTOKEN="<deployment-token>" `
-e OR_INSTANCE_NAME="<instance-name>" `
-v opc-router-data:/data `
-v opc-router-logs:/var/log/opcrouter `
-p 8080:8080 `
-p 49420:49420 `
opcrouter/runtime:latest

Docker Compose​

services:
opc_router:
image: opcrouter/runtime:latest
ports:
- "8080:8080"
- "49420:49420"
environment:
- INITIAL_USERNAME=*****
- INITIAL_PASSWORD=*****
- OR_I_ACCEPT_EULA=true
- OR_LICENSE_KEY=<license-key>
- OR_LICENSE_OPCROUTERID=<router-id>
- OR_LICENSE_DEPLOYMENTTOKEN=<deployment-token>
- OR_INSTANCE_NAME=<instance-name>
volumes:
- opc-router-data:/data
- opc-router-logs:/var/log/opcrouter
volumes:
opc-router-data:
opc-router-logs: