Server INI File Parameters

October 15, 2018 ยท View on GitHub

The Server INI file is created using the Lazarus IniFiles unit. There are four sections:

  • General - General application settings
  • MQTT - MQTT protocol settings
  • Server - Normal unencrypted TCP/IP listener settings
  • TLS - Encrypted SSL/TLS session listener settings

[General]

ParameterDatatypeDefaultDescription
DebugBoolean0Set to 1 to enable debug messages in the logs
LogFilenameString""Specify a log file name or leave blank to disable logging to a file
TitleString""Specify a title for the main application window or leave blank to use the default title
PasswordFileFilename""Specify a file to use as the password or authentication file. This file can be created using the Server GUI app

[MQTT]

ParameterDatatypeDefaultDescription
EnabledBooleanTrueSet to 0 to start the server application in disabled mode. Used for using the application to create an INI file without starting the server.
RequireAuthenticationBooleanFalseSet to 1 to require clients to authenticate using a username and password
AllowNullClientIDsBooleanFalseSet to 1 to allow clients to connect with null clientIDs. This will cause them to be assigned a randomly generated clientID.
StrictClientIDValidationBooleanFalseSet to 1 to enable strict ClientID validation
StoreOfflineQoS0MessagesBooleanFalseSet to 1 to store QoS0 messages dispatched to offline clients for when they reconnect
KeepAliveInteger30Disconnect the client if it hasn't been heard from in 1.5 times this many seconds
MaxSessionAgeInteger1080The number of minutes to retain session information for disconnected sessions
MaxSubscriptionAgeInteger1080The number of minutes to retain subscriptions for disconnected clients
MaximumQOSInteger2The maximum QoS level provided by the server. Any packets received at a higher QoS level will be downgraded.

[Server]

ParameterDatatypeDefaultDescription
ListenBoolean1Set to 0 to disable listening for non-SSL connections
InterfaceString"0.0.0.0"Specify an interface to listen on by IP address. "0.0.0.0" means listen on all interfaces.
PortInteger1883Specify a port to listen for incomming unencrypted connections on

[TLS]

ParameterDatatypeDefaultDescription
ListenBoolean0Set to 1 to enable listening TLS connections
InterfaceString"0.0.0.0"Specify an interface to listen on by IP address. "0.0.0.0" means listen on all interfaces.
PortInteger8883Specify a port to listen for incomming TLS encrypted connections
KeyString""Specify a filename that holds the server's private key. The key should be in PEM format.
CertificateString""Specify a certificate that holds the server's certificate. This should be in PEM format.
PasswordEncString""Specifies a password for decrypting the private key. Stored in encrypted form. Use the GUI to set it and save a configuration file