Running OPC UA server on Raspberry Pi


This article explains to run OPC UA client server on Raspberry Pi3 and view the server information model in the client application. Raspberry Pi acts as an OPC server and client nodes

What hardware do I need?
  1. One Raspberry Pi3 board
What software do I need?
  1. Kindly install Raspbian Buster OS as the python version required for free-opcua-client is 3.6.0 or higher
  2. Follow the instruction from the link to install Raspbian OS in Raspberry Pi and get started to run open62541

3 steps to setup OPC UA client server demo

  • Step 1: Install the dependency packages
  • Step 2: Run OPC UA server application
  • Step 3: Run OPC UA client application
OPCUA Client/Server:

In this article, we run both server and client application in the same Raspberry Pi board.

OPCUA server application:
<open62541-stack-dir>/examples/tutorial_server_firststeps or any other example server application
OCPUA client application:
Free-OPCUA client

Step 1: Install dependency package:

  1. sudo apt-get install git cmake cmake-curses-gui build-essential gcc python3-pip qttools5-dev python3-pyqt5 libmbedtls-dev check libsubunit-dev python-sphinx graphviz python-sphinx-rtd-theme
  2. sudo pip3 install opcua-client

Step 2: Run OPC UA server application:

  1. git clone
  2. cd open62541
  3. mkdir build
  4. cd build
  5. cmake ..
  6. ccmake ..
  7. Enable UA_BUILD_EXAMPLES, configure(c) and then generate (g)
  8. make
  9. cd bin/examples
  10. ./tutorial_server_firststeps ( Note: Any example server application can be used)
  11. Your server is now running and will be listening in the port 4840

Step 3: Run OPC UA client application:

  1. After installing all the dependency package, open the terminal and execute the following command
    • opcua-client
  2. Click on connect in the opcua-client application
  3. Now you can see the sever details listed in the client application as provided in the screen shot. OPC UA Client Server Communication
  4. Voila! you have now established OPC UA Client/Server communication in just 3 major steps
  5. The highlighted server information listed on the client application ensures that the OPCUA client and server are communicating with each other
  6. Note: Information about the server will not be displayed if the client/server communication is not established

Looking for secure OPC UA Client/Server communication using open62541?


Interested to know more about OPC UA on different platforms?