Files
meshcore-hub/etc/mosquitto.conf
Louis King e6b3ceb639 Updates
2025-12-03 17:02:57 +00:00

95 lines
2.9 KiB
Plaintext

# MeshCore Hub - Mosquitto MQTT Broker Configuration
# Eclipse Mosquitto 2.x configuration file
# =============================================================================
# General Settings
# =============================================================================
# Persistence for retained messages and subscriptions
persistence true
persistence_location /mosquitto/data/
# Logging configuration
log_dest file /mosquitto/log/mosquitto.log
log_dest stdout
log_type error
log_type warning
log_type notice
log_type information
log_timestamp true
log_timestamp_format %Y-%m-%dT%H:%M:%S
# Connection messages
connection_messages true
# =============================================================================
# Default Listener (MQTT over TCP)
# =============================================================================
# Listen on all interfaces, port 1883
listener 1883
protocol mqtt
# Allow anonymous connections (for development/testing)
# For production, set to false and configure authentication
allow_anonymous true
# =============================================================================
# WebSocket Listener (optional, for browser clients)
# =============================================================================
listener 9001
protocol websockets
# =============================================================================
# Security Settings
# =============================================================================
# Maximum packet size (default 268435455 bytes)
# Uncomment to limit:
# message_size_limit 1048576
# Maximum number of client connections (0 = unlimited)
max_connections 100
# Maximum queued messages per client
max_queued_messages 1000
# Maximum number of QoS 1 and 2 messages in flight
max_inflight_messages 20
# =============================================================================
# Authentication (uncomment for production)
# =============================================================================
# Password file authentication
# password_file /mosquitto/config/passwd
# To create password file:
# mosquitto_passwd -c /mosquitto/config/passwd username
# =============================================================================
# Access Control (uncomment for production)
# =============================================================================
# ACL file for topic-level access control
# acl_file /mosquitto/config/acl
# Example ACL file content:
# user readonly
# topic read meshcore/#
#
# user admin
# topic readwrite meshcore/#
# =============================================================================
# TLS/SSL (uncomment for production)
# =============================================================================
# listener 8883
# protocol mqtt
# cafile /mosquitto/config/ca.crt
# certfile /mosquitto/config/server.crt
# keyfile /mosquitto/config/server.key
# require_certificate false