File Locations

You can set the following environment variables to specify where RabbitMQ should locate certain things. Most people will not need to do this.

NameDescription
RABBITMQ_BASE 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.
RABBITMQ_CONFIG_FILE The path to the configuration file, without the .config extension. If the configuration file is present it is used by the server to configure RabbitMQ components. See Configuration guide for more information.
RABBITMQ_MNESIA_BASE This base directory contains sub-directories for the RabbitMQ server's Mnesia database files, one for each node, unless RABBITMQ_MNESIA_DIR is set explicitly. (In addition to Mnesia files this location also contains message storage and index files as well as schema and cluster details.)
RABBITMQ_MNESIA_DIR The directory where this RabbitMQ node's Mnesia database files are placed. (In addition to Mnesia files this location also contains message storage and index files as well as schema and cluster details.)
RABBITMQ_LOG_BASE This base directory contains the RabbitMQ server's log files, unless RABBITMQ_LOGS or RABBITMQ_SASL_LOGS are set explicitly.
RABBITMQ_LOGS The path of the RabbitMQ server's Erlang log file. This variable cannot be overridden on Windows.
RABBITMQ_SASL_LOGS The path of the RabbitMQ server's Erlang SASL (System Application Support Libraries) log file. This variable cannot be overridden on Windows.
RABBITMQ_PLUGINS_DIR The directory in which the plugins are found.
RABBITMQ_PLUGINS_EXPAND_DIR Working directory used to expand enabled plugins when starting the server.
RABBITMQ_ENABLED_PLUGINS_FILE This file records explicitly enabled plugins.
RABBITMQ_PID_FILE File in which the process id is placed for use by rabbitmqctl wait.

Unix Default Locations

In the following table the ${install_prefix} to some paths is indicated. Homebrew installations use the installation-prefix (Homebrew Cellar) when installed. By default this is /usr/local.

Deb / RPM package installations use an empty ${install_prefix}.

NameLocation
RABBITMQ_BASE (Not used)
RABBITMQ_CONFIG_FILE ${install_prefix}/etc/rabbitmq/rabbitmq
RABBITMQ_MNESIA_BASE ${install_prefix}/var/lib/rabbitmq/mnesia
RABBITMQ_MNESIA_DIR $RABBITMQ_MNESIA_BASE/$RABBITMQ_NODENAME
RABBITMQ_LOG_BASE ${install_prefix}/var/log/rabbitmq
RABBITMQ_LOGS $RABBITMQ_LOG_BASE/$RABBITMQ_NODENAME.log
RABBITMQ_SASL_LOGS $RABBITMQ_LOG_BASE/$RABBITMQ_NODENAME-sasl.log
RABBITMQ_PLUGINS_DIR $RABBITMQ_HOME/plugins
RABBITMQ_PLUGINS_EXPAND_DIR $RABBITMQ_MNESIA_BASE/$RABBITMQ_NODENAME-plugins-expand
RABBITMQ_ENABLED_PLUGINS_FILE ${install_prefix}/etc/rabbitmq/enabled_plugins
RABBITMQ_PID_FILE $RABBITMQ_MNESIA_DIR.pid

Windows Default Locations

NameLocation
RABBITMQ_BASE %APPDATA%\RabbitMQ
RABBITMQ_CONFIG_FILE %RABBITMQ_BASE%\rabbitmq
RABBITMQ_MNESIA_BASE %RABBITMQ_BASE%\db
RABBITMQ_MNESIA_DIR %RABBITMQ_MNESIA_BASE%\%RABBITMQ_NODENAME%
RABBITMQ_LOG_BASE %RABBITMQ_BASE%\log
RABBITMQ_LOGS %RABBITMQ_LOG_BASE%\%RABBITMQ_NODENAME%.log
RABBITMQ_SASL_LOGS %RABBITMQ_LOG_BASE%\%RABBITMQ_NODENAME%-sasl.log
RABBITMQ_PLUGINS_DIR Installation-directory/plugins
RABBITMQ_PLUGINS_EXPAND_DIR %RABBITMQ_MNESIA_BASE%\%RABBITMQ_NODENAME%-plugins-expand
RABBITMQ_ENABLED_PLUGINS_FILE %RABBITMQ_BASE%\enabled_plugins
RABBITMQ_PID_FILE (Not currently supported)

Generic Unix Default Locations

These are the defaults obtained when unpacking the Generic Unix tar-file and running the server without modification. In this table $RABBITMQ_HOME refers to the directory rabbitmq_server-3.6.8 produced when unpacking the download.

NameLocation
RABBITMQ_BASE (Not used)
RABBITMQ_CONFIG_FILE $RABBITMQ_HOME/etc/rabbitmq/rabbitmq
RABBITMQ_MNESIA_BASE $RABBITMQ_HOME/var/lib/rabbitmq/mnesia
RABBITMQ_MNESIA_DIR $RABBITMQ_MNESIA_BASE/$RABBITMQ_NODENAME
RABBITMQ_LOG_BASE $RABBITMQ_HOME/var/log/rabbitmq
RABBITMQ_LOGS $RABBITMQ_LOG_BASE/$RABBITMQ_NODENAME.log
RABBITMQ_SASL_LOGS $RABBITMQ_LOG_BASE/$RABBITMQ_NODENAME-sasl.log
RABBITMQ_PLUGINS_DIR $RABBITMQ_HOME/plugins
RABBITMQ_PLUGINS_EXPAND_DIR $RABBITMQ_MNESIA_BASE/$RABBITMQ_NODENAME-plugins-expand
RABBITMQ_ENABLED_PLUGINS_FILE $RABBITMQ_HOME/etc/rabbitmq/enabled_plugins
RABBITMQ_PID_FILE $RABBITMQ_MNESIA_DIR.pid