Ubuntu
RabbitMQ
Installation Guide
Linux
Message Queuing

Simple way to install RabbitMQ in Ubuntu?

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

Introduction

The quickest way to get RabbitMQ running on Ubuntu is to install the package, start the service, and enable the management plugin. That is enough for local development and basic testing, but it is also worth knowing that RabbitMQ’s official documentation recommends the Team RabbitMQ apt repositories for modern supported releases because Ubuntu’s default package can lag behind.

Core Sections

The simplest development install

If you want the most direct local setup and you are comfortable with the version provided by your configured repositories, these commands are enough to install and start RabbitMQ.

bash
1sudo apt update
2sudo apt install -y rabbitmq-server
3sudo systemctl enable --now rabbitmq-server
4sudo systemctl status rabbitmq-server

That installs RabbitMQ, starts it immediately, and configures it to start on boot. On Ubuntu, the service normally runs as the rabbitmq system user.

For a development machine, this is often the most practical starting point.

Verify that the broker is actually running

Do not stop at package installation. Check that the broker started successfully and can report its state.

bash
sudo rabbitmq-diagnostics status
sudo rabbitmqctl status

If these commands return healthy status information, you have a working broker rather than just an installed package. That distinction matters when service startup fails due to ports, permissions, or Erlang-related issues.

Enable the management UI

RabbitMQ ships with a management plugin that exposes a browser UI and HTTP API. It is extremely useful in development because it lets you inspect queues, exchanges, connections, and message rates without writing any client code first.

bash
sudo rabbitmq-plugins enable rabbitmq_management

After enabling it, the management UI is usually available on port 15672.

text
http://localhost:15672

For a fresh local setup, the default guest user is usually available only from localhost. That is fine for local testing, but it should not be your long-term admin setup.

Create a proper local admin user

Even on a development box, it is better to know how to create a named administrator account explicitly.

bash
sudo rabbitmqctl add_user devuser strongpassword
sudo rabbitmqctl set_user_tags devuser administrator
sudo rabbitmqctl set_permissions -p / devuser ".*" ".*" ".*"

That creates a user, grants admin rights, and gives full permissions on the default virtual host.

If you no longer want the default local-only guest account, you can remove it after confirming your new user works.

Understand the packaging caveat on Ubuntu

RabbitMQ’s official installation documentation recommends using Team RabbitMQ apt repositories for up-to-date supported packages on Debian and Ubuntu. The reason is that distribution-provided packages can be much older than the currently supported RabbitMQ release line.

So the practical split is:

  • use apt install rabbitmq-server for the fastest local setup when version lag is acceptable
  • use the official RabbitMQ apt repository instructions when you need current supported releases or a more production-aligned install path

That keeps the article honest without turning a “simple install” answer into a long repository-configuration tutorial.

Common post-install checks

Once the broker is running, confirm the basics before moving on:

  • service is active in systemctl
  • diagnostics commands return normal status
  • management UI opens locally
  • a test user can log in

Those checks catch most installation issues before you start debugging application code that depends on the broker.

Common Pitfalls

  • Treating package installation as success without checking whether the RabbitMQ service actually started can hide Erlang or service errors.
  • Forgetting to enable the management plugin makes local inspection much harder than it needs to be.
  • Leaving only the default guest account in place is fine for a quick localhost test but poor practice for a reusable environment.
  • Assuming Ubuntu’s default package is always the latest supported RabbitMQ release ignores the official packaging guidance.
  • Debugging client code before verifying the broker itself is healthy often wastes time on the wrong layer.

Summary

  • The simplest Ubuntu setup is apt install rabbitmq-server plus starting and enabling the service.
  • Always verify broker health with rabbitmq-diagnostics or rabbitmqctl after installation.
  • Enable rabbitmq_management for a much easier development workflow.
  • Create a named admin user instead of relying indefinitely on the default guest account.
  • For newer supported versions, RabbitMQ’s official docs recommend using Team RabbitMQ apt repositories instead of depending only on Ubuntu’s default package.

Related reading
Course
Beginner
27 lessons
10 hours
System Design Fundamentals

Build a strong foundation in designing scalable, reliable distributed systems.

View the course
Track what you have practised

A free account saves your progress, solutions and study plan across every problem on Codemia.

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

All Rights Reserved.