RabbitMQ
RabbitMQ is an open-source message broker that implements AMQP and other messaging protocols. It routes messages between producers and consumers, decoupling the services in a distributed system. A built-in management plugin provides a web UI and HTTP API for monitoring queues, exchanges, and connections.
Software included
Section titled “Software included”| Component | Version |
|---|---|
| RabbitMQ | 4.3.2 |
| Ubuntu | 24.04 LTS |
Environment variables
Section titled “Environment variables”Set these optionally when you deploy from the marketplace. Leave a field blank to have a secure value generated.
| Variable | Description |
|---|---|
RABBITMQ_DEFAULT_USER | Administrator username. Cannot be guest; on first boot, the image removes the default guest user and creates this administrator so a usable configured administrator remains |
RABBITMQ_DEFAULT_PASS | RabbitMQ default user password |
Getting started
Section titled “Getting started”1. Connect to your VM
Section titled “1. Connect to your VM”ssh ubuntu@<your-vm-ip>2. Wait for first-boot configuration
Section titled “2. Wait for first-boot configuration”On the first boot, a setup script enables the management plugin, creates the administrator, applies
virtual-host permissions, and removes the default guest user. Track progress:
sudo journalctl -u rabbitmq-first-boot.service -fThe login message (MOTD) confirms when RabbitMQ is ready. You can also verify the broker directly:
systemctl status rabbitmq-serversudo rabbitmq-diagnostics ping3. Retrieve the administrator credentials
Section titled “3. Retrieve the administrator credentials”The generated credentials and connection details are stored in a root-only file:
sudo cat /etc/rabbitmq/credentials.txt| Field | Value |
|---|---|
| Username | Value of RABBITMQ_DEFAULT_USER, or generated securely on first boot |
| Password | Value of RABBITMQ_DEFAULT_PASS, or generated securely on first boot |
| Virtual host | / |
4. Access RabbitMQ
Section titled “4. Access RabbitMQ”Applications connect to the AMQP endpoint at:
<your-vm-ip>:5672The management UI is available at:
http://<your-vm-ip>:15672Managing RabbitMQ
Section titled “Managing RabbitMQ”# Check service statussystemctl status rabbitmq-server
# Restartsudo systemctl restart rabbitmq-server
# View logssudo journalctl -u rabbitmq-server -f| Path | Purpose |
|---|---|
/etc/rabbitmq/ | RabbitMQ configuration and state files |
/var/lib/rabbitmq/ | Broker database and persistent state |
/var/log/rabbitmq/ | RabbitMQ log files |
/etc/rabbitmq/credentials.txt | Generated credentials and endpoints |
Security
Section titled “Security”RabbitMQ uses port 5672 for AMQP and port 15672 for the management UI. UFW is enabled and allows SSH (port 22) only by default. Both RabbitMQ ports remain blocked until you allow trusted sources.
To allow access from a specific IP:
sudo ufw allow from <trusted-ip> to any port 5672sudo ufw allow from <trusted-ip> to any port 15672To access the management UI without opening its port, use an SSH tunnel:
# Run this on your local machinessh -L 15672:localhost:15672 ubuntu@<your-vm-ip>
# Then open in your browserhttp://localhost:15672For production use, keep AMQP on a private network or configure RabbitMQ TLS. Place the management UI behind a reverse proxy so you can serve it over HTTPS with a trusted TLS certificate.