How to install RabbitMQ Server on Ubuntu 18.04 LTS

RabbitMQ is the most popular free and open source message-queueing or message-broker software.

RabbitMQ is the most popular free and open source message-queueing or message-broker Software. RabbitMQ originally implemented Advanced Message Queuing Protocol (AMQP). It also supports protocols such as STOMP (Streaming Text Oriented Messaging Protocol), and MQTT (Message Queuing Telemetry Transport).

Generally, message-broker software is used for sending and receiving messages between various kinds of distributed services, systems or applications.

RabbitMQ, which has been written in Erlang programming language, has the following features:

  • Support for multiple protocols – AMQP, MQTT, STOMP, HTTP
  • Support for client interfaces and libraries for all major programming languages
  • Clustering / High Availability
  • A diverse set of tools and plugins
  • Routing messages between exchanges and queues
  • User-friendly web interface to monitor and control message broker
  • Tracing capabilities

In this tutorial, we are going to show you how to setup RabbitMQ on Ubuntu 18.04 (Bionic Beaver).

Installing RabbitMQ on Ubuntu

First, let us update ubuntu repositories:

sudo apt-get update

Add Signing Key using either of the following commands:

wget -O - "" | sudo apt-key add -


sudo apt-key adv --keyserver "" --recv-keys "0x6B73A36E6026DFCA"

Add Key
Add Key

Create Rabbitmq repository file.

 vim /etc/apt/sources.list.d/bintray.rabbitmq.list

Add following repositories to file.

deb bionic erlang
deb bionic main

Save and close the file.

Run Repository Update.

sudo apt-get update

Install RabbitMQ Server.

sudo apt-get install rabbitmq-server


Check RabbitMQ Server Status.

sudo systemctl status rabbitmq-server.service

Check Status
Check Status

If RabbitMQ is not running, then start service with this command:

sudo systemctl start rabbitmq-server.service

Enable RabbitMQ service on system boot.

sudo systemctl enable rabbitmq-server

RabbitMQ Ports

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 for inter-node and CLI tools communication
35672-35682: used by CLI tools (Erlang distribution client ports) for communication with nodes and is allocated from a dynamic range
15672: HTTP API clients, management UI 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)

Allow RabbitMQ Management UI Through Firewall

RabbitMQ management console runs on port 15672 and it needs to be granted permission via the firewall.

sudo ufw allow 15672

After a successful installation, we can access the web management console and it runs on “15672” port.

But by default, ‘Installation Management Console’ plugin is not enabled. This plugin is needed in order to monitor and manage the RabbitMQ server. It is also used to monitor queues, message rates and manage queues, bindings, and users etc.

Let us see how we can enable the ‘Installation Management Console’ plugin. But before we do that, let us take a look at all the RabbitMQ plugins that are available.

sudo rabbitmq-plugins list

Now enable the RabbitMQ Management plugin

sudo rabbitmq-plugins enable rabbitmq_management

Enable Plugin
Enable Plugin

We can access the Management console using the default guest user. But we need to create and add a new Admin user to access Management console.

Here we create a user with username ‘admin’ and password is also ‘admin’. But I would recommend using a strong password for security.

sudo rabbitmqctl add_user admin admin

Admin User
Admin User

Now we tag our user ‘admin’, which we created in the steps above, as ‘administrator’

sudo  rabbitmqctl set_user_tags admin administrator

Tag User
Tag User

Now we are ready to restart RabbitMQ service

sudo systemctl restart rabbitmq-server.service

Before we access Management UI, let us check the ports on the server

sudo netstat -tunlp


Management UI access

The Management Console can be accessed using either of these URLs:

  • http://ServerIp or
  • hostname:15672/

Eg: – / or

You will be able to view the console login window.

Management Login
Management Login

Then use the already created admin username and password to access the dashboard.

RabbitMQ Management Console
RabbitMQ Management Console

You have successfully installed and configured RabbitMQ server.

If you have any issues or questions feel free to ask in the comments section below.

Hey! I'm Darshana, a Linux / DevOps Engineer and also a contributor to FOSS Linux. I enjoy working on various kind of Linux distributions and cloud technologies. During my free time, I love to swim and hike across nature trails. Linux is my love and I'm here to share all my learnings with all of you! Hope you enjoyed reading my article.



Please enter your comment!
Please enter your name here





The Ubuntu Cinnamon Remix brings together Linux Mint's Cinnamon desktop with the Ubuntu Core. While some users are welcoming the new flavor of Ubuntu with open arms, others are scratching their heads, wondering where it fits in.
The wait is finally over (almost) for all you Ubuntu fans out there. The latest version of Ubuntu, 20.10 codenamed "Groovy Gorilla," is currently available in the beta version. I have tested out the distro myself, and it is stable enough to take out for a spin.

Linux Mint Cinnamon Vs. MATE: which one to choose?

Linux Mint is by far one of the most popular Linux distros on the market, especially among Windows users who are jumping into the Linux bandwagon. This is mostly because Linux Mint comes with a familiar desktop environment that resembles the classic Windows desktop. It offers tons of quality of life features, making it very user-friendly for users who have never tried Linux before.

CentOS vs. Fedora: Key Differences

Both Fedora and CentOS are RPM-based Linux distributions. The two share a lot of features in common but still have several differences. In this post, we introduce both Fedora and CentOS and look at their key differences in this comparison article.

The 10 Best Linux Performance Monitoring Tools

Do you want to monitor the performance of your Linux system? Are you looking for some powerful performance monitoring tools to help you out? If you agree, it's your day as we have put together a detailed list of the ten best Linux performance monitoring tools.

6 Essential Command-Line Utilities Every Linux User Should Know

Last week, we shared with you several "cool and fun" commands to get comfortable and confident with the Linux command-line. In our quest to further aid Linux users with mastery of the command line, or CLI, we present you with a variety of command-line utilities essential for all Linux users, regardless of proficiency level.