Using HTTPS
HTTPS is a protocol that encrypts and authenticates communication between a web browser and a web server.
A certificate is required to use HTTPS.
Creating SSL certificates
Even with a self-signed certificate, most browsers will classify Web Management under HTTPS as "not secure." The connection is still encrypted, but the authenticity of the website cannot be verified by the browser.
Creating OPC Router containers with HTTPS
docker run -d \
-e OR_I_ACCEPT_EULA=true \
-v $pwd/https.pem:/inray/https.pem \
-v $pwd/https.key:/inray/https.key \
-e OR_WEB_HTTPS_CERTIFICATE_PEM_FILE=/inray/https.pem \
-e OR_WEB_HTTPS_CERTIFICATE_KEY_PEM_FILE=/inray/https.key \
-e OR_WEB_DISABLE_HTTPS=false \
-p 443:8443 \
--name opcrouterhttps \
opcrouter/runtime
By executing this command, you agree to the End User License Agreement by setting the environment variable OR_I_ACCEPT_EULA to true.
The added volumes mount the local certificate and local private key on the host and allow the container to access them. Since these are mounts of the local files and not copies, any changes or deletions to the files may affect the container. Alternatively, the certificate and private key can also be transferred to the container using the docker cp command.
The environment variables OR_WEB_HTTPS_CERTIFICATE_PEM_FILE and OR_WEB_HTTPS_CERTIFICATE_KEY_PEM_FILE specify the path to the certificate and private key. The environment variable OR_WEB_DISABLE_HTTPS is set to false so that HTTPS can be used. The default HTTPS port of the OPC router (8443) is released externally as 443. Web Management should now be accessible at https://localhost:443.