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.Command-Line Options
Configuration Management
LoT Entity Loading
Other Options
Environment Variables
Basic Usage
Starting with Configuration Files
- Linux/macOS
- Windows
Force Overwrite Existing Configuration
By default, if configuration files already exist, startup arguments are ignored. Use force flags to overwrite: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:
Container Deployment
Deploy the Coreflux broker using containers or orchestration platforms:- Docker
- Docker Compose
- Kubernetes
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:- Windows
- Linux
- Raspberry Pi
1
Download the Broker
Download the Windows binary from the Coreflux website.
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 successfully4
Start the Service
Start the service using Windows Services or:
5
Verify Installation
Check the service is running:
Best Practices
Use Force Flags Carefully
Use Force Flags Carefully
The
-cf and -uf flags overwrite existing configurations. Only use them when you intentionally want to reset configurations. Back up existing configs first.Secure Configuration Files
Secure Configuration Files
Users configuration contains passwords. Ensure proper file permissions:In production, consider using secrets management (Kubernetes Secrets, HashiCorp Vault).
Use Persistent Volumes in Containers
Use Persistent Volumes in Containers
Always mount a persistent volume for
/app/Coreflux in Docker/Kubernetes. This preserves your broker state across container restarts.Validate Before Deployment
Validate Before Deployment
Test your configuration files locally before deploying to production. Start the broker manually and verify it works correctly.
Troubleshooting
Configuration Not Applied
Configuration Not Applied
If your startup configuration is not being applied:
- Check if configuration files already exist in the data directory
- Use the force flags (
-cf,-uf) to overwrite existing configuration - Check logs for validation errors
Port Already in Use
Port Already in Use
If the broker fails to start due to port conflicts:Either stop the conflicting service or change the broker port in your configuration.
Permission Denied on Linux
Permission Denied on Linux
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.

