Site-to-cloud connectivity
Client-managedCloud engine with local cameras
If the attendance engine runs on AWS, Azure, BigRock, or another cloud VM while the cameras remain on the client’s local network, the client must provide a tunnel from the site gateway to the cloud VM. BSS does not access local cameras and does not manage the client VPN.
Client site
Camera 192.168.1.50:554
│
Site gateway (WireGuard + RTSP relay)
│ outbound UDP 51820
▼
Client cloud VM
Attendance engine
│ HTTPS metadata
▼
BSS worker gallery / attendanceWho handles what
| Party | Responsibility |
|---|---|
| Client | CCTV cameras, NVR, site router, site gateway, WireGuard/tunnel, cloud VM, VPN keys, firewall, bandwidth, monitoring |
| BSS | Attendance engine package, BSS APIs, worker gallery/enrollment, BSS-side integration guidance |
BSS support covers the engine/BSS integration. The client is responsible for its VPN, router, cloud, firewall, keys, bandwidth, and privacy policy.
Deployment steps
1. Prepare the site gateway
Use a small always-on Linux gateway on the camera LAN. It must reach the camera RTSP port and open outbound WireGuard UDP 51820.
2. Prepare the cloud VM
Run the attendance engine on a cloud VM with a public Elastic IP. Open only UDP 51820 and restricted SSH. Do not expose RTSP or the engine API publicly.
3. Create WireGuard peers
Generate one key pair for the cloud hub and one per client site. Assign a unique tunnel IP to each site.
4. Add the RTSP relay
The site gateway proxies the camera RTSP TCP port on its tunnel IP. This avoids overlapping client LAN subnets.
5. Configure the engine
Add the camera in the engine using the site tunnel IP and relay port, not the camera’s private address.
6. Validate
Check WireGuard handshakes, RTSP reachability, camera SENDING state, frame processing, gallery face data, and BSS event sync.
WireGuard examples
Placeholders only. Generate unique keys per site and keep private keys off the public web server.
# Cloud hub (example)
[Interface]
Address = 10.200.0.1/24
ListenPort = 51820
PrivateKey = <CLOUD_PRIVATE_KEY>
[Peer]
# Site 001
PublicKey = <SITE_001_PUBLIC_KEY>
AllowedIPs = 10.200.1.2/32# Site 001 gateway (example)
[Interface]
Address = 10.200.1.2/32
PrivateKey = <SITE_001_PRIVATE_KEY>
[Peer]
PublicKey = <CLOUD_PUBLIC_KEY>
Endpoint = <CLOUD_PUBLIC_IP>:51820
AllowedIPs = 10.200.0.1/32
PersistentKeepalive = 25# Site 001 RTSP TCP relay (example)
socat TCP-LISTEN:1554,bind=10.200.1.2,fork TCP:192.168.1.50:554
# Cloud attendance engine camera URL
rtsp://10.200.1.2:1554/streamMultiple sites
Use one tunnel IP and one relay port set per site. This avoids overlapping client LANs such as every site using 192.168.1.0/24.
Site 001 10.200.1.2:1554 → camera 192.168.1.50:554
Site 002 10.200.2.2:1554 → camera 192.168.1.50:554
Site 003 10.200.3.2:1554 → camera 192.168.1.50:554Validate connectivity
# On the cloud VM
wg show
nc -vz 10.200.1.2 1554
ffprobe -rtsp_transport tcp rtsp://10.200.1.2:1554/stream
# Attendance engine API
bss-attendancectl camera test --rtsp 'rtsp://10.200.1.2:1554/stream'
bss-attendancectl status
bss-attendancectl workersThe camera must show SENDING, frames processed must increase, and the worker gallery must contain face data before attendance can be recognised.
Security and troubleshooting
Security
- One key pair per site; revoke on gateway replacement.
- Restrict relay access to the cloud tunnel IP.
- Never expose RTSP or engine port 8765 publicly.
- Do not put private keys or camera passwords in the website.
- Encrypt/secure the cloud VM and keep software patched.
Common failures
- No handshake: UDP 51820 blocked or wrong cloud IP.
- Tunnel up but RTSP fails: relay not running or wrong camera IP/port.
- Camera works locally but not from cloud: relay listen address/firewall.
- Overlapping site IPs: use unique tunnel IP/relay ports.
- No attendance: worker gallery has no embeddings or camera is not SENDING.
Support boundary
This is a client-managed deployment. BSS provides the engine and BSS integration; the client provides and operates the site gateway, VPN, cloud VM, firewall, keys, and monitoring.
Back to downloads