1. Overview & Architecture
UniflowService runs as a cross-platform .NET 8 background service. On Linux and Raspberry Pi, it operates as a systemd daemon or a Docker container, communicating with the Windows WPF Client (Uniflow.exe) over SignalR / WebSockets via HTTPS on port 5020.
┌──────────────────────────────────────────────────────────┐
│ Linux Host / Raspberry Pi Gateway │
│ │
│ systemd / Docker │
│ └── UniflowService (net8.0 x64 / ARM64 / ARM32) │
│ ├── Visual Rule Engine │
│ ├── Protocol Adapters (Modbus, MQTT, OPC UA…) │
│ ├── Kestrel Web Server (SignalR) │
│ │ ├── HTTP :5019 │
│ │ └── HTTPS :5020 │
│ └── Unix Domain Socket IPC / GPIO │
└──────────────────────────────────────────────────────────┘
▲ ▲
│ SignalR / WebSockets │ Industrial Protocols / Serial / GPIO
│ (HTTPS port 5020) │ (Modbus TCP/RTU, MQTT, OPC UA, BACnet…)
▼ ▼
┌──────────────────────┐ ┌──────────────────────────────┐
│ Windows Workstation │ │ PLCs / Sensors / Devices │
│ Uniflow.exe (WPF) │ │ (LAN / Field Network / Serial)│
└──────────────────────┘ └──────────────────────────────┘
2. System Requirements
Minimum Hardware
| Component | Requirement |
|---|---|
| CPU | x86-64 (Intel/AMD) or ARM64 / ARM32 (Raspberry Pi 4, 5, 3B+, Zero 2 W, Nvidia Jetson) |
| RAM | 512 MB minimum, 1 GB recommended |
| Disk | 200 MB for binaries + data storage |
| Network | Ethernet or Wi-Fi with static IP recommended |
Software Prerequisites
| Software | Version | Purpose |
|---|---|---|
| Linux OS | Ubuntu 22.04+, Debian 12+, Raspberry Pi OS (Bookworm/Bullseye), RHEL 9+, or Alpine 3.18+ | Host Operating System |
| .NET 8 Runtime | 8.0.x (ASP.NET Core Runtime) | Application runtime |
| OpenSSL | 1.1+ or 3.0+ | TLS certificate generation |
| systemd | 245+ | Service management (bare-metal) |
| Docker | 24.0+ (optional) | Container deployment |
Installing .NET 8 Runtime
wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y aspnetcore-runtime-8.0
# Install required dependencies for Raspberry Pi OS (Bookworm / Bullseye)
sudo apt-get update
sudo apt-get install -y curl libssl-dev libicu-dev tzdata
# Install ASP.NET Core 8.0 Runtime via official Microsoft install script
curl -sSL https://dot.net/v1/dotnet-install.sh | bash -s -- --runtime aspnetcore --version 8.0.0
# Add dotnet to system PATH & environment variables
echo 'export DOTNET_ROOT=$HOME/.dotnet' >> ~/.bashrc
echo 'export PATH=$PATH:$HOME/.dotnet' >> ~/.bashrc
source ~/.bashrc
# Verify installation
dotnet --list-runtimes
3. Bare-Metal / VM / Raspberry Pi Installation
Step 1: Create Dedicated Service User
sudo useradd --system --no-create-home --shell /usr/sbin/nologin uniflow
Step 2: Copy Precompiled Binaries & Set Permissions
sudo mkdir -p /opt/uniflowservice
sudo cp -r dist/linux-x64/service/* /opt/uniflowservice/
sudo mkdir -p /var/lib/uniflowservice/certs
sudo mkdir -p /var/lib/uniflowservice/Plugins
sudo chown -R uniflow:uniflow /opt/uniflowservice
sudo chown -R uniflow:uniflow /var/lib/uniflowservice
sudo chmod +x /opt/uniflowservice/UniflowService
sudo mkdir -p /opt/uniflowservice
# For Raspberry Pi 4 / 5 / CM4 (64-bit OS):
sudo cp -r dist/linux-arm64/service/* /opt/uniflowservice/
# For Raspberry Pi 3 / Zero 2 W (32-bit OS):
# sudo cp -r dist/linux-arm/service/* /opt/uniflowservice/
sudo mkdir -p /var/lib/uniflowservice/certs
sudo mkdir -p /var/lib/uniflowservice/Plugins
sudo chown -R uniflow:uniflow /opt/uniflowservice
sudo chown -R uniflow:uniflow /var/lib/uniflowservice
sudo chmod +x /opt/uniflowservice/UniflowService
Step 3: Install Systemd Unit File
# Copy unit file (from linux-x64 or linux-arm64 package)
sudo cp dist/linux-x64/uniflowservice.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable uniflowservice
sudo systemctl start uniflowservice
4. Systemd Service Management
# Check service status
sudo systemctl status uniflowservice
# View real-time log stream
sudo journalctl -u uniflowservice -f
# Restart service
sudo systemctl restart uniflowservice
5. Docker & Docker Compose Deployment
version: '3.8'
services:
uniflow-service:
build: .
image: uniflow-service:latest
container_name: uniflow-service
ports:
- "5019:5019"
- "5020:5020"
volumes:
- uniflow-data:/var/lib/uniflowservice
restart: unless-stopped
environment:
- DOTNET_ENVIRONMENT=Production
- ASPNETCORE_URLS=http://+:5019;https://+:5020
volumes:
uniflow-data:
# Run natively on Raspberry Pi with host networking for industrial protocols (Modbus, BACnet, MQTT) and serial/GPIO access
docker run -d \
--name uniflow-service \
--restart unless-stopped \
--network host \
--device=/dev/ttyUSB0:/dev/ttyUSB0 \
--device=/dev/gpiomem:/dev/gpiomem \
-v uniflow-data:/var/lib/uniflowservice \
uniflow-service:latest-arm64
For industrial protocols like BACnet UDP broadcast (port 47808) or Modbus TCP on physical interfaces, run Docker with --network host to bypass container network isolation.
6. Firewall & Network Configuration
| Port | Protocol | Direction | Purpose |
|---|---|---|---|
| 5019 | TCP (HTTP) | Inbound | SignalR Hub (unencrypted) |
| 5020 | TCP (HTTPS) | Inbound | SignalR Hub (TLS encrypted) |
| 502 | TCP | Outbound | Modbus TCP Client |
| 4840 | TCP | Outbound | OPC UA Client |
| 1883 / 8883 | TCP | Outbound | MQTT Broker (Standard / TLS) |
| 47808 | UDP | Inbound/Outbound | BACnet/IP Broadcast |
7. Connecting the Windows WPF Client
- Open
Uniflow.exeon your Windows desktop workstation. - Navigate to Settings → Connection.
- Set the Server Address to:
https://<linux-host-ip>:5020(orhttps://raspberrypi.local:5020). - Accept the TLS certificate warning on initial connection (or import self-signed
uniflow.pfxinto Windows Trusted Root store).
8. Plugin & Hardware Management
On Linux and Raspberry Pi, 18 out of 19 official Uniflow plugins run natively (Modbus, OPC UA, MQTT, SNMP, BACnet, Serial, WebHooks, CAN Bus via SocketCAN, VMS REST APIs, GPIO, etc.).
To enable serial port access (/dev/ttyUSB*) for UniflowService on standard Linux servers, add the service user to the dialout group:
sudo usermod -aG dialout uniflow
To enable hardware serial ports (/dev/ttyAMA0, /dev/ttyS0, /dev/ttyUSB*) and GPIO hardware pin control on Raspberry Pi, add the service user to both dialout and gpio groups:
sudo usermod -aG dialout,gpio uniflow
Ensure /dev/gpiomem permissions are active for direct non-root GPIO memory access.
9. Troubleshooting Reference
| Symptom | Cause | Resolution |
|---|---|---|
No usable version of libssl | Missing OpenSSL library | Run sudo apt install libssl-dev |
Address already in use | Port conflict on 5019/5020 | Inspect using ss -tlnp | grep 5020 |
Permission denied on Serial / GPIO | User missing dialout or gpio group | Run sudo usermod -aG dialout,gpio uniflow |
Process terminated / ICU failure | Missing ICU globalization library on Raspberry Pi OS | Run sudo apt install -y libicu-dev |
dotnet: command not found (Raspberry Pi) | PATH environment variable not set for script install | Run export PATH=$PATH:$HOME/.dotnet or add to ~/.bashrc |