December 11, 2025•8 min read•RabbitMQ tutorial

RabbitMQ uses port 5672 by default for AMQP client connections. The RabbitMQ Management UI is typically available on port 15672.
RabbitMQ also uses several additional ports for TLS connections, clustering, Erlang distribution, and management. This guide explains the default RabbitMQ ports, what each one is used for, and when you need to expose or configure them.
| Port | Service | Purpose |
|---|---|---|
| 5672 | AMQP | Default RabbitMQ client connections |
| 5671 | AMQP over TLS | Secure client connections |
| 15672 | Management UI | RabbitMQ web management interface |
| 15671 | Management UI TLS | Secure management interface |
| 25672 | Erlang distribution | RabbitMQ node communication |
| 4369 | EPMD | Erlang Port Mapper Daemon |
Most setups only need two of them: 5672 for your applications and 15672 for the management interface. The rest matter when you enable TLS or run a cluster.
The default RabbitMQ port is 5672.
It is used for:
A connection URI using the default port looks like this:
amqp://localhost:5672If a client is configured with the amqp:// scheme and no explicit port, it falls back to 5672 automatically.
The RabbitMQ Management UI uses port 15672.
Open it in a browser at:
http://localhost:15672The management interface exposes:
The same port also serves the HTTP management API, which is what monitoring tools and clients like RabbitGUI use to talk to the broker.
To access the management interface, you will also need the correct RabbitMQ username and password. On a fresh install these are guest / guest, restricted to localhost. See RabbitMQ default login for the details.
Port 5672 is where your applications publish and consume messages. Every standard client library connects here unless you tell it otherwise.
With explicit credentials:
amqp://guest:guest@localhost:5672Without credentials:
amqp://localhost:5672What happens in each case:
guest / guest, which is the default RabbitMQ account.guest user works out of the box, but only over a loopback connection.guest is rejected by design. RabbitMQ refuses the guest user from any non-localhost address, so you must create a dedicated user. This is the single most common cause of a "connection refused" that is really an authentication failure, see RabbitMQ default login.Ports are also part of the connection URI in every client library. The JavaScript, Python, Java, and Go cheat sheets all use 5672 in their connection examples.
When TLS is enabled, RabbitMQ listens for encrypted AMQP connections on port 5671, using the amqps:// scheme:
amqps://your-host:5671Notes on 5671:
rabbitmq.conf.Pointing an amqp:// client at 5671, or an amqps:// client at 5672, produces a handshake failure rather than a clear error, so check the scheme and the port together.
Port 15672 is opened by the rabbitmq_management plugin. It serves both the web UI and the HTTP API.
URL
http://localhost:15672How to access it
The plugin must be enabled first. The rabbitmq:3-management and rabbitmq:4-management Docker images ship with it on, a package install does not:
rabbitmq-plugins enable rabbitmq_managementAuthentication
The UI requires a user with the management tag. The default guest user has it, but only over localhost. For any remote access, create a user and grant the tag:
rabbitmqctl add_user admin secure_password
rabbitmqctl set_user_tags admin administrator
rabbitmqctl set_permissions -p / admin ".*" ".*" ".*"Docker considerations
Inside a container the plugin listens on 15672, but the port is unreachable from your machine until you publish it with -p 15672:15672. A missing mapping looks exactly like a broken management plugin from the outside.
You can also point RabbitGUI at this port instead of using the built-in UI:

RabbitGUI is a RabbitMQ IDE that connects over the same management port and gives you a far better interface for browsing queues, publishing messages, and inspecting bindings. Credentials are the same ones the UI uses, covered in RabbitMQ default login.
Port 15671 serves the management UI and HTTP API over TLS:
https://your-host:15671It is not enabled by default. You turn it on by configuring a TLS listener for the management plugin in rabbitmq.conf:
management.ssl.port = 15671
management.ssl.cacertfile = /path/to/ca_certificate.pem
management.ssl.certfile = /path/to/server_certificate.pem
management.ssl.keyfile = /path/to/server_key.pemOnce 15671 is configured, close 15672 in production. The management API accepts credentials over HTTP basic auth, so plain HTTP sends them in the clear.
Single-node setups never touch these two ports. Clusters cannot work without them.
Port 25672 carries Erlang distribution traffic: node-to-node replication, queue synchronization, and rabbitmqctl commands issued from another machine.
It is derived from the AMQP port (5672 + 20000), so changing the AMQP port shifts it too. Nodes also open a range of dynamic ports above it, by default 25672–25682, so a firewall rule for a single port is not enough.
Port 4369 is the Erlang Port Mapper Daemon. It is the directory service that tells a joining node which port a named node is actually listening on, which is what makes peer discovery work.
EPMD must be reachable between all cluster members. It must never be exposed to the internet: it is unauthenticated and lists every Erlang node on the host.
Both ports should be restricted to the cluster's private network:
# Pin the distribution port range for firewall rules
distribution.listener.port_range.min = 25672
distribution.listener.port_range.max = 25672In Docker, a port is only reachable from your machine if you publish it. This is the most common reason RabbitMQ "isn't listening" when it is running perfectly well.
services:
rabbitmq:
image: rabbitmq:4-management
ports:
- "5672:5672"
- "15672:15672"What each mapping does:
amqp://guest:guest@localhost:5672)http://localhost:15672)Two things to keep in mind:
-management image tag, or the management plugin is not enabled and 15672 stays closed no matter how you map it.amqp://rabbitmq:5672), with no published port needed. Publishing is only for access from the host.For clustering, add the Erlang ports as well, and make sure every node shares the same Erlang cookie. Full walkthrough: How to set up RabbitMQ with Docker and Docker Compose.
Ask the broker directly. rabbitmq-diagnostics reports every active listener and its port:
rabbitmq-diagnostics listenersCheck the effective configuration. rabbitmqctl prints the values RabbitMQ actually loaded, which may differ from what you think is in rabbitmq.conf:
rabbitmqctl environment | grep -i portCheck the config file. Ports are set in rabbitmq.conf:
# AMQP port
listeners.tcp.default = 5672
# Management plugin port
management.tcp.port = 15672
# Inter-node communication
distribution.listener.port = 25672Check what the OS has open. Useful when RabbitMQ starts but nothing can reach it:
# Linux
ss -tlnp | grep -E '5672|15672'
# macOS or Linux
lsof -i :5672
netstat -an | grep 5672Check the Docker mapping. The container port and the host port are not the same thing:
docker ps
docker port rabbitmqCheck EPMD for cluster nodes. It lists every Erlang node and the distribution port it holds:
epmd -namesWork through these in order:
rabbitmqctl status or docker ps. A crashed node refuses connections exactly like a firewall does.-p 5672:5672 the listener exists inside the container only.localhost from inside another container is that container, not the broker. Use the service name on a shared Docker network.amqps:// client on 5672, or amqp:// on 5671, fails at the handshake.guest login from a remote host often surfaces as a connection error. See RabbitMQ default login.rabbitmq-plugins enable rabbitmq_management, or use a -management Docker image.-p 15672:15672 or the matching ports entry in Docker Compose.-p 8080:15672 is served at http://localhost:8080.guest only works over localhost. Create a user with the management tag for remote access.management.tcp.port was changed in rabbitmq.conf, the UI is on that port instead. Confirm with rabbitmq-diagnostics listeners.For a better RabbitMQ management experience, try RabbitGUI. It connects on the management port (15672) and gives you everything you need to browse queues, publish messages, and debug your broker.
RabbitMQ tutorialWhat Is RabbitMQ?Learn what RabbitMQ is, how it works, and why it’s used in modern software architectures. Discover RabbitMQ’s benefits, key components, use cases, and how it enables reliable asynchronous communication.
RabbitMQ tutorialSetting up RabbitMQ with Docker and Docker ComposeA complete guide to running RabbitMQ in Docker containers, from quick start examples to advanced configuration options for production environments
RabbitMQ tutorialRabbitMQ Best PracticesA practical guide to RabbitMQ best practices covering queue design, message handling, connection management, monitoring, and production-readiness tips.Debug, monitor, and manage RabbitMQ with a modern developer interface.
Available on Windows, Mac, and Linux.

Cheat sheetRabbitMQ Javascript Cheat-SheetEverything you need to know to get started with RabbitMQ in NodeJs and Docker with code examples ready to go.
ProductHow to log into your CloudAMQP RabbitMQ instanceUse RabbitGUI to connect to your CloudAMQP instance and manage your dead letter queues with ease
ProductHow security is built into RabbitGUIRabbitGUI was built with security as a top priority for its users, and here is how it was done!