Configuration Reference (config.toml)
Complete declarative TOML schema specification for configuring OPC UA endpoints, X.509 certificates, Mosquitto/MQTT topics, Sparkplug B, and disk WAL buffers.
Core Configuration Sections
- [gateway]: Gateway identity, log level, and deterministic poll interval.
- [opcua]: Server URL, Basic256Sha256 SignAndEncrypt policy, and node/browse-path arrays.
- [mqtt]: Broker TCP/TLS URI, QoS, client ID, topic prefix, and Sparkplug B parameters.
- [buffer]: Embedded SQLite Write-Ahead Log path, max disk size (MB), and flush interval.
- [tsdb]: Optional direct InfluxDB v2/v3, TimescaleDB, or QuestDB historian sink.
Production Example
[gateway]
id = "gw-line-1"
log_level = "info"
[opcua]
url = "opc.tcp://192.168.1.50:4840"
security_policy = "Basic256Sha256"
security_mode = "SignAndEncrypt"
[mqtt]
broker = "tcp://mqtt.local:1883"
topic_prefix = "factory/line1"
qos = 1
[buffer]
type = "disk"
path = "/var/lib/opcua2mqtt/wal.db"
max_size_mb = 4096
Environment Variable Overrides
Override any TOML key in Docker or Kubernetes using OPCUA2MQTT__SECTION__KEY syntax (e.g., OPCUA2MQTT__MQTT__BROKER=tcp://mosquitto:1883). Validate syntax before launch with opcua2mqtt --config config.toml --verify.