Configuration files

The LavinMQ configuration file contains server and broker settings. This documentation will describe the configuration file and how different settings can be configured.

What is the LavinMQ configuration file?

Most settings in LavinMQ can be tuned using the configuration file. The structure of the configuration file is INI and comprises key-value pairs for properties and sections that organize the properties. The sections are split into three; one [main] section, one for the LavinMQ Management Interface [mgmt], and one for [amqp]. The syntax can be explained as:

  • One setting uses one line
  • Lines are structured Key = Value
  • Any line starting with the ; character indicates a comment

Where is the configuration file located?

The default configuration file location is under /etc/lavinmq

How do config changes take effect?

Changes to the configuration file will be applied after a restart of LavinMQ.


The table below outlines the different configurations available for LavinMQ, their default value, and example.

data_dir The path of the data directory where all data is stored.

Default: data_dir = /var/lib/lavinmq
log_level Controls how detailed the log should be. The level can be one of:
  • fatal (only fatal errors are logged)
  • error (fatal and errors are logged)
  • warn (fatal, errors and warnings are logged)
  • info (fatal, errors, warnings, and info messages are logged)
  • debug (all messages are logged).

Default: log_level = info
file_buffer_size File buffer size in byte.

Default: file_buffer_size = 16384
socket_buffer_size Socket buffer size in byte.

Default: socket_buffer_size = 16384
tls_cert TLS certificate (including chain).

Example: tls_cert = /etc/lavinmq/cert.pem
tls_key Private key for the TLS certificate. Example: ls_key = /etc/lavinmq/key.pem
tls_ciphers List of TLS ciphers to allow
tls_min_version Minimum allowed TLS version. Allowed options:
  • 1.0
  • 1.1
  • 1.2
  • 1.3

Default: tls_min_version = 1.2
tls_compability_mode Boolean value to enable TLS 1.0 and 1.1 and old cipher suites

Default: tls_compability_mode = false
tls_port Port used for TLS connections.

[amqp] tls_port = 5671
[mgmt] tls_port = 15671
port Port used for connections

[amqp] port = 5672
[mgmt] port = 15672
bind IP address that both the AMQP and HTTP servers will listen on.

[amqp] bind =
[mgmt] bind =
unix_path UNIX path to listen to

[amqp] unix_path = /tmp/lavinmq.sock
[mgmt] unix_path = /tmp/lavinmq-http.sock
stats_interval Statistics collection interval in milliseconds.

Default: stats_interval = 5000
stats_log_size Default: stats_log_size = 120
gc_segments_interval How often to garbage collect message segments in seconds.

Default: gc_segments_interval = 60
queue_max_acks Compact/GC queue indexes after this many acked messages.

Default: queue_max_acks = 2_000_000
set_timestamp Boolean value for setting the timestamp property.

Default: set_timestamp = false
tcp_nodelay Boolean value for disabling Nagle's algorithm, and sending the data as soon as it's available.

Default: tcp_nodelay = false
heartbeat Timeout value in seconds suggested by the server during connection negotiation. If set to 0 on both server and client, heartbeats are disabled.

Default: Heartbeat = 0
channel_max Maximum number of channels to negotiate with clients. Setting to 0 means an unlimited number of channels.

Default: channel_max = 2048
frame_max Maximum frame size in bytes.

Default: frame_max = 1048576
tcp_proxy_protocol Boolean value for PROXY protocol on amqp tcp connections

Default: tcp_proxy_protocol = false
unix_proxy_protocol Boolean value for PROXY protocol on unix domain socket connections

Default: unix_proxy_protocol = true
systemd_socket_name Default:
[amqp] systemd_socket_name = lavinmq-amqp.socket
[mgmt ] systemd_socket_name = lavinmq-http.socket

Example configuration file

An example of a configuration file can be found at GitHub.