File and Directory Locations
Every RabbitMQ node uses a number of files and directories to load configuration: store data, metadata, log files, and so on. Their location can be changed.
This guide covers:
- How to customise location of various directories and files used RabbitMQ nodes
- Default locations of key files and directories on various operating systems
- Other topics related to file and directory locations
This guide accompanies the main Configuration guide.
A number of environment variables specifies where RabbitMQ should locate certain things. In most environments default values should work just fine.
Path and Directory Name Restrictions
Some of the environment variable configure paths and locations (node's base or data directory, plugin source and expansion directories, and so on). Those paths have must exclude a number of characters:
?(on Linux, macOS, BSD and other UNIX-like systems)
The above characters will render the node unable to start or function as expected (e.g. load plugin code modules and other files).
When changing file or directory locations, it is important to make sure that they have sufficient permissions for RabbitMQ node OS process to read and write from. It's best to assume that most directories and files used by RabbitMQ require read, write, and file creation permissions.
Debian, RPM, Homebrew and Windows installer packages will set up file system permissions suitable for most environments, however, when strict default permissions are used system-wide, it may be necessary to run additional configuration steps after installation to make sure RabbitMQ node file and directories have sufficient permissions
Note: Windows-specific. This base directory contains sub-directories for the RabbitMQ server's database and log files. Instead of overriding RABBITMQ_MNESIA_BASE and RABBITMQ_LOG_BASE individually, it may be easier to override the base directory instead.
The path to the configuration file, without
Path to a directory of RabbitMQ configuration files in the new-style (.conf) format. The files will be loaded in alphabetical order. Prefixing each files with a number is a common practice. See Configuration guide for more information.
This base directory contains sub-directories for the RabbitMQ
server's node database, message store and cluster state files, one for each node,
unless RABBITMQ_MNESIA_DIR is set explicitly.
It is important that effective RabbitMQ user has sufficient permissions
to read, write and create files and subdirectories in this directory
at any time.
This variable is typically not overridden. Usually
The directory where this RabbitMQ node's data is stored. This includes a schema database, message stores, cluster member information and other persistent node state.
The directory where RabbitMQ keeps its configuration schema used by the new style configuration file.
This base directory contains the RabbitMQ server's log files, unless RABBITMQ_LOGS is set.
The path of the RabbitMQ server's Erlang log file. This variable cannot be overridden on Windows.
The list of directories where plugin archive files are located and extracted
from. This is
Working directory used to expand enabled plugins when starting the server. It is important that effective RabbitMQ user has sufficient permissions to read and create files and subdirectories in this directory.
This file records explicitly enabled plugins. When a plugin is enabled or disabled, this file will be recreated. It is important that effective RabbitMQ user has sufficient permissions to read, write and create this file at any time.
File in which the process id is placed for use by
Default Locations on Linux, macOS, BSD
In the following table the
some paths is indicated. Debian and RPM package installations use an empty
Homebrew installations use the
installation-prefix (Homebrew Cellar) when installed. By
default this is
/opt/homebrew on Apple Silicon-based Macs.
(Not used - Windows only)
Default Locations on Windows
|(Not currently supported)
Generic Binary Build Defaults
These are the defaults obtained when a generic binary build
archive is unpacked without any modification. In
to the directory produced when extracting the archive.
These paths are not relevant for installation options that use the same package type but heavily customize it, such as the Homebrew formula.