RabbitMQ Server Configuration


RabbitMQ comes with default built-in settings which will most likely be sufficient for running your RabbitMQ server effectively. If it runs fine, then you probably don't need any configuration at all. If you have other constraints, RabbitMQ provides two general ways to customise the server:

RabbitMQ environment settings are prefixed with RABBITMQ_ and environment settings take priority over start script built-in default values. Local shell environment settings will take priority over the more general settings described below. Similarly, values set in the configuration file take priority over built-in defaults.

Customise RabbitMQ Environment

Unix (general)

On Unix-based systems (including Linux, MacOSX) you can create/edit rabbitmq-env.conf to define environment variables. Its location is not configurable (unlike rabbitmq.config, which is by default in the same directory).

Use the standard environment variable names (but drop the RABBITMQ_ prefix) e.g.

#example rabbitmq-env.conf file entries
#Rename the node
#Config file location and new filename bunnies.config
More info on using rabbitmq-env.conf

RabbitMQ Environment Variables

It is unlikely you will need to set any of these environment variables. If you have non standard requirements, then RabbitMQ environment variables include:

RABBITMQ_NODE_IP_ADDRESS Defaults to the empty string - meaning bind to all network interfaces. This can be changed if you only want to bind to one network interface.
  • Unix, Linux: `env hostname`
  • MacOSX: `env hostname -s`
The name of the current machine
COMPUTERNAME Windows: localhost The name of the current machine
RABBITMQ_BASE Windows: %APPDATA%\RabbitMQ This base directory contains sub-directories for the RabbitMQ server's database and log files. Alternatively, set RABBITMQ_MNESIA_BASE and RABBITMQ_LOG_BASE individually.
  • Unix*: rabbit@$HOSTNAME
  • Windows: rabbit@%COMPUTERNAME%
The node name should be unique per erlang-node-and-machine combination. To run multiple nodes, see the clustering guide.
  • Unix*: /etc/rabbitmq/rabbitmq
  • Windows: %RABBITMQ_BASE%\rabbitmq
If the configuration file is present it is used by the server to configure RabbitMQ components. The .config extension is automatically appended by the Erlang runtime. This file is also used to auto-configure RabbitMQ clusters.
  • Unix*: /var/lib/rabbitmq/mnesia
  • Windows: %RABBITMQ_BASE%\db
The directory where Mnesia database files should be placed.
  • Unix*: /var/log/rabbitmq
  • Windows: %RABBITMQ_BASE%\log
Log files generated by the server will be placed in this directory.
ERLANG_SERVICE_MANAGER_PATH Windows Service: %ERLANG_HOME%\erts-5.7.4\bin This path is the location of erlsrv.exe, the Erlang service wrapper script.
RABBITMQ_SERVICENAME Windows Service: RabbitMQ The name of the installed service. This will appear in services.msc.
RABBITMQ_CONSOLE_LOG Windows Service: Set this variable to new or reuse to redirect console output from the server to a file named %RABBITMQ_SERVICENAME%.debug in the default RABBITMQ_BASE directory.
  • If not set, console output from the server will be discarded (default).
  • new A new file will be created each time the service starts.
  • reuse The file will be overwritten each time the service starts.
* Unix, Linux, MacOSX

Paths are given relative to the installation directory prefix. For example Mac OSX (macports) are normally based in /opt/local/, or /usr/local on Mac OSX (homebrew) and some BSD installations.

Configuration File

The rabbitmq.config File

The configuration file rabbitmq.config allows the RabbitMQ core application, Erlang services and RabbitMQ plugins to be configured. It is a standard Erlang configuration file, documented on the Erlang Config Man Page.

An example configuration file follows:

    {mnesia, [{dump_log_write_threshold, 1000}]},
    {rabbit, []}

This example will alter the dump_log_write_threshold for mnesia (increasing from the default of 100).

This configuration file is not the same as rabbitmq-env.conf, which can be used to set environment variables on non-windows systems. A future release of RabbitMQ will unify the two configuration mechanisms.