100% Free Forever
AI-Powered Learning
Industry Expert Content
Certificates & Badges
Learn At Your Own Pace
Messaging

Installing and Running RabbitMQ

How to install RabbitMQ locally with Docker or a native package, start the broker, and enable the management plugin.

FoundationsBeginner7 min readJul 10, 2026
Analogies

Installing and Running RabbitMQ

The fastest way to run RabbitMQ locally is the official Docker image, which ships in a management-enabled variant that includes the web-based admin UI out of the box. For production or bare-metal setups, RabbitMQ also provides native packages for Debian/Ubuntu, RHEL/CentOS, and other distributions via its own APT and Yum repositories, which is the recommended route over generic OS package repositories because it tracks upstream releases more closely and pulls in a compatible Erlang version.

🏏

Cricket analogy: Like a franchise using a pre-fitted training facility for a quick pre-season camp instead of building a stadium from scratch, running RabbitMQ via Docker gets you a working broker in minutes rather than a manual build.

Running RabbitMQ with Docker

The management image exposes two important ports: 5672 for AMQP client connections and 15672 for the web-based management UI. Mapping both when starting the container lets you connect a client library on 5672 while browsing queues, exchanges, and connections in a browser on 15672. Data is not persisted by default unless you mount a volume for /var/lib/rabbitmq, so a container removed with docker rm loses all queues and messages unless that path is backed by a named volume.

🏏

Cricket analogy: Like a stadium having a players' tunnel (5672, for the players/clients) and a separate media entrance (15672, for the public-facing view), Docker exposes two distinct ports for two distinct audiences.

bash
docker run -d --name rabbitmq \
  -p 5672:5672 \
  -p 15672:15672 \
  -v rabbitmq_data:/var/lib/rabbitmq \
  -e RABBITMQ_DEFAULT_USER=app_user \
  -e RABBITMQ_DEFAULT_PASS=app_password \
  rabbitmq:3.13-management

# check it started cleanly
docker logs -f rabbitmq

The -management tag variant (e.g. rabbitmq:3.13-management) includes the rabbitmq_management plugin pre-enabled. If you use the plain rabbitmq:3.13 image instead, you'll need to run rabbitmq-plugins enable rabbitmq_management inside the container yourself to get the web UI on port 15672.

Native Package Installation and the Erlang Dependency

RabbitMQ requires a compatible Erlang/OTP version to run; installing a RabbitMQ version that expects a newer Erlang than what's installed (or vice versa) is one of the most common causes of a broker that fails to start on bare metal. This is precisely why the team maintains its own Cloudsmith-hosted APT and RPM repositories with a matching Erlang package alongside RabbitMQ itself, rather than relying on whatever Erlang version happens to ship in a generic Ubuntu or CentOS repository, which often lags behind or is incompatible.

🏏

Cricket analogy: Like a bat needing willow of a specific grade to meet MCC regulations, RabbitMQ needs a specific compatible Erlang version; using the wrong one is like turning up with an ineligible bat and getting no-balled at the toss.

Do not install RabbitMQ from a generic distro package repository (like the default Ubuntu apt repo) in production; it frequently ships an outdated RabbitMQ and/or an incompatible Erlang version. Use RabbitMQ's official Cloudsmith-hosted repositories (documented on rabbitmq.com) so RabbitMQ and Erlang versions are guaranteed compatible.

  • The official rabbitmq:<version>-management Docker image is the fastest way to get a working broker with the admin UI.
  • Port 5672 is for AMQP client traffic; port 15672 is for the web-based management UI.
  • Mount a volume at /var/lib/rabbitmq or data is lost when the container is removed.
  • Native installs require a compatible Erlang/OTP version; mismatches are a common cause of startup failure.
  • Use RabbitMQ's official APT/Yum repositories rather than generic distro repos for production installs.
  • The management plugin can be enabled manually with rabbitmq-plugins enable rabbitmq_management.
  • Set RABBITMQ_DEFAULT_USER / RABBITMQ_DEFAULT_PASS (or equivalent) instead of relying on the default guest account outside localhost.

Practice what you learned

Was this page helpful?

Topics covered

#Messaging#RabbitMQStudyNotes#Database#InstallingAndRunningRabbitMQ#Installing#Running#RabbitMQ#Docker#StudyNotes#SkillVeris