Security baseline
LGB bridges industrial control networks. Keep it on trusted networks and review this baseline before connecting it to production.
Authentication and JWT secret
Set a unique, high-entropy LGB_AUTH_JWTSECRET and keep it in a secret manager. Do not commit it or expose it in logs, shell history, or process listings. Set the first admin password through a protected secret file; it is only used to create the initial user.
Network exposure and HTTPS
Do not expose LGB directly to the public internet. Restrict access with network segmentation and firewall rules to operator clients and required PLC/broker endpoints. Enable HTTPS using LGB_SERVER_TLSENABLED, LGB_SERVER_TLSCERTFILE, and LGB_SERVER_TLSKEYFILE; set allowed origins to the exact HTTPS origins. Plain HTTP exposes credentials and tag data.
OPC UA certificates
Do not use securityMode: None on networked deployments. Use SignAndEncrypt (or an approved secure mode), provision a site-trusted certificate, and protect the private key so only the LGB process can read it. Manage client trust lists through the plant's established process.
MQTT TLS
Use broker TLS with certificate verification, unique broker credentials, and least-privilege publish/subscribe ACLs. Do not disable certificate verification or send MQTT credentials over plaintext networks. Restrict broker connectivity to LGB and authorized consumers.
Persistent data and backups
Restrict permissions on the data directory and backup repository. Restic encrypts repository data, but protect the repository password separately: anyone holding it can decrypt backups. See the backup and restore runbook and the repository security policy.
For deployment details, see Deployment.