Menu

The Homebrew RabbitMQ Formula

Overview

Homebrew is a popular package manager for macOS. RabbitMQ formula is available from Homebrews core tap (out of the box).

The formula will also install a recent supported Erlang/OTP version as a dependency.

Installation

Before installing make sure the taps are up-to-date:

brew update

Then, install RabbitMQ server with:

brew install rabbitmq

Installing the RabbitMQ formula will install key dependencies such as a supported Erlang/OTP version.

Locations

The RabbitMQ server scripts and CLI tools are installed into the sbin directory under /usr/local/Cellar/rabbitmq/{version}/ for Intel Macs or /opt/homebrew/Cellar/rabbitmq/{version}/ for Apple Silicon Macs.

They should be accessible from /usr/local/opt/rabbitmq/sbin for for Intel Macs or /opt/homebrew/opt/rabbitmq/sbin for Apple Silicon Macs. Links to binaries have been created under /usr/local/sbin for Intel Macs or /opt/homebrew/sbin for Apple Silicon ones.

To find out locations for your installation, use:

brew info rabbitmq

With Homebrew, the node and CLI tools will use the logged in user account by default.

Running and Managing the Node

Unlike some other installation methods, namely the Debian and RPM packages, RabbitMQ Homebrew formula uses generic UNIX binary builds and does not require sudo.

Starting the Server

To start a node in the foreground, run:

CONF_ENV_FILE="/opt/homebrew/etc/rabbitmq/rabbitmq-env.conf" /opt/homebrew/opt/rabbitmq/sbin/rabbitmq-server

To start a node in the background, use brew services start:

brew services start rabbitmq

Stopping the Server

To stop a running node, use:

brew services stop rabbitmq

or CLI tools directly:

/opt/homebrew/opt/rabbitmq/sbin/rabbitmqctl shutdown

The command will wait for the node process to stop. If the target node is not running, it will exit with a warning.

Configuring the Server

File and directory locations used by Homebrew differ from Intel Macs to Apple Silicon ones. To find out locations for your installation, use:

brew info rabbitmq

On Apple Silicon Macs, RabbitMQ configuration file located at /opt/homebrew/etc/rabbitmq/rabbitmq.conf. The file does not exist by default and can be created.

It is possible to use environment variables to control certain settings. rabbitmq-env.conf is located at /opt/homebrew/etc/rabbitmq/rabbitmq-env.conf

See RabbitMQ configuration guide to learn more.

The formula sets up links to CLI tools under /usr/local/sbin for Intel Macs or /opt/homebrew/sbin for Apple Silicon Macs.

In case that directory is not in PATH, it is recommended to append it:

# for macOS Intel
export PATH=$PATH:/usr/local/sbin
# for Apple Silicon
export PATH=$PATH:/opt/homebrew/sbin

Add the above export to the shell profile (such as ~/.bashrc for bash or ~/.zshrc for zsh) to have PATH updated for every new shell, including OS restarts.

Getting Help and Providing Feedback

If you have questions about the contents of this guide or any other topic related to RabbitMQ, don't hesitate to ask them using GitHub Discussions or our community Discord server.

Help Us Improve the Docs <3

If you'd like to contribute an improvement to the site, its source is available on GitHub. Simply fork the repository and submit a pull request. Thank you!