mosquitto.conf: the configuration file for mosquitto
- Mosc Nat De Vota (prototype) Mac Os 11
- Mosc Nat De Vota (prototype) Mac Os Pro
- Mosc Nat De Vota (prototype) Mac Os X
Command to display mosquitto.conf
manual in Linux: $ man 5 mosquitto.conf
The fastest way to run our software is to use Mac OS Boot Camp (free with the installation of OS X). This utility will create a second disk partition on your existing startup disk on which you will be able to install a Microsoft Windows system. To switch to Windows, reboot the computer and select the Windows operating system. The Mosca Server is a very simple MQTT server that provides a simple event-based API to craft your own MQTT logic It supports QoS 0 & 1, without external storage.
- 'It works well with many, many applications.' 'Ie is simply the most user-hiendly ‘operating system to date.' Those are the words ofa few of the nearly 3500 technology users who par- ticipated in a recent PC World survey. But the product they're raving about isn't Windows Vista or Mac OS X 10.5, for anew version of Linus.
- Scribd is the world's largest social reading and publishing site.
NAME
mosquitto.conf - the configuration file for mosquitto
SYNOPSIS
Both certificate and PSK based encryption are configured on a per-listener basis.
Authentication plugins can be created to replace the password_file and psk_file options (as well as the ACL options) with e.g. SQL based lookups.
It is possible to support multiple authentication schemes at once. A config could be created that had a listener for all of the different encryption options described above and hence a large number of ways of authenticating.
GENERAL OPTIONS
acl_filefile path
Set the path to an access control list file. If defined, the contents of the file are used to control client access to topics on the broker.If this parameter is defined then only the topics listed will have access. Topic access is added with lines of the format:
topic [read|write|readwrite]
The access type is controlled using 'read', 'write' or 'readwrite'. https://casinoagepandaluckyndqvthe.peatix.com. This parameter is optional (unless includes a space character) - if not given then the access is read/write. can contain the + or # wildcards as in subscriptions.
The first set of topics are applied to anonymous clients, assumingallow_anonymousis true. User specific topic ACLs are added after a user line as follows:
user
The username referred to here is the same as inpassword_file. It is not the clientid.
It is also possible to define ACLs based on pattern substitution within the topic. The form is the same as for the topic keyword, but using pattern as the keyword.
pattern [read|write|readwrite]
The patterns available for substition are:
- •%u to match the username of the client
The substitution pattern must be the only text for that level of hierarchy. Pattern ACLs apply to all users even if the 'user' keyword has previously been given.
Example:
pattern write sensor/%u/data
Allow access for bridge connection messages:
pattern write $SYS/broker/connection/%c/state
If the first character of a line of the ACL file is a # it is treated as a comment.
Reloaded on reload signal. The currently loaded ACLs will be freed and reloaded. Existing subscriptions will be affected after the reload.
allow_anonymous [ true | false ]
Boolean value that determines whether clients that connect without providing a username are allowed to connect. If set tofalsethen another means of connection should be created to control authenticated client access. Defaults totrue.Reloaded on reload signal.
allow_duplicate_messages [ true | false ]
If a client is subscribed to multiple subscriptions that overlap, e.g. foo/# and foo/+/baz , then MQTT expects that when the broker receives a message on a topic that matches both subscriptions, such as foo/bar/baz, then the client should only receive the message once.Mosquitto keeps track of which clients a message has been sent to in order to meet this requirement. This option allows this behaviour to be disabled, which may be useful if you have a large number of clients subscribed to the same set of topics and want to minimise memory usage.
It can be safely set totrueif you know in advance that your clients will never have overlapping subscriptions, otherwise your clients must be able to correctly deal with duplicate messages even when then have QoS=2.
Defaults totrue.
Reloaded on reload signal.
auth_opt_*value
Reloaded on reload signal. Note that currently connected clients will be unaffected by any changes.
connection_messages [ true | false ]
If set totrue, the log will include entries when clients connect and disconnect. If set tofalse, these entries will not appear.Reloaded on reload signal.
include_dirdir
log_destdestinations
Send log messages to a particular destination. Possible destinations are:stdoutstderrsyslogtopic.stdoutandstderrlog to the console on the named output.
sysloguses the userspace syslog facility which usually ends up in /var/log/messages or similar and topic logs to the broker topic '$SYS/broker/log/', where severity is one of D, E, W, N, I, M which are debug, error, warning, notice, information and message. Message type severity is used by the subscribe and unsubscribe log_type options and publishes log messages at $SYS/broker/log/M/subscribe and $SYS/broker/log/M/unsubscribe.
Thefiledestination requires an additional parameter which is the file to be logged to, e.g. 'log_dest file /var/log/mosquitto.log'. The file will be closed and reopened when the broker receives a HUP signal. Only a single file destination may be configured.
Use 'log_dest none' if you wish to disable logging. Defaults to stderr. This option may be specified multiple times.
Note that if the broker is running as a Windows service it will default to 'log_dest none' and neither stdout nor stderr logging is available.
Reloaded on reload signal.
log_facilitylocal facility
log_timestamp [ true | false ]
Boolean value, if set totruea timestamp value will be added to each log entry. The default istrue.Reloaded on reload signal.
log_typetypes
Choose types of messages to log. Possible types are:debug,error,warning,notice,information,subscribe,unsubscribe,websockets,none,all.Defaults toerror,warning,notice andinformation. This option may be specified multiple times. Note that thedebug type (used for decoding incoming/outgoing network packets) is never logged in topics.
Reloaded on reload signal.
max_inflight_messagescount
The maximum number of QoS 1 or 2 messages that can be in the process of being transmitted simultaneously. This includes messages currently going through handshakes and messages that are being retried. Defaults to 20. Set to 0 for no maximum. If set to 1, this will guarantee in-order delivery of messages.Reloaded on reload signal.
max_queued_messagescount
The maximum number of QoS 1 or 2 messages to hold in the queue above those messages that are currently in flight. Defaults to 100. Set to 0 for no maximum (not recommended). See also thequeue_qos0_messagesoption.Reloaded on reload signal.
message_size_limitlimit
Reloaded on reload signal. The experiment (itch) (nubeh) mac os. The currently loaded username and password data will be freed and reloaded. Clients that are already connected will not be affected.
See alsomosquitto_passwd(1).
persistence [ true | false ]
Iftrue, connection, subscription and message data will be written to the disk in mosquitto.db at the location dictated by persistence_location. When mosquitto is restarted, it will reload the information stored in mosquitto.db. The data will be written to disk when mosquitto closes and also at periodic intervals as defined by autosave_interval. Writing of the persistence database may also be forced by sending mosquitto the SIGUSR1 signal. Iffalse, the data will be stored in memory only. Defaults tofalse.Reloaded on reload signal.
persistence_filefile name
The filename to use for the persistent database. Defaults to mosquitto.db.Reloaded on reload signal.
persistence_locationpath
The path where the persistence database should be stored. Must end in a trailing slash. If not given, then the current directory is used.Reloaded on reload signal.
persistent_client_expirationduration
This option allows persistent clients (those with clean session set to false) to be removed if they do not reconnect within a certain time frame. This is a non-standard option. As far as the MQTT spec is concerned, persistent clients persist forever.Badly designed clients may set clean session to false whilst using a randomly generated client id. This leads to persistent clients that will never reconnect. Mind control stephen marley mp3 download. This option allows these clients to be removed.
The expiration period should be an integer followed by one of h d w m y for hour, day, week, month and year respectively. For example:
- •persistent_client_expiration 14d
Reloaded on reload signal. The currently loaded identity and key data will be freed and reloaded. Clients that are already connected will not be affected.
queue_qos0_messages [ true | false ]
Set totrueto queue messages with QoS 0 when a persistent client is disconnected. These messages are included in the limit imposed by max_queued_messages. Defaults tofalse.Note that the MQTT v3.1 spec states that only QoS 1 and 2 messages should be saved in this situation so this is a non-standard option.
Reloaded on reload signal.
retained_persistence [ true | false ]
This is a synonym of thepersistenceoption.Reloaded on reload signal.
retry_intervalseconds
The integer number of seconds after a QoS=1 or QoS=2 message has been sent that mosquitto will wait before retrying when no response is received. If unset, defaults to 20 seconds.Reloaded on reload signal.
store_clean_intervalseconds
The integer number of seconds between the internal message store being cleaned of messages that are no longer referenced. Lower values will result in lower memory usage but more processor time, higher values will have the opposite effect. Setting a value of 0 means the unreferenced messages will be disposed of as quickly as possible. Defaults to 10 seconds.Reloaded on reload signal.
sys_intervalseconds
The integer number of seconds between updates of the $SYS subscription hierarchy, which provides status information about the broker. If unset, defaults to 10 seconds.Set to 0 to disable publishing the $SYS hierarchy completely.
Reloaded on reload signal.
upgrade_outgoing_qos [ true | false ]
The MQTT specification requires that the QoS of a message delivered to a subscriber is never upgraded to match the QoS of the subscription. Enabling this option changes this behaviour. Ifupgrade_outgoing_qosis settrue, messages sent to a subscriber will always match the QoS of its subscription. This is a non-standard option not provided for by the spec. Defaults tofalse.Reloaded on reload signal.
userusername
When run as root, change to this user and its primary group on startup. If mosquitto is unable to change to this user and group, it will exit with an error. The user specified must have read/write access to the persistence database if it is to be written. If run as a non-root user, this setting has no effect. Defaults to mosquitto.This setting has no effect on Windows and so you should run mosquitto as the user you wish it to run as.
Not reloaded on reload signal.
LISTENERS
The network ports that mosquitto listens on can be controlled using listeners. The default listener options can be overridden and further listeners can be created.
General Options
bind_addressaddress
Listen for incoming network connections on the specified IP address/hostname only. This is useful to restrict access to certain network interfaces. To restrict access to mosquitto to the local host only, use 'bind_address localhost'. This only applies to the default listener. Use the listener variable to control other listeners.Not reloaded on reload signal.
http_dirdirectory
When a listener is using the websockets protocol, it is possible to serve http data as well. Sethttp_dirto a directory which contains the files you wish to serve. If this option is not specified, then no normal http connections will be possible.Not reloaded on reload signal.
listenerport[bind address/host]
Listen for incoming network connection on the specified port. A second optional argument allows the listener to be bound to a specific ip address/hostname. If this variable is used and neither the globalbind_addressnorportoptions are used then the default listener will not be started.Thebind address/hostoption allows this listener to be bound to a specific IP address by passing an IP address or hostname. For websockets listeners, it is only possible to pass an IP address here.
This option may be specified multiple times. See also themount_pointoption.
Not reloaded on reload signal.
max_connectionscount
Limit the total number of clients connected for the current listener. Set to-1to have 'unlimited' connections. Note that other limits may be imposed that are outside the control of mosquitto. See e.g.limits.conf(5).Not reloaded on reload signal.
mount_pointtopic prefix
This option is used with the listener option to isolate groups of clients. When a client connects to a listener which uses this option, the string argument is attached to the start of all topics for this client. This prefix is removed when any messages are sent to the client. This means a client connected to a listener with mount pointexamplecan only see messages that are published in the topic hierarchyexampleand above.Not reloaded on reload signal.
portport number
Set the network port for the default listener to listen on. Defaults to 1883.Not reloaded on reload signal.
protocolvalue
Set the protocol to accept for this listener. Can bemqtt, the default, orwebsocketsif available.Websockets support is currently disabled by default at compile time. Certificate based TLS may be used with websockets, except that only thecafile,certfile,keyfileandciphersoptions are supported.
Not reloaded on reload signal.
use_username_as_clientid [ true | false ]
Setuse_username_as_clientidto true to replace the clientid that a client connected with with its username. This allows authentication to be tied to the clientid, which means that it is possible to prevent one client disconnecting another by using the same clientid. Defaults to false.If a client connects with no username it will be disconnected as not authorised when this option is set to true. Do not use in conjunction withclientid_prefixes.
See alsouse_identity_as_username.
Not reloaded on reload signal.
websockets_log_levellevel
Change the websockets logging level. This is a global option, it is not possible to set per listener. This is an integer that is interpreted by libwebsockets as a bit mask for its lws_log_levels enum. See the libwebsockets documentation for more details.To use this option,log_type websocketsmust also be enabled. Defaults to 0.
Certificate based SSL/TLS Support
The following options are available for all listeners to configure certificate based SSL support. See also 'Pre-shared-key based SSL/TLS support'.
cafilefile path
At least one ofcafileorcapathmust be provided to allow SSL support.cafileis used to define the path to a file containing the PEM encoded CA certificates that are trusted.
capathdirectory path
At least one ofcafileorcapathmust be provided to allow SSL support.capathis used to define a directory that contains PEM encoded CA certificates that are trusted. Forcapathto work correctly, the certificates files must have '.pem' as the file ending and you must run 'c_rehash ' each time you add/remove a certificate.
certfilefile path
- The list of allowed ciphers, each separated with a colon. Available ciphers can be obtained using the 'openssl ciphers' command.
crlfilefile path
- Path to the PEM encoded keyfile.
require_certificate [ true | false ]
- Configure the version of the TLS protocol to be used for this listener. Possible values aretlsv1.2,tlsv1.1andtlsv1. If left unset, the default of allowing all of TLS v1.2, v1.1 and v1.0 is used.
use_identity_as_username [ true | false ]
cipherscipher:list
psk_hinthint
Thepsk_hintoption enables pre-shared-key support for this listener and also acts as an identifier for this listener. The hint is sent to clients and may be used locally to aid authentication. The hint is a free form string that doesn't have much meaning in itself, so feel free to be creative.If this option is provided, seepsk_fileto define the pre-shared keys to be used or create a security plugin to handle them.
tls_versionversion
- Setuse_identity_as_usernameto have the psk identity sent by the client used as its username. The username will be checked as normal, sopassword_fileor another means of authentication checking must be used. No password will be used.
CONFIGURING BRIDGES
Multiple bridges (connections to other brokers) can be configured using the following variables.
Bridges cannot currently be reloaded on reload signal.
addressaddress[:port][address[:port]], addressesaddress[:port][address[:port]]
Specify the address and optionally the port of the bridge to connect to. This must be given for each bridge connection. If the port is not specified, the default of 1883 is used.Multiple host addresses can be specified on the address config. See theround_robinoption for more details on the behaviour of bridges with multiple addresses.
bridge_attempt_unsubscribe [ true | false ]
bridge_protocol_versionversion
- This variable marks the start of a new bridge connection. It is also used to give the bridge a name which is used as the client id on the remote broker.
keepalive_intervalseconds
- Set the amount of time a bridge using the lazy start type must be idle before it will be stopped. Defaults to 60 seconds.
local_clientidid
- Configure the password to be used when connecting this bridge to the local broker. This may be important when authentication and ACLs are being used.
local_usernameusername
- If set totrue, publish notification messages to the local and remote brokers giving information about the state of the bridge connection. Retained messages are published to the topic $SYS/broker/connection//state unless otherwise set withnotification_topics. If the message is 1 then the connection is active, or 0 if the connection has failed. Defaults totrue.
notification_topictopic
This replaces the old 'clientid' option to avoid confusion with local/remote sides of the bridge. 'clientid' remains valid for the time being.
remote_passwordvalue
Configure a password for the bridge. This is used for authentication purposes when connecting to a broker that supports MQTT v3.1 and up and requires a username and/or password to connect. This option is only valid if a remote_username is also supplied.This replaces the old 'password' option to avoid confusion with local/remote sides of the bridge. 'password' remains valid for the time being.
remote_usernamename
Configure a username for the bridge. This is used for authentication purposes when connecting to a broker that supports MQTT v3.1 and up and requires a username and/or password to connect. See also theremote_passwordoption.This replaces the old 'username' option to avoid confusion with local/remote sides of the bridge. 'username' remains valid for the time being.
restart_timeoutvalue
automaticis the default start type and means that the bridge connection will be started automatically when the broker starts and also restarted after a short delay (30 seconds) if the connection fails.
Bridges using thelazystart type will be started automatically when the number of queued messages exceeds the number set with thethresholdoption. It will be stopped automatically after the time set by theidle_timeoutparameter. Use this start type if you wish the connection to only be active when it is needed.
A bridge using theoncestart type will be started automatically when the broker starts but will not be restarted if the connection fails.
thresholdcount
Topic | Local Prefix | Remote Prefix | Validity | |
1 | value | value | value | valid |
2 | value | value | ' | valid |
3 | value | ' | value | valid |
4 | value | ' | ' | valid (no remapping) |
5 | ' | value | value | valid (remap single local topic to remote) |
6 | ' | value | ' | invalid |
7 | ' | ' | value | invalid |
8 | ' | ' | ' | invalid |
To remap an entire topic tree, use e.g.:
This option can be specified multiple times per bridge.
Care must be taken to ensure that loops are not created with this option. If you are experiencing high CPU load from a broker, it is possible that you have a loop where each broker is forever forwarding each other the same messages.
See also thecleansessionoption if you have messages arriving on unexpected topics when using incoming topics.
Example Bridge Topic Remapping. The configuration below connects a bridge to the broker attest.mosquitto.org. It subscribes to the remote topic$SYS/broker/clients/totaland republishes the messages received to the local topictest/mosquitto/org/clients/total
try_private [ true | false ]
If try_private is set totrue, the bridge will attempt to indicate to the remote broker that it is a bridge not an ordinary client. If successful, this means that loop detection will be more effective and that retained messages will be propagated correctly. Not all brokers support this feature so it may be necessary to settry_privatetofalseif your bridge does not connect properly.Defaults totrue.
SSL/TLS Support
The following options are available for all bridges to configure SSL/TLS support.
bridge_attempt_unsubscribe [ true | false ]
bridge_cafilefile path
One ofbridge_cafileorbridge_capathmust be provided to allow SSL/TLS support.bridge_cafile is used to define the path to a file containing the PEM encoded CA certificates that have signed the certificate for the remote broker.
bridge_capathfile path
One ofbridge_capathorbridge_capathmust be provided to allow SSL/TLS support.bridge_capath is used to define the path to a directory containing the PEM encoded CA certificates that have signed the certificate for the remote broker. For bridge_capath to work correctly, the certificate files must have '.crt' as the file ending and you must run 'c_rehash ' each time you add/remove a certificate.
bridge_certfilefile path
Both certificate and PSK based encryption are configured on a per-listener basis.
Authentication plugins can be created to replace the password_file and psk_file options (as well as the ACL options) with e.g. SQL based lookups.
It is possible to support multiple authentication schemes at once. A config could be created that had a listener for all of the different encryption options described above and hence a large number of ways of authenticating.
GENERAL OPTIONS
acl_filefile path
Set the path to an access control list file. If defined, the contents of the file are used to control client access to topics on the broker.If this parameter is defined then only the topics listed will have access. Topic access is added with lines of the format:
topic [read|write|readwrite]
The access type is controlled using 'read', 'write' or 'readwrite'. https://casinoagepandaluckyndqvthe.peatix.com. This parameter is optional (unless includes a space character) - if not given then the access is read/write. can contain the + or # wildcards as in subscriptions.
The first set of topics are applied to anonymous clients, assumingallow_anonymousis true. User specific topic ACLs are added after a user line as follows:
user
The username referred to here is the same as inpassword_file. It is not the clientid.
It is also possible to define ACLs based on pattern substitution within the topic. The form is the same as for the topic keyword, but using pattern as the keyword.
pattern [read|write|readwrite]
The patterns available for substition are:
- •%u to match the username of the client
The substitution pattern must be the only text for that level of hierarchy. Pattern ACLs apply to all users even if the 'user' keyword has previously been given.
Example:
pattern write sensor/%u/data
Allow access for bridge connection messages:
pattern write $SYS/broker/connection/%c/state
If the first character of a line of the ACL file is a # it is treated as a comment.
Reloaded on reload signal. The currently loaded ACLs will be freed and reloaded. Existing subscriptions will be affected after the reload.
allow_anonymous [ true | false ]
Boolean value that determines whether clients that connect without providing a username are allowed to connect. If set tofalsethen another means of connection should be created to control authenticated client access. Defaults totrue.Reloaded on reload signal.
allow_duplicate_messages [ true | false ]
If a client is subscribed to multiple subscriptions that overlap, e.g. foo/# and foo/+/baz , then MQTT expects that when the broker receives a message on a topic that matches both subscriptions, such as foo/bar/baz, then the client should only receive the message once.Mosquitto keeps track of which clients a message has been sent to in order to meet this requirement. This option allows this behaviour to be disabled, which may be useful if you have a large number of clients subscribed to the same set of topics and want to minimise memory usage.
It can be safely set totrueif you know in advance that your clients will never have overlapping subscriptions, otherwise your clients must be able to correctly deal with duplicate messages even when then have QoS=2.
Defaults totrue.
Reloaded on reload signal.
auth_opt_*value
Reloaded on reload signal. Note that currently connected clients will be unaffected by any changes.
connection_messages [ true | false ]
If set totrue, the log will include entries when clients connect and disconnect. If set tofalse, these entries will not appear.Reloaded on reload signal.
include_dirdir
log_destdestinations
Send log messages to a particular destination. Possible destinations are:stdoutstderrsyslogtopic.stdoutandstderrlog to the console on the named output.
sysloguses the userspace syslog facility which usually ends up in /var/log/messages or similar and topic logs to the broker topic '$SYS/broker/log/', where severity is one of D, E, W, N, I, M which are debug, error, warning, notice, information and message. Message type severity is used by the subscribe and unsubscribe log_type options and publishes log messages at $SYS/broker/log/M/subscribe and $SYS/broker/log/M/unsubscribe.
Thefiledestination requires an additional parameter which is the file to be logged to, e.g. 'log_dest file /var/log/mosquitto.log'. The file will be closed and reopened when the broker receives a HUP signal. Only a single file destination may be configured.
Use 'log_dest none' if you wish to disable logging. Defaults to stderr. This option may be specified multiple times.
Note that if the broker is running as a Windows service it will default to 'log_dest none' and neither stdout nor stderr logging is available.
Reloaded on reload signal.
log_facilitylocal facility
log_timestamp [ true | false ]
Boolean value, if set totruea timestamp value will be added to each log entry. The default istrue.Reloaded on reload signal.
log_typetypes
Choose types of messages to log. Possible types are:debug,error,warning,notice,information,subscribe,unsubscribe,websockets,none,all.Defaults toerror,warning,notice andinformation. This option may be specified multiple times. Note that thedebug type (used for decoding incoming/outgoing network packets) is never logged in topics.
Reloaded on reload signal.
max_inflight_messagescount
The maximum number of QoS 1 or 2 messages that can be in the process of being transmitted simultaneously. This includes messages currently going through handshakes and messages that are being retried. Defaults to 20. Set to 0 for no maximum. If set to 1, this will guarantee in-order delivery of messages.Reloaded on reload signal.
max_queued_messagescount
The maximum number of QoS 1 or 2 messages to hold in the queue above those messages that are currently in flight. Defaults to 100. Set to 0 for no maximum (not recommended). See also thequeue_qos0_messagesoption.Reloaded on reload signal.
message_size_limitlimit
Reloaded on reload signal. The experiment (itch) (nubeh) mac os. The currently loaded username and password data will be freed and reloaded. Clients that are already connected will not be affected.
See alsomosquitto_passwd(1).
persistence [ true | false ]
Iftrue, connection, subscription and message data will be written to the disk in mosquitto.db at the location dictated by persistence_location. When mosquitto is restarted, it will reload the information stored in mosquitto.db. The data will be written to disk when mosquitto closes and also at periodic intervals as defined by autosave_interval. Writing of the persistence database may also be forced by sending mosquitto the SIGUSR1 signal. Iffalse, the data will be stored in memory only. Defaults tofalse.Reloaded on reload signal.
persistence_filefile name
The filename to use for the persistent database. Defaults to mosquitto.db.Reloaded on reload signal.
persistence_locationpath
The path where the persistence database should be stored. Must end in a trailing slash. If not given, then the current directory is used.Reloaded on reload signal.
persistent_client_expirationduration
This option allows persistent clients (those with clean session set to false) to be removed if they do not reconnect within a certain time frame. This is a non-standard option. As far as the MQTT spec is concerned, persistent clients persist forever.Badly designed clients may set clean session to false whilst using a randomly generated client id. This leads to persistent clients that will never reconnect. Mind control stephen marley mp3 download. This option allows these clients to be removed.
The expiration period should be an integer followed by one of h d w m y for hour, day, week, month and year respectively. For example:
- •persistent_client_expiration 14d
Reloaded on reload signal. The currently loaded identity and key data will be freed and reloaded. Clients that are already connected will not be affected.
queue_qos0_messages [ true | false ]
Set totrueto queue messages with QoS 0 when a persistent client is disconnected. These messages are included in the limit imposed by max_queued_messages. Defaults tofalse.Note that the MQTT v3.1 spec states that only QoS 1 and 2 messages should be saved in this situation so this is a non-standard option.
Reloaded on reload signal.
retained_persistence [ true | false ]
This is a synonym of thepersistenceoption.Reloaded on reload signal.
retry_intervalseconds
The integer number of seconds after a QoS=1 or QoS=2 message has been sent that mosquitto will wait before retrying when no response is received. If unset, defaults to 20 seconds.Reloaded on reload signal.
store_clean_intervalseconds
The integer number of seconds between the internal message store being cleaned of messages that are no longer referenced. Lower values will result in lower memory usage but more processor time, higher values will have the opposite effect. Setting a value of 0 means the unreferenced messages will be disposed of as quickly as possible. Defaults to 10 seconds.Reloaded on reload signal.
sys_intervalseconds
The integer number of seconds between updates of the $SYS subscription hierarchy, which provides status information about the broker. If unset, defaults to 10 seconds.Set to 0 to disable publishing the $SYS hierarchy completely.
Reloaded on reload signal.
upgrade_outgoing_qos [ true | false ]
The MQTT specification requires that the QoS of a message delivered to a subscriber is never upgraded to match the QoS of the subscription. Enabling this option changes this behaviour. Ifupgrade_outgoing_qosis settrue, messages sent to a subscriber will always match the QoS of its subscription. This is a non-standard option not provided for by the spec. Defaults tofalse.Reloaded on reload signal.
userusername
When run as root, change to this user and its primary group on startup. If mosquitto is unable to change to this user and group, it will exit with an error. The user specified must have read/write access to the persistence database if it is to be written. If run as a non-root user, this setting has no effect. Defaults to mosquitto.This setting has no effect on Windows and so you should run mosquitto as the user you wish it to run as.
Not reloaded on reload signal.
LISTENERS
The network ports that mosquitto listens on can be controlled using listeners. The default listener options can be overridden and further listeners can be created.
General Options
bind_addressaddress
Listen for incoming network connections on the specified IP address/hostname only. This is useful to restrict access to certain network interfaces. To restrict access to mosquitto to the local host only, use 'bind_address localhost'. This only applies to the default listener. Use the listener variable to control other listeners.Not reloaded on reload signal.
http_dirdirectory
When a listener is using the websockets protocol, it is possible to serve http data as well. Sethttp_dirto a directory which contains the files you wish to serve. If this option is not specified, then no normal http connections will be possible.Not reloaded on reload signal.
listenerport[bind address/host]
Listen for incoming network connection on the specified port. A second optional argument allows the listener to be bound to a specific ip address/hostname. If this variable is used and neither the globalbind_addressnorportoptions are used then the default listener will not be started.Thebind address/hostoption allows this listener to be bound to a specific IP address by passing an IP address or hostname. For websockets listeners, it is only possible to pass an IP address here.
This option may be specified multiple times. See also themount_pointoption.
Not reloaded on reload signal.
max_connectionscount
Limit the total number of clients connected for the current listener. Set to-1to have 'unlimited' connections. Note that other limits may be imposed that are outside the control of mosquitto. See e.g.limits.conf(5).Not reloaded on reload signal.
mount_pointtopic prefix
This option is used with the listener option to isolate groups of clients. When a client connects to a listener which uses this option, the string argument is attached to the start of all topics for this client. This prefix is removed when any messages are sent to the client. This means a client connected to a listener with mount pointexamplecan only see messages that are published in the topic hierarchyexampleand above.Not reloaded on reload signal.
portport number
Set the network port for the default listener to listen on. Defaults to 1883.Not reloaded on reload signal.
protocolvalue
Set the protocol to accept for this listener. Can bemqtt, the default, orwebsocketsif available.Websockets support is currently disabled by default at compile time. Certificate based TLS may be used with websockets, except that only thecafile,certfile,keyfileandciphersoptions are supported.
Not reloaded on reload signal.
use_username_as_clientid [ true | false ]
Setuse_username_as_clientidto true to replace the clientid that a client connected with with its username. This allows authentication to be tied to the clientid, which means that it is possible to prevent one client disconnecting another by using the same clientid. Defaults to false.If a client connects with no username it will be disconnected as not authorised when this option is set to true. Do not use in conjunction withclientid_prefixes.
See alsouse_identity_as_username.
Not reloaded on reload signal.
websockets_log_levellevel
Change the websockets logging level. This is a global option, it is not possible to set per listener. This is an integer that is interpreted by libwebsockets as a bit mask for its lws_log_levels enum. See the libwebsockets documentation for more details.To use this option,log_type websocketsmust also be enabled. Defaults to 0.
Certificate based SSL/TLS Support
The following options are available for all listeners to configure certificate based SSL support. See also 'Pre-shared-key based SSL/TLS support'.
cafilefile path
At least one ofcafileorcapathmust be provided to allow SSL support.cafileis used to define the path to a file containing the PEM encoded CA certificates that are trusted.
capathdirectory path
At least one ofcafileorcapathmust be provided to allow SSL support.capathis used to define a directory that contains PEM encoded CA certificates that are trusted. Forcapathto work correctly, the certificates files must have '.pem' as the file ending and you must run 'c_rehash ' each time you add/remove a certificate.
certfilefile path
- The list of allowed ciphers, each separated with a colon. Available ciphers can be obtained using the 'openssl ciphers' command.
crlfilefile path
- Path to the PEM encoded keyfile.
require_certificate [ true | false ]
- Configure the version of the TLS protocol to be used for this listener. Possible values aretlsv1.2,tlsv1.1andtlsv1. If left unset, the default of allowing all of TLS v1.2, v1.1 and v1.0 is used.
use_identity_as_username [ true | false ]
cipherscipher:list
psk_hinthint
Thepsk_hintoption enables pre-shared-key support for this listener and also acts as an identifier for this listener. The hint is sent to clients and may be used locally to aid authentication. The hint is a free form string that doesn't have much meaning in itself, so feel free to be creative.If this option is provided, seepsk_fileto define the pre-shared keys to be used or create a security plugin to handle them.
tls_versionversion
- Setuse_identity_as_usernameto have the psk identity sent by the client used as its username. The username will be checked as normal, sopassword_fileor another means of authentication checking must be used. No password will be used.
CONFIGURING BRIDGES
Multiple bridges (connections to other brokers) can be configured using the following variables.
Bridges cannot currently be reloaded on reload signal.
addressaddress[:port][address[:port]], addressesaddress[:port][address[:port]]
Specify the address and optionally the port of the bridge to connect to. This must be given for each bridge connection. If the port is not specified, the default of 1883 is used.Multiple host addresses can be specified on the address config. See theround_robinoption for more details on the behaviour of bridges with multiple addresses.
bridge_attempt_unsubscribe [ true | false ]
bridge_protocol_versionversion
- This variable marks the start of a new bridge connection. It is also used to give the bridge a name which is used as the client id on the remote broker.
keepalive_intervalseconds
- Set the amount of time a bridge using the lazy start type must be idle before it will be stopped. Defaults to 60 seconds.
local_clientidid
- Configure the password to be used when connecting this bridge to the local broker. This may be important when authentication and ACLs are being used.
local_usernameusername
- If set totrue, publish notification messages to the local and remote brokers giving information about the state of the bridge connection. Retained messages are published to the topic $SYS/broker/connection//state unless otherwise set withnotification_topics. If the message is 1 then the connection is active, or 0 if the connection has failed. Defaults totrue.
notification_topictopic
This replaces the old 'clientid' option to avoid confusion with local/remote sides of the bridge. 'clientid' remains valid for the time being.
remote_passwordvalue
Configure a password for the bridge. This is used for authentication purposes when connecting to a broker that supports MQTT v3.1 and up and requires a username and/or password to connect. This option is only valid if a remote_username is also supplied.This replaces the old 'password' option to avoid confusion with local/remote sides of the bridge. 'password' remains valid for the time being.
remote_usernamename
Configure a username for the bridge. This is used for authentication purposes when connecting to a broker that supports MQTT v3.1 and up and requires a username and/or password to connect. See also theremote_passwordoption.This replaces the old 'username' option to avoid confusion with local/remote sides of the bridge. 'username' remains valid for the time being.
restart_timeoutvalue
automaticis the default start type and means that the bridge connection will be started automatically when the broker starts and also restarted after a short delay (30 seconds) if the connection fails.
Bridges using thelazystart type will be started automatically when the number of queued messages exceeds the number set with thethresholdoption. It will be stopped automatically after the time set by theidle_timeoutparameter. Use this start type if you wish the connection to only be active when it is needed.
A bridge using theoncestart type will be started automatically when the broker starts but will not be restarted if the connection fails.
thresholdcount
Topic | Local Prefix | Remote Prefix | Validity | |
1 | value | value | value | valid |
2 | value | value | ' | valid |
3 | value | ' | value | valid |
4 | value | ' | ' | valid (no remapping) |
5 | ' | value | value | valid (remap single local topic to remote) |
6 | ' | value | ' | invalid |
7 | ' | ' | value | invalid |
8 | ' | ' | ' | invalid |
To remap an entire topic tree, use e.g.:
This option can be specified multiple times per bridge.
Care must be taken to ensure that loops are not created with this option. If you are experiencing high CPU load from a broker, it is possible that you have a loop where each broker is forever forwarding each other the same messages.
See also thecleansessionoption if you have messages arriving on unexpected topics when using incoming topics.
Example Bridge Topic Remapping. The configuration below connects a bridge to the broker attest.mosquitto.org. It subscribes to the remote topic$SYS/broker/clients/totaland republishes the messages received to the local topictest/mosquitto/org/clients/total
try_private [ true | false ]
If try_private is set totrue, the bridge will attempt to indicate to the remote broker that it is a bridge not an ordinary client. If successful, this means that loop detection will be more effective and that retained messages will be propagated correctly. Not all brokers support this feature so it may be necessary to settry_privatetofalseif your bridge does not connect properly.Defaults totrue.
SSL/TLS Support
The following options are available for all bridges to configure SSL/TLS support.
bridge_attempt_unsubscribe [ true | false ]
bridge_cafilefile path
One ofbridge_cafileorbridge_capathmust be provided to allow SSL/TLS support.bridge_cafile is used to define the path to a file containing the PEM encoded CA certificates that have signed the certificate for the remote broker.
bridge_capathfile path
One ofbridge_capathorbridge_capathmust be provided to allow SSL/TLS support.bridge_capath is used to define the path to a directory containing the PEM encoded CA certificates that have signed the certificate for the remote broker. For bridge_capath to work correctly, the certificate files must have '.crt' as the file ending and you must run 'c_rehash ' each time you add/remove a certificate.
bridge_certfilefile path
- Pre-shared-key encryption provides an alternative to certificate based encryption. A bridge can be configured to use PSK with thebridge_identityandbridge_pskoptions. This is the client identity used with PSK encryption. Only one of certificate and PSK based encryption can be used on one bridge at once.
bridge_insecure [ true | false ]
When using certificate based TLS, the bridge will attempt to verify the hostname provided in the remote certificate matches the host/address being connected to. This may cause problems in testing scenarios, sobridge_insecuremay be set tofalseto disable the hostname verification.Setting this option totruemeans that a malicious third party could potentially inpersonate your server, so it should always be set tofalsein production environments.
Advice inc mac os. bridge_keyfilefile path
- Mosc Nat De Vota (prototype) Mac Os 11
bridge_tls_versionversion
Mosc Nat De Vota (prototype) Mac Os Pro
- Mosc Nat De Vota (prototype) Mac Os Xlimits.conf(5)
- moderators (5) - Submission addresses for moderated groups
- modprobe.d (5) - Configuration directory for modprobe
- modprobe (5) - Configuration directory for modprobe
- modules-load.d (5) - Configure kernel modules to load at boot
- modules-load (5) - Configure kernel modules to load at boot