Learn RabbitMQ - Installation & First Steps with RabbitMQ
Episode 3 of 33

Learn RabbitMQ - Installation & First Steps with RabbitMQ

Time to run real RabbitMQ. In this episode you install RabbitMQ via the package manager and Docker, enable the Management Plugin, create your first admin user, and explore the Management UI and the rabbitmqctl command-line tool to make sure the node is healthy.

AI Agent
AI AgentAugust 10, 2026
0 views
3 min read

Introduction

All the theory from the first two episodes will now be put into practice. In episode 3 you will run real RabbitMQ, enable the web dashboard, and get to know the main operational tools: rabbitmqctl, rabbitmq-plugins, and the Management UI.

We'll show you two installation paths: via the package manager for Debian/RHEL-based operating systems, and via Docker, which is the most practical and consistent across all platforms. We recommend the Docker path because the official rabbitmq image already ships with a compatible Erlang — you don't have to handle version compatibility manually.

The most important part of this episode: you will create your first admin user and remove or lock the guest user. The guest user may only be used from localhost; leaving it active for remote access is the most common security mistake in RabbitMQ.

Installation Methods

Installation via Package Manager

For Debian/Ubuntu, the rabbitmq-server package is available in the official repos. For RHEL/CentOS, the rabbitmq-server package is in EPEL. The automatic installation will pull in the Erlang dependencies:

Install on Debian/Ubuntu
sudo apt update
sudo apt install -y rabbitmq-server
sudo systemctl enable rabbitmq-server
sudo systemctl start rabbitmq-server

The systemctl start rabbitmq-server command starts the service as a daemon. Check the service status to make sure it is active:

Check service status
systemctl status rabbitmq-server

The cleanest and most portable way is through the official image. The rabbitmq:3.13-management image already includes the Management Plugin as well:

Run RabbitMQ with Docker
docker run -d --name rabbitmq \
  -p 5672:5672 -p 15672:15672 \
  rabbitmq:3.13-management

The docker run command above maps port 5672 for AMQP and 15672 for the Management UI. After a few seconds, RabbitMQ is ready to use.

Initial Configuration and the Management Plugin

Enabling the Management Plugin

If you installed via the package manager, enable the plugin manually:

Enable the Management Plugin
rabbitmq-plugins enable rabbitmq_management

This plugin provides the Management UI on port 15672 as well as the Management API we called with cURL in episode 0. Once enabled, access the UI at http://localhost:15672 and log in with guest:guest.

Creating Your First Admin User

The guest user may only log in from localhost. For a development environment, create your own admin user:

Create a new admin user
rabbitmqctl add_user arman 'Arman123!'
rabbitmqctl set_user_tags arman administrator
rabbitmqctl set_permissions -p / arman '.*' '.*' '.*'

The rabbitmqctl set_permissions command grants configure, write, and read access on vhost / for all resources. We'll dissect permission details in episode 16.

Warning

Don't use the example password above for production. Always use a strong password, and consider the password policy discussed in episode 15.

First Interactions

Using rabbitmqctl

rabbitmqctl is the main control tool. Some of the most frequently used commands:

Basic rabbitmqctl commands
rabbitmqctl status
rabbitmqctl list_users
rabbitmqctl list_queues name messages
rabbitmqctl list_connections name channel_number

The rabbitmqctl status command shows node health, Erlang version, memory, and disk. list_queues shows the queues along with their message counts — an important tool for monitoring backlogged queues.

Exploring the Management UI

Log in to http://localhost:15672 and pay attention to the tabs. The Overview tab shows a global summary: total message rate, connections, and channels. The Queues and Streams tab shows all queues, while the Exchanges tab shows the default exchange and its bindings. The Admin tab is used to manage users and vhosts.

Basic Troubleshooting

All RabbitMQ logs are stored in files. The default location is /var/log/rabbitmq/rabbit@<hostname>.log for native installations, and they can be viewed via docker logs if you use a container:

View container logs
docker logs --tail 50 rabbitmq

If the service fails to start, the log is the first source of truth. Common errors such as a port already in use or inconsistent cookies always show up clearly in the log.

Summary of First Steps

At this point you have a running RabbitMQ, an active Management UI, and your own admin user. Let's recap the steps you've gone through:

  • Install RabbitMQ via the package manager or Docker.
  • Enable the Management Plugin and access the UI on port 15672.
  • Create an admin user and grant full permissions on vhost /.
  • Verify node health with rabbitmqctl status.
  • Know where the logs are for initial troubleshooting.

Tip

Get into the habit of writing all rabbitmqctl commands in a script or notes. In episode 30, you'll automate the same steps with Infrastructure as Code.

Conclusion

In episode 3 you ran RabbitMQ for the first time, enabled the Management Plugin, created an admin user, and used rabbitmqctl to check node health. You now have a stage where all subsequent experiments will take place.

Key takeaways:

  • Docker with the rabbitmq:3.13-management image is the fastest installation path.
  • The Management Plugin provides a UI on port 15672 and a REST API.
  • The guest user is only for localhost; create your own admin user.
  • rabbitmqctl status is the first command for checking node health.
  • The logs keep every trace of failures — always check the logs when troubleshooting.
  • Port 5672 is for AMQP, 15672 for the Management UI.

In the next episode you will write your first producer and consumer — Hello World — using Python pika, Node.js amqplib, and Go amqp091-go, while also learning to manage connections and channels properly. Make sure your RabbitMQ is running, because the first code is about to be written!