Install & Configure RTDB_OPCUAServer2 On Docker
By Default the Docker image doesn't have RTDB_OPCUAServer2 included while writing this article (2024 Q2). So this document is intended to guide you through the steps involved in installing and configuring the docker with RTDB_OPCUAServer2.
it’s needed to build an image with RTDB_OPCUAServer2
(refer: https://docs.cpmplus.net/docs/installation-on-docker#adding-packages for adding additional package to default docker image)
Build and run the docker image with Custom package
Docker File
Create a Dockerfile with following entry
FROM cpmplus-repository.abb.com/cpmplushistory/qa/x64
RUN apt-get update &&\
apt-get install -y cpmplusopcuaserver2
Build Image
Build the Image with following command
Note:- The below command needs to be executed from the location where Dockerfile is placed
docker build -t cpmpluswithuaserver2 .
Note that there is a dot at the end which needs to be included while running the command
Where cpmpluswithuaserver2 is the custom name of the image which is being build, users can choose the name of their choice and use it. In this document we use the name cpmpluswithuaserver2as the image name in following steps.
Run the Container
Run the docker from the new image built in the above step
docker run --shm-size=1T --name cpmplusuaserver2 -d -p 443:443 -p 5080:80 -p 48031:48031 -v /var/lib/uaserver2_rtdbdata:/var/lib/rtdbdata -t cpmpluswithuaserver2
Note: port UAserver2 by default uses port 48031
Config Changes
Once the docker is started need to do following changes to the ini file RTDB_OPCUAServer2_ExampleVtrinSettings.ini under the path /usr/share/cpmplus/netcore/ so that the node is discoverable when browsed from any client
Replace the existing Url=wss://[NodeName]/History?noproxy=1 with a new value Url=/var/lib/rtdbdata. with following command from the docker host
docker exec -it cpmplusuaserver2 nano /usr/share/cpmplus/netcore/RTDB_OPCUAServer2_ExampleVtrinSettings.ini
Enable RTDB_OPCUAServer2 to run as Service
Run below 2 commands from the docker host machine in order to enable RTDB_OPCUAServer2 to as in service.
docker exec -it cpmplusuaserver2 CSCommon_Cmd -setini /var/lib/rtdbdata/RTDB.INI Services RTDB-OPCUAServer2 ON
docker exec -it cpmplusuaserver2 CSCommon_Cmd -setini /var/lib/rtdbdata/RTDB.INI RTDB-OPCUAServer2 CmdLine "/usr/share/dotnet/dotnet /usr/share/cpmplus/netcore/RTDB_OPCUAServer2.dll -c /usr/share/cpmplus/netcore/RTDB_OPCUAServer2_SecuredApplication.xml -c /usr/share/cpmplus/netcore/RTDB_OPCUAServer2_basesettings.ini -c /usr/share/cpmplus/netcore/RTDB_OPCUAServer2_ExampleVtrinSettings.ini"
Note: - Make sure to use proper docker container name in the commands
UA Server Certificate Path
With the default settings the certificate will be created in the following path inside the docker container
/root/.local/share/RTDB/pki
Updated 5 months ago
