Configuration changes require a broker restart to take effect. Plan configuration updates during maintenance windows for production systems.
In This Page
| Section | Description |
|---|---|
| Network Settings | Ports and IP bindings for MQTT and WebSocket |
| Security Settings | Authentication, TLS, and mTLS configuration |
| Logging | Debug and diagnostic logging options |
| Applying Configuration | Methods to update broker configuration |
| Docker Configuration | Container-specific settings |
Configuration Overview
The broker configuration is stored as a JSON object with the following structure:Network Settings
Ports
The broker listens on multiple ports for different connection types:Standard MQTT port for unencrypted connections. This is the default port used by most MQTT clients.
MQTT port for TLS-encrypted connections. Requires valid server certificate configuration.
Port for MQTT over WebSocket connections. Used by browser-based clients and applications that cannot use raw TCP.
Port for MQTT over WebSocket with TLS encryption. Commonly set to 443 to work through corporate firewalls.
IP Bindings
Control which network interfaces the broker listens on:IP address to bind for standard MQTT connections. Use
0.0.0.0 to listen on all interfaces, or a specific IP to restrict access.IP address to bind for TLS-encrypted MQTT connections.
IP address to bind for WebSocket connections.
IP address to bind for WebSocket connections with TLS.
Example: Restrict to Local Network
Example: Listen on All Interfaces
Security Settings
Authentication
When
true, clients can connect without credentials. When false, all clients must provide valid username and password.TLS Server Certificate
Configure TLS encryption for secure client connections:Path to the server certificate file (PEM or PFX format).
Path to the private key file for the server certificate.
Password for the certificate file if it’s password-protected.
Path to the root CA certificate for certificate chain validation.
Example: TLS Configuration
Mutual TLS (mTLS)
For environments requiring client certificate authentication:Path to the directory or file containing trusted client certificates.
Enable client certificate validation. When
true, clients must present valid certificates to connect.Path to the Certificate Revocation List (CRL) file for checking revoked certificates.
Enable CRL checking for client certificates.
Enable full certificate chain validation for client certificates.
Example: mTLS Configuration
Logging
Enable detailed debug logging. Useful for troubleshooting but may impact performance in production.
Additional Settings
A descriptive name for your broker instance. Useful for identifying brokers in multi-broker deployments.
When
true, retained messages are resent to clients on reconnection.Applying Configuration
Via MQTT Topic
Publish the complete configuration JSON to the system topic using any MQTT client (such as MQTT Explorer):| Field | Value |
|---|---|
| Topic | $SYS/Coreflux/Config/New |
| Auth | Use admin credentials |
After publishing the configuration, you must restart the broker for changes to take effect.
Configuration Validation
The broker validates configuration on load. Invalid configurations will prevent the broker from starting. Common validation checks include:| Check | Requirement |
|---|---|
| Port values | Must be between 1 and 65535 |
| IP addresses | Must be valid IPv4 addresses |
| Certificate paths | Files must exist if paths are specified |
| Certificate password | Required if certificate path is set |
Docker Configuration
When running Coreflux in Docker, configure the broker using environment variables or mounted configuration files.Using Environment Variables
- Docker Run
- Docker Compose
Mounting Configuration
Mount your configuration file to the container:TLS with Docker
When using TLS in Docker, ensure certificate paths in the configuration match the mounted paths inside the container:Configuration Examples
Development Environment
Minimal configuration for local development:Production Environment
Secure configuration for production deployment:High-Security Environment
Configuration with mTLS for maximum security:Next Steps
Broker Commands
Learn how to manage the broker via MQTT commands.
$SYS Topics
Monitor broker status through system topics.

