Skip to main content
Configure your Coreflux MQTT Broker to match your deployment requirements. This guide covers network settings, security options, TLS certificates, and deployment-specific configurations.
Configuration changes require a broker restart to take effect. Plan configuration updates during maintenance windows for production systems.

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:
integer
default:"1883"
Standard MQTT port for unencrypted connections. This is the default port used by most MQTT clients.
integer
default:"8883"
MQTT port for TLS-encrypted connections. Requires valid server certificate configuration.
integer
default:"5000"
Port for MQTT over WebSocket connections. Used by browser-based clients and applications that cannot use raw TCP.
integer
default:"443"
Port for MQTT over WebSocket with TLS encryption. Commonly set to 443 to work through corporate firewalls.
All ports must be between 1 and 65535. Ensure chosen ports are not already in use by other services.

IP Bindings

Control which network interfaces the broker listens on:
string
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.
string
IP address to bind for TLS-encrypted MQTT connections.
string
IP address to bind for WebSocket connections.
string
IP address to bind for WebSocket connections with TLS.

Example: Restrict to Local Network

Example: Listen on All Interfaces


Security Settings

Authentication

boolean
default:"false"
When true, clients can connect without credentials. When false, all clients must provide valid username and password.
Never enable AnonymousLogin in production environments. Always require authentication for broker access.

TLS Server Certificate

Configure TLS encryption for secure client connections:
string
Path to the server certificate file (PEM or PFX format).
string
Path to the private key file for the server certificate.
string
Password for the certificate file if it’s password-protected.
string
Path to the root CA certificate for certificate chain validation.

Example: TLS Configuration

Mutual TLS (mTLS)

For environments requiring client certificate authentication:
string
Path to the directory or file containing trusted client certificates.
boolean
default:"false"
Enable client certificate validation. When true, clients must present valid certificates to connect.
string
Path to the Certificate Revocation List (CRL) file for checking revoked certificates.
boolean
default:"false"
Enable CRL checking for client certificates.
boolean
default:"false"
Enable full certificate chain validation for client certificates.

Example: mTLS Configuration

mTLS is recommended for high-security environments where you need to verify client identity at the transport layer, in addition to username/password authentication.

Logging

boolean
default:"false"
Enable detailed debug logging. Useful for troubleshooting but may impact performance in production.
Only enable FullDebugLog for troubleshooting. Debug logging generates significant log volume and may impact broker performance.

Additional Settings

string
A descriptive name for your broker instance. Useful for identifying brokers in multi-broker deployments.
boolean
default:"false"
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): Payload: Complete configuration JSON object
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:

Docker Configuration

When running Coreflux in Docker, configure the broker using environment variables or mounted configuration files.

Using Environment Variables

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 JSON should reference the container paths:

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.
Last modified on July 3, 2026