How To Install RabbitMQ on Ubuntu 16.04

Using a Different System?

  • How to Install RabbitMQ on CentOS 7

Are we missing a guide for your target system? Request one, or submit your own!

RabbitMQ is a widely used open-source message broker written in the Erlang programming language. As a message-oriented middleware, RabbitMQ can be used to implement the Advanced Message Queuing Protocol (AMQP) on all modern operating systems.

This article explains how to install RabbitMQ on a Vultr Ubuntu 16.04 server instance.


Before getting started, you need to:

  • Deploy a brand new Vultr Ubuntu 16.04 server instance.
  • Log into the server as a non-root sudo user.

Step 1: Update the system

Use the following commands to update your Ubuntu 16.04 system to the latest stable status:

sudo apt-get updatesudo apt-get upgrade

Step 2: Install Erlang

Since RabbitMQ is written in Erlang, you need to install Erlang before you can use RabbitMQ:

cd ~wget dpkg -i esl-erlang_20.1-1/~ubuntu/~xenial_amd64.deb

Verify your installation of Erlang:


You will be brought into the Erlang shell which resembles:

Erlang/OTP 20 [erts-9.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false]Eshell V9.1  (abort with ^G)

Press Ctrl+C twice to quit the Erlang shell.

Step 3: Install RabbitMQ

Add the Apt repository to your Apt source list directory (/etc/apt/sources.list.d):

echo "deb xenial main" | sudo tee /etc/apt/sources.list.d/bintray.rabbitmq.list

Next add our public key to your trusted key list using apt-key:

wget -O- | sudo apt-key add -

Run the following command to update the package list:

sudo apt-get update

Install the rabbitmq-server package:

sudo apt-get install rabbitmq-server

Step 4: Start the Server

sudo systemctl start rabbitmq-server.servicesudo systemctl enable rabbitmq-server.service

You can check the status of RabbitMQ:

sudo rabbitmqctl status

By default RabbitMQ creates a user named “guest” with password “guest”. You can also create your own administrator account on RabbitMQ server using following commands. Change password to your own password.

sudo rabbitmqctl add_user admin password sudo rabbitmqctl set_user_tags admin administratorsudo rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"

Step 5: Enable and use the RabbitMQ management console

Enable the RabbitMQ management console so that you can monitor the RabbitMQ server processes from a web browser:

sudo rabbitmq-plugins enable rabbitmq_managementsudo chown -R rabbitmq:rabbitmq /var/lib/rabbitmq/

Next, you need to setup an administrator user account for accessing the RabbitMQ server management console. In the following commands, “mqadmin” is the administrator’s username, “mqadminpassword” is the password. Remember to replace them with your own.

sudo rabbitmqctl add_user mqadmin mqadminpasswordsudo rabbitmqctl set_user_tags mqadmin administratorsudo rabbitmqctl set_permissions -p / mqadmin ".*" ".*" ".*"

Now, visit the following URL:


Log in with the credentials you had specified earlier. You will be greeted with the RabbitMQ remote management console, where you can learn more about RabbitMQ.

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article

No comments

Powered by Blogger.