Skip to main content

Overview

The Coreflux MQTT Broker can be configured at startup through command-line arguments, making it ideal for automated deployments, containerized environments, and system service installations. Instead of manually configuring the broker after startup, you can pass configuration files directly—perfect for CI/CD pipelines, Docker, Kubernetes, and production provisioning.
Think of startup options as a recipe card for your broker. You tell it exactly how to configure itself before it starts—which users to create, which routes to load, which actions to deploy. The broker reads the recipe and sets itself up automatically.

Command-Line Options

Configuration Management

LoT Entity Loading

Other Options

Environment Variables


Basic Usage

Starting with Configuration Files

Force Overwrite Existing Configuration

By default, if configuration files already exist, startup arguments are ignored. Use force flags to overwrite:
Force flags overwrite existing configurations. Back up your current configuration before using them.

Loading LoT Entities at Startup

Pre-load Actions, Models, Routes, and Rules when the broker starts:
This is ideal for deploying complete IoT solutions. Package your broker, users, and all LoT logic into a single startup command.

Configuration Files

Broker Configuration (JSON)

The broker configuration file defines MQTT service settings:

Broker Configuration Properties

Users Configuration (JSON)

The users configuration file defines MQTT users and their permissions:

User Permission Properties

LoT Entity Files

Create .lot files with your entity definitions: actions.lot:
routes.lot:

Container Deployment

Deploy the Coreflux broker using containers or orchestration platforms:
Run the broker with mounted configuration files:
Key volume mounts:
  • /config — Read-only mount for configuration files
  • /app/Coreflux — Persistent storage for broker data

Service Installation

Install Coreflux as a system service for automatic startup:
1

Download the Broker

Download the Windows binary from the Coreflux website (Start Free).
2

Open Administrator Command Prompt

Right-click Command Prompt and select “Run as administrator”.
3

Install the Service

Navigate to the broker directory and run:
Response: Coreflux MQTT Broker service installed successfully
4

Start the Service

Start the service using Windows Services or:
5

Verify Installation

Check the service is running:
Install with Pre-Configuration:To install with pre-configured settings, first run the broker once with your configuration:

Best Practices

The -cf and -uf flags overwrite existing configurations. Only use them when you intentionally want to reset configurations. Back up existing configs first.
Users configuration contains passwords. Ensure proper file permissions:
In production, consider using secrets management (Kubernetes Secrets, HashiCorp Vault).
Always mount a persistent volume for /app/Coreflux in Docker/Kubernetes. This preserves your broker state across container restarts.
Test your configuration files locally before deploying to production. Start the broker manually and verify it works correctly.

Troubleshooting

If your startup configuration is not being applied:
  1. Check if configuration files already exist in the data directory
  2. Use the force flags (-cf, -uf) to overwrite existing configuration
  3. Check logs for validation errors
If the broker fails to start due to port conflicts:
Either stop the conflicting service or change the broker port in your configuration.
Ensure the service user has:
  • Read access to configuration files
  • Write access to the data directory
  • Proper permissions for TLS certificate files

Next Steps

Broker Configuration

Detailed configuration options and TLS setup.

System Topics

Monitor and control your broker via $SYS topics.
Last modified on May 28, 2026