Skip to content

Instantly share code, notes, and snippets.

@DavesCodeMusings
Created June 7, 2023 23:52
Show Gist options
  • Select an option

  • Save DavesCodeMusings/7b1bf513009d3558e8ad5686137bd641 to your computer and use it in GitHub Desktop.

Select an option

Save DavesCodeMusings/7b1bf513009d3558e8ad5686137bd641 to your computer and use it in GitHub Desktop.
# Sample Eclipse Mosquitto config with MQTT Secure and MQTT Secure Websockets.
# You need to provide the server.crt, server.key, and ca-certificates.crt
# Global Options
allow_anonymous true
persistence true
persistence_location /mosquitto/data/
log_dest stdout
# Standard MQTT
listener 1883
# Encrypted MQTT
listener 8883
protocol mqtt
cafile /mosquitto/ssl/ca-certificates.crt
certfile /mosquitto/ssl/server.crt
keyfile /mosquitto/ssl/server.key
# Encrypted MQTT over websockets
listener 9883
protocol websockets
cafile /mosquitto/ssl/ca-certificates.crt
certfile /mosquitto/ssl/server.crt
keyfile /mosquitto/ssl/server.key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment