How to change default port(15672) of RabbitMQ Management plugin?
Master System Design with Codemia
Enhance your system design skills with over 120 practice problems, detailed solutions, and hands-on exercises.
RabbitMQ is a robust, widely-used open-source message broker and queueing system. The RabbitMQ Management Plugin provides a user-friendly interface which allows users to monitor and control every aspect of the message broker. By default, the management interface is accessible through port 15672. However, depending on network policies or specific integration needs, there might be a need to change this default port.
Understanding the RabbitMQ Management Plugin
Before changing the port, it’s essential to have a clear understanding of what the RabbitMQ Management Plugin is. It’s a feature-rich, browser-based UI that provides insights into RabbitMQ’s operations and allows for management tasks such as viewing and editing queues, bindings, and exchanges, monitoring throughputs, and more.
Steps to Change the Default Management Plugin Port
1. Locate the Configuration File
RabbitMQ’s behavior can be customized through its configuration file, which can be found at different locations based on your operating system:
- Linux:
/etc/rabbitmq/rabbitmq.conf - Windows:
%APPDATA%\RabbitMQ\rabbitmq.conf
If the file doesn’t exist, you may need to create it.
2. Modify the Configuration File
To change the management plugin port, you need to add or edit the management listener configuration in the rabbitmq.conf file. Here’s an example of how to set the port to 15682:
This line in the configuration tells RabbitMQ to open the management interface on port 15682 instead of the default 15672.
3. Restart RabbitMQ
After modifying the configuration file, you’ll need to restart your RabbitMQ server to apply the changes. This can typically be done with the following commands:
- Linux:
- Windows:
Checking the Changes
Once RabbitMQ restarts, you can check whether the new port is in effect by navigating to the management URL using the new port. For example, http://localhost:15682/ if you are accessing the service locally.
Why Change the Default Port?
Changing the default management port can be crucial for several reasons:
- Security: Changing from the well-known default port reduces the visibility of the management interface from automated scans.
- Conflicts: Avoiding conflicts with other services that might want to use the same port.
- Compliance: Meeting network security policies or compliance requirements that dictate specific port usage.
Best Practices and Considerations
When changing default configurations, such as the port of the management interface, consider the following best practices:
- Inform: Notify all system administrators and developers who interact with the RabbitMQ management interface of the change.
- Document: Update your system documentation to reflect changes in configuration.
- Secure: Ensure that the new port is secured appropriately, applying firewall rules or other network security configurations as necessary.
Summary Table
Here is a quick summary of key information about changing the RabbitMQ Management Plugin port:
| Action | Description |
| Locate Configuration File | Find or create rabbitmq.conf in the relevant folder. |
| Modify Configuration | Add management.tcp.port = <new_port> to the configuration file. |
| Restart RabbitMQ | Apply changes by restarting the RabbitMQ service. |
| Inform & Document Changes | Notify users and update documentation. |
| Enhance Security | Secure the new management interface port appropriately. |
Conclusion
Changing the default port of the RabbitMQ Management Plugin is a straightforward task that can significantly enhance your RabbitMQ deployment’s security and compatibility with network practices. It’s important to update all relevant stakeholders and documentation to ensure a smooth transition to the new configuration.

