Skip to main content
Version: 5.6

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="YourLicense" \
-e OR_LICENSE_OPCROUTERID="YourRouterID" \
-e OR_LICENSE_DEPLOYMENTTOKEN="YourToken" \
-e OR_INSTANCE_NAME="YourInstance" \
-v opc-router-data:/data \
-v opc-router-logs:/var/log/opcrouter \
-p 8080:8080 \
-p 8001:8001 \
-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="YourLicense" `
-e OR_LICENSE_OPCROUTERID="YourRouterID" `
-e OR_LICENSE_DEPLOYMENTTOKEN="YourToken" `
-e OR_INSTANCE_NAME="YourInstance" `
-v opc-router-data:/data `
-v opc-router-logs:/var/log/opcrouter `
-p 8080:8080 `
-p 8001:8001 `
-p 49420:49420 `
opcrouter/runtime:latest

Docker Compose

services:
opc_router:
image: opcrouter/runtime:latest
ports:
- "8080:8080"
- "8001:8001"
- "49420:49420"
environment:
- INITIAL_USERNAME=*****
- INITIAL_PASSWORD=*****
- OR_I_ACCEPT_EULA=true
- OR_LICENSE_KEY=YourLicense
- OR_LICENSE_OPCROUTERID=YourRouterID
- OR_LICENSE_DEPLOYMENTTOKEN=YourToken
- OR_INSTANCE_NAME=YourInstance
volumes:
- opc-router-data:/data
- opc-router-logs:/var/log/opcrouter
volumes:
opc-router-data:
opc-router-logs: