OpenUaSim is an open source OPC UA simulation server with a desktop UI, built on Qt 6 and QUaServer.
- Custom address spaces with folders, objects and typed scalar or array variables, configurable access levels, initial values and Good, Bad or Uncertain quality for testing client behavior.
- Variable simulation with sine, square, triangle, ramp, random and step waveforms, Boolean toggles, counters and value lists, with configurable timing, amplitude and offset.
- Callable OPC UA methods to reset variables or set their values, and configurable method scenarios with typed arguments, output sources and ordered variable assignments.
- Numeric limit alarms and Boolean off-normal alarms, with event notifications and client acknowledgement.
- In-memory value history accessible through
HistoryRead, with configurable retention by value count and age. - NodeSet2 companion model import, namespace export and instantiation of imported object types and standard variable types. Supported variables in imported models can use simulation, alarms and history.
- Variable icons published to clients as the standard
Iconproperty (32×32 PNG,ImagePNG). opc.tcpendpoints with configurable security policies and message security modes, anonymous access, username/password and X.509 user certificate authentication, certificate trust validation and a configurable session limit.- Local Discovery Server (LDS) registration with automatic renewal, allowing
clients to find the server through
FindServers.
All enabled endpoints share one TCP port.
Method scenarios currently support SET actions; delayed WAIT actions are not supported.
Simulation sources produce scalar values.
Create a Method with the Scenario action under a folder or object, then
select it to add input and output arguments. Enter a built-in data type such as
Double or UInt32[] for an array. Imported methods keep the signature defined
by their model and offer the same source and action editors.
For each output, double-click its Source cell and choose a constant, an input argument, a variable or a simulation. Constants use semicolons between array elements; an empty constant uses the type's default value. Input and variable sources must match the target's underlying data type and scalar or array shape.
Use Add SET to assign a variable when the method is called. Enter its NodeId,
double-click its Source cell, and use Up, Down or Enabled to control execution.
Enabled assignments run in order, then output values are sampled. For example,
a method can copy its first input into a setpoint variable and return that
variable's updated value. A configured Bad response status performs no assignments.
An unavailable source or target returns BadConfigurationError; already completed
assignments are retained if a later runtime error occurs.
Simulation sources sample the existing waveform generator using elapsed time since the server's first scenario call. Project variable references retain namespace index 1; imported references use namespace URIs so model load order does not change their meaning. Scenarios are saved in project format 3; older project formats remain readable. Changing a project method's signature rebuilds the address space; changing its response sources or actions applies live.
On first launch OpenUaSim opens a sample project: a FactoryLine_01 folder with
a motor, a conveyor, a pump and a tank, each holding simulated variables.
The sample includes endpoints with and without message security; the steps below
use the unsecured endpoint with anonymous access.
- Choose Server → Start Server.
- Connect any OPC UA client — for example
OpenUaExplorer — to
opc.tcp://localhost:48400with securityNoneand anonymous login. - Browse
Objects/FactoryLine_01and subscribe to a variable to watch it change.
The application runs on:
Linux binaries require compatible Qt and OpenSSL libraries. Compatibility with glibc 2.28 requires a build using a compatible toolchain and dependencies; see BUILDING.md.
Requirements:
- CMake 3.22 or newer and a C++17 compiler.
- Qt 6.9 or newer (Core, Gui, Network, Widgets, Svg; Test for the test suite).
- Qt LinguistTools for the application translations.
- Git and Python 3 — QUaServer and open62541 are fetched and built during configuration.
- OpenSSL 3 for encryption (on by default). On Windows the OpenSSL from the Qt installer is found automatically.
The build is continuously tested on:
- Ubuntu Linux (latest GitHub runner)
- Windows (latest GitHub runner, MSVC)
- macOS (latest GitHub runner, Apple silicon)
The helper scripts prepare the dependencies and build a Release version with Ninja:
# Windows (PowerShell)
.\build.ps1
.\build.ps1 -Tests
.\build.ps1 -InstallPrefix "D:\Apps\OpenUaSim"# Linux and macOS (Bash)
bash build.sh
bash build.sh --tests
bash build.sh --install="$HOME/.local"Use -Help or --help for options. See BUILDING.md for dependency
installation, build directories and installation details.
Alternatively, configure, build and run the tests with CMake, pointing
CMAKE_PREFIX_PATH at your Qt kit. Omit -DOUASIM_BUILD_TESTS=ON to build without
tests.
cmake -S src -B build -DCMAKE_PREFIX_PATH=/path/to/Qt/6.9/<kit> -DOUASIM_BUILD_TESTS=ON
cmake --build build --parallel
ctest --test-dir build --output-on-failureOptions:
| Option | Default | Description |
|---|---|---|
OUASIM_BUILD_TESTS |
OFF |
Build the Qt Test suites (needs Qt Test). |
OUASIM_WITH_ENCRYPTION |
ON |
Build QUaServer with OpenSSL 3 encryption. |
OUASIM_DEPLOY_RUNTIME |
ON |
Deploy Qt/OpenSSL on Windows/macOS install. |
OUASIM_QUASERVER_TAG |
master |
QUaServer git tag or commit to fetch. |
Found a bug or missing a feature? Open an issue in the issue tracker. Pull requests are welcome.
Copyright (c) 2026 Alexandr Ananev. See LICENSE for the full text.