Installing on Debian / Ubuntu

Download the Server

.deb for Debian-based Linux (from GitHub) rabbitmq-server_3.6.14-1_all.deb(Signature)
.deb for Debian-based Linux (from Bintray) rabbitmq-server_3.6.14-1_all.deb

Standard Ubuntu and Debian Repositories

rabbitmq-server is included in standard Debian and Ubuntu repositories. However, the versions included are often quite old. You will probably get better results installing the .deb from the apt repository on or Package Cloud. Check the Debian package and Ubuntu package details for which version of the server is available for which versions of the distribution.

You can either download it with the link above and install with dpkg, or use our APT repository (see below).

Supported Distributions

Below is a list of supported Debian-based distributions as of RabbitMQ 3.6.3:

The package may work on other Debian-based distributions if dependencies (see below) are satisfied (e.g. using the Wheezy backports repository) but their testing and support is done on a best effort basis.

Installing Erlang/OTP

RabbitMQ needs Erlang/OTP to run. Erlang/OTP packages in standard Debian and Ubuntu also can be quite outdated. Consider installing a newer version, such as 19.3.

Erlang Release Series Repositories that provide it
20.x Erlang Solutions. Supported starting with 3.6.11. NOT SUPPORTED by earlier versions.
19.x Erlang Solutions, Debian Stretch, Debian Jessie backports, Ubuntu Zesty (17.04)
18.x Erlang Solutions, Ubuntu Yakkety (16.10), Ubuntu Xenial (16.04)
17.x Erlang Solutions, Debian Jessie, Debian Wheezy backports

Erlang Version Pinning

apt package pinning can be used to avoid undesired Erlang upgrades. The following preference file example will pin esl-erlang package to to 19.3.6 and erlang-* packages to 19.3 (assuming package epoch for those packages is 1):

# /etc/apt/preferences.d/erlang
Package: erlang*
Pin: version 1:19.3-1
Pin-Priority: 1000

Package: esl-erlang
Pin: version 1:19.3.6
Pin-Priority: 1000
The above example should be placed into a file under /etc/apt/preferences.d/, e.g. /etc/apt/preferences.d/erlang.

Effective package pinning policy can be verified with

sudo apt-cache policy

Package Dependencies

When installing with apt, all dependencies should be met automatically in recent distributions (e.g. Ubuntu 14.04 or later, Debian Jessie). When that's not the case, dependency packages should be available from an appropriate backports repository. However, when installing via dpkg that's not the case. Below is the list of dependencies of RabbitMQ server as of 3.6.3:

  • erlang-nox (>= 1:16.b.3) | esl-erlang. Erlang can installed either from the standard repositories, backport repositories or Erlang Solutions.
  • init-system-helpers >= 1.13. Required for systemd support.
  • socat
  • adduser
  • logrotate

APT repositories

RabbitMQ hosts our own apt repository. We also have an alternative repository on Package Cloud.

Using APT Repository

Execute the following command to add the APT repository to your /etc/apt/sources.list.d:

echo 'deb testing main' |
     sudo tee /etc/apt/sources.list.d/rabbitmq.list
(Please note that the word testing in this line refers to the state of our release of RabbitMQ, not any particular Debian distribution. You can use it with Debian stable, testing or unstable, as well as with Ubuntu. We describe the release as "testing" to emphasise that we release somewhat frequently.)

(optional) To avoid warnings about unsigned packages, add our public key to your trusted key list using apt-key(8):

wget -O- |
     sudo apt-key add -

Our public signing key is also available from Bintray:

wget -O- |
     sudo apt-key add -

Run the following command to update the package list:

sudo apt-get update

Install rabbitmq-server package:

sudo apt-get install rabbitmq-server

Using PackageCloud APT Repository

PackageCloud installs packages via HTTPS and signs them using their GPG key. There are multiple ways to install:

  • Provided installation scripts
  • Using PackageCloud Chef cookbook
  • Using PackageCloud Puppet module
  • Manually
See PackageCloud RabbitMQ repository instructions.

Installation on Ubuntu 12.04

RabbitMQ Debian package can be installed on Ubuntu 12.04 with the help of additional apt repositories, namely:

Below is an example of how the above repositories can be added on the command line:

# Add Debian Wheezy backports repository to obtain init-system-helpers
gpg --keyserver --recv-key 7638D0442B90D010
gpg -a --export 7638D0442B90D010 | sudo apt-key add -
echo 'deb wheezy-backports main' | sudo tee /etc/apt/sources.list.d/wheezy_backports.list

# Add Erlang Solutions repository to obtain esl-erlang
wget -O- | sudo apt-key add -
echo 'deb wheezy contrib' | sudo tee /etc/apt/sources.list.d/esl.list

sudo apt-get update
sudo apt-get install init-system-helpers socat esl-erlang

# continue with RabbitMQ installation as explained above
wget -O- | sudo apt-key add -
echo 'deb testing main' | sudo tee /etc/apt/sources.list.d/rabbitmq.list

sudo apt-get update
sudo apt-get install rabbitmq-server

As mentioned above, Ubuntu 12.04 support in the RabbitMQ Debian package is offered on a best-effort basis. We highly recommend upgrading to Ubuntu 14.04 or 16.04.

Run RabbitMQ Server

Customise RabbitMQ Environment Variables

The server should start using defaults. You can customise the RabbitMQ environment. Also see how to configure components.

Start the Server

The server is started as a daemon by default when the RabbitMQ server package is installed.

As an administrator, start and stop the server as usual for Debian using service rabbitmq-server start.

Note: The server is set up to run as system user rabbitmq. If you change the location of the node database or the logs, you must ensure the files are owned by this user (and also update the environment variables).

Port Access

SELinux, and similar mechanisms may prevent RabbitMQ from binding to a port. When that happens, RabbitMQ will fail to start. Firewalls can prevent nodes and CLI tools from communicating with each other. Make sure the following ports can be opened:

  • 4369: epmd, a peer discovery service used by RabbitMQ nodes and CLI tools
  • 5672, 5671: used by AMQP 0-9-1 and 1.0 clients without and with TLS
  • 25672: used by Erlang distribution for inter-node and CLI tools communication and is allocated from a dynamic range (limited to a single port by default, computed as AMQP port + 20000). See networking guide for details.
  • 15672: HTTP API clients and rabbitmqadmin (only if the management plugin is enabled)
  • 61613, 61614: STOMP clients without and with TLS (only if the STOMP plugin is enabled)
  • 1883, 8883: (MQTT clients without and with TLS, if the MQTT plugin is enabled
  • 15674: STOMP-over-WebSockets clients (only if the Web STOMP plugin is enabled)
  • 15675: MQTT-over-WebSockets clients (only if the Web MQTT plugin is enabled)
It is possible to configure RabbitMQ to use different ports and specific network interfaces.

Default user access

The broker creates a user guest with password guest. Unconfigured clients will in general use these credentials. By default, these credentials can only be used when connecting to the broker as localhost so you will need to take action before connecting from any other machine.

See the documentation on access control for information on how to create more users, delete the guest user, or allow remote access to the guest user.

Controlling System Limits on Linux

RabbitMQ installations running production workloads may need system limits and kernel parameters tuning in order to handle a decent number of concurrent connections and queues. The main setting that needs adjustment is the max number of open files, also known as ulimit -n. The default value on many operating systems is too low for a messaging broker (eg. 1024 on several Linux distributions). We recommend allowing for at least 65536 file descriptors for user rabbitmq in production environments. 4096 should be sufficient for most development workloads.

There are two limits in play: the maximum number of open files the OS kernel allows (fs.file-max) and the per-user limit (ulimit -n). The former must be higher than the latter.

With systemd (Recent Linux Distributions)

On distributions that use systemd, the OS limits are controlled via a configuration file at /etc/systemd/system/rabbitmq-server.service.d/limits.conf, for example:


Without systemd (Older Linux Distributions)

The most straightforward way to adjust the per-user limit for RabbitMQ on distributions that do not use systemd is to edit the /etc/default/rabbitmq-server (provided by the RabbitMQ Debian package) or rabbitmq-env.conf to invoke ulimit before the service is started.

ulimit -S -n 4096

This soft limit cannot go higher than the hard limit (which defaults to 4096 in many distributions). The hard limit can be increased via /etc/security/limits.conf. This also requires enabling the module and re-login or reboot.

Note that limits cannot be changed for running OS processes.

For more information about controlling fs.file-max with sysctl, please refer to the excellent Riak guide on open file limit tuning.

Verifying the Limit

RabbitMQ management UI displays the number of file descriptors available for it to use on the Overview tab.

rabbitmqctl status
includes the same value.

The following command

can be used to display effective limits of a running process. $RABBITMQ_BEAM_PROCESS_PID is the OS PID of the Erlang VM running RabbitMQ, as returned by rabbitmqctl status.

Configuration Management Tools

Configuration management tools (e.g. Chef, Puppet, BOSH) provide assistance with system limit tuning. Our developer tools guide lists relevant modules and projects.

Managing the Broker

To stop the server or check its status, etc., you can use package-specific scripts (e.g. the service tool) or invoke rabbitmqctl (as an administrator). It should be available on the path. All rabbitmqctl commands will report the node absence if no broker is running.

  • Invoke rabbitmqctl stop to stop the server.
  • Invoke rabbitmqctl status to check whether it is running.

More info on rabbitmqctl.


Output from the server is sent to a RABBITMQ_NODENAME.log file in the RABBITMQ_LOG_BASE directory. Additional log data is written to RABBITMQ_NODENAME-sasl.log.

The broker always appends to the log files, so a complete log history is retained.

You can use the logrotate program to do all necessary rotation and compression, and you can change it. By default, this script runs weekly on files located in default /var/log/rabbitmq directory. See /etc/logrotate.d/rabbitmq-server to configure logrotate.