Skip to content

Instantly share code, notes, and snippets.

@coldfire84
Last active March 21, 2019 18:25
Show Gist options
  • Save coldfire84/51eb34808e2066f866e6cc26fe481fc0 to your computer and use it in GitHub Desktop.
Save coldfire84/51eb34808e2066f866e6cc26fe481fc0 to your computer and use it in GitHub Desktop.
Mongodb Mosquitto Conf File
auth_plugin /usr/local/lib/auth-plug.so
auth_opt_backends mongo
auth_opt_mongo_uri mongodb://<user>:<password>@<mongo-server>:27017
auth_opt_mongo_database users
auth_opt_mongo_user_username_prop username
auth_opt_mongo_user_password_prop mqttPass
auth_opt_mongo_user_superuser_prop superuser
auth_opt_mongo_user_coll accounts
auth_opt_mongo_topiclist_coll topics
auth_opt_mongo_user_topiclist_fk_prop topics
auth_opt_mongo_topiclist_key_prop _id
auth_opt_mongo_topiclist_topics_prop topics
log_type all
listener 8883
certfile /etc/letsencrypt/live/<dns-hostname>/cert.pem
cafile /etc/letsencrypt/live/<dns-hostname>/chain.pem
keyfile /etc/letsencrypt/live/<dns-hostname>/privkey.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment