This public key must be embedded in the Rust client binary for license verification.
Loading...
Overview
The RackVision License Server manages activation and licensing for Multiload Updater Rust clients deployed at terminal sites. Each client must activate once with the server, then operates offline for up to 7 days before needing to renew.
How It Works
The server holds an Ed25519 private key used to sign license tokens.
The Rust client binary has the matching public key embedded at compile time.
When a client activates or renews, the server signs a token containing the device ID, machine fingerprint, and a 7-day expiry.
The client stores this token locally as license.dat and verifies it offline using the embedded public key — no server contact needed during the 7-day window.
A background watchdog checks expiry every 5 minutes. If expired and the server is unreachable, the client shuts down immediately.
Architecture
License Server (this server)
├── REST API: /api/license/activate, /api/license/renew
├── WebSocket: /ws/device (Rust clients — heartbeat + push events)
└── WebSocket: /ws/admin (this dashboard — real-time updates)
Rust Client (on-site terminal)
├── Embedded Ed25519 public key (compile-time)
├── license.dat (local, created on activation)
├── WebSocket client → /ws/device (heartbeat every 60s)
└── Background watchdog (checks expiry every 5 min)
Initial Server Setup
Configure .env with your MSSQL credentials, admin username/password, and JWT secret.
Run npm install then npm run dev (or npm start for production).
The server automatically creates the rack_vision_license database and all tables on first start.
An Ed25519 key pair is auto-generated on first start. You can view the public key in the Settings tab.
Embedding the Public Key in the Rust Client
This step links the server to the client. Without the correct public key, clients cannot verify license tokens.
Option A — Generate script:
cd rack_vision_license_server
npm run generate-keys
cp keys/server_public.key /path/to/multiload_updater_rust/keys/server_public.key
Option B — From database: Go to Settings tab, copy the base64 public key, decode it to 32 bytes, place at keys/server_public.key.
Rebuild the Rust binary:
cd multiload_updater_rust
cargo build --release
If you rotate the server key (Settings tab), ALL existing client binaries become invalid. You must rebuild and redeploy every client.
Configuring a New Client
Step 1: Generate an Activation Key
Go to Activation Keys tab → Generate Activation Key.
Optionally set Identifier to lock the key to a specific site.
Copy the generated key (e.g. A3K7-XNPQ-8V2D-FWJT) and send it to the site operator.