.NET 8.0 Linux Raspberry Pi (ARM64/ARM32) Docker & Compose SignalR HTTPS

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 & RASPBERRY PI DEPLOYMENT TOPOLOGY
┌──────────────────────────────────────────────────────────┐
│             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

ComponentRequirement
CPUx86-64 (Intel/AMD) or ARM64 / ARM32 (Raspberry Pi 4, 5, 3B+, Zero 2 W, Nvidia Jetson)
RAM512 MB minimum, 1 GB recommended
Disk200 MB for binaries + data storage
NetworkEthernet or Wi-Fi with static IP recommended

Software Prerequisites

SoftwareVersionPurpose
Linux OSUbuntu 22.04+, Debian 12+, Raspberry Pi OS (Bookworm/Bullseye), RHEL 9+, or Alpine 3.18+Host Operating System
.NET 8 Runtime8.0.x (ASP.NET Core Runtime)Application runtime
OpenSSL1.1+ or 3.0+TLS certificate generation
systemd245+Service management (bare-metal)
Docker24.0+ (optional)Container deployment

Installing .NET 8 Runtime

UBUNTU / DEBIAN (x64)
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
RASPBERRY PI OS (ARM64 / ARM32)
# 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

BASH (UBUNTU / DEBIAN / RASPBERRY PI)
sudo useradd --system --no-create-home --shell /usr/sbin/nologin uniflow

Step 2: Copy Precompiled Binaries & Set Permissions

UBUNTU / DEBIAN (x64)
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
RASPBERRY PI (ARM64 / ARM32)
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

BASH
# 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

SYSTEMD COMMANDS
# 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

DOCKER COMPOSE CONFIGURATION (docker-compose.yml)
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:
RASPBERRY PI DOCKER RUN (ARM64 / ARM32)
# 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
Host Networking for Direct Protocol Access

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

PortProtocolDirectionPurpose
5019TCP (HTTP)InboundSignalR Hub (unencrypted)
5020TCP (HTTPS)InboundSignalR Hub (TLS encrypted)
502TCPOutboundModbus TCP Client
4840TCPOutboundOPC UA Client
1883 / 8883TCPOutboundMQTT Broker (Standard / TLS)
47808UDPInbound/OutboundBACnet/IP Broadcast

7. Connecting the Windows WPF Client

  1. Open Uniflow.exe on your Windows desktop workstation.
  2. Navigate to Settings → Connection.
  3. Set the Server Address to: https://<linux-host-ip>:5020 (or https://raspberrypi.local:5020).
  4. Accept the TLS certificate warning on initial connection (or import self-signed uniflow.pfx into 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.).

Standard Linux Serial COM Port Access

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

Raspberry Pi Serial & GPIO Permissions

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

SymptomCauseResolution
No usable version of libsslMissing OpenSSL libraryRun sudo apt install libssl-dev
Address already in usePort conflict on 5019/5020Inspect using ss -tlnp | grep 5020
Permission denied on Serial / GPIOUser missing dialout or gpio groupRun sudo usermod -aG dialout,gpio uniflow
Process terminated / ICU failureMissing ICU globalization library on Raspberry Pi OSRun sudo apt install -y libicu-dev
dotnet: command not found (Raspberry Pi)PATH environment variable not set for script installRun export PATH=$PATH:$HOME/.dotnet or add to ~/.bashrc
Architecture Flow Diagram — Full Preview