Skip to main content
Version: 5.4

Use HTTPS

HTTPS is a protocol that encrypts and authenticates communication between a web browser and a web server.

note

To use HTTPS with OPC Router a certificate is required.

How to create SSL Certificates

Create SSL Certificates

warning

Even with a self-signed certificate, most browsers will classify Web Management under HTTPS as "not secure." However, the connection is still encrypted, but the browser cannot verify the authenticity of the website.

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
note

By running the command and setting the OR_I_ACCEPT_EULA environment variable to true, you agree to the End User License Agreement.

The added volumes mount the local certificate and private key on the host, allowing the container to access them. Since these are mounts of local files and not copies, any changes or deletions of the files may affect the container. Alternatively, you can transfer the certificate and private key 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 paths to the certificate and private key. The OR_WEB_DISABLE_HTTPS environment variable is set to false to enable HTTPS. The OPC Router's default HTTPS port (8443) is exposed as 443 externally. The Web Management should now be accessible at https://localhost:443.