Licensing via environment variables
OPC Router can be licensed via environment variables. This method is particularly suitable for use cases where Docker or Docker Compose is used. It allows you to license many systems with little effort.
note
An overview of the required and optional environment variables can be found here: [#environment-variables-for-licensing](../introduction_installation/deployment-docker/konfigurierbare-umgebungsvariablen.md#umgebungsvariablen-fur-die-lizenzierung "mention")
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-5-data:/data \
-v opc-router-5-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-5-data:/data `
-v opc-router-5-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-5-data:/data
- opc-router-5-logs:/var/log/opcrouter
volumes:
opc-router-5-data:
opc-router-5-logs: