User Agents

Web browsers and everyday web tech, explained

Open RabbitMQ in Browser with Docker: Step-by-Step

· 4 min read · Browsers

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

This guide shows you how to run RabbitMQ in a Docker container and open its web-based management UI in your browser. By the end, you'll have a working RabbitMQ instance with the management plugin enabled, accessible at http://localhost:15672. You only need Docker installed and a terminal.

What You'll Need

  • Docker installed and running (Docker Desktop on Windows/Mac, or Docker Engine on Linux).
  • A terminal or command prompt.
  • Basic familiarity with running commands in a terminal.

Step-by-Step

  1. Pull the RabbitMQ image with the management plugin. The official image tagged 3-management includes the web UI. Run:
    docker pull rabbitmq:3-management
  2. Run the container. Use the following command to start RabbitMQ with the management plugin and expose the necessary ports:
    docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management
    • -d runs it in the background.
    • --name rabbitmq gives the container a name for easy management.
    • -p 5672:5672 exposes the AMQP port for client connections.
    • -p 15672:15672 exposes the management UI port.
  3. Verify the container is running. Execute:
    docker ps
    You should see a row with rabbitmq in the NAMES column and status Up.
  4. Wait a few seconds. RabbitMQ takes a moment to fully start. Check the logs if you want to see progress:
    docker logs rabbitmq
    Look for a line like Management plugin started.
  5. Open your browser. Navigate to http://localhost:15672. You should see the RabbitMQ login page.
  6. Log in with default credentials. Use username guest and password guest. These work only when connecting from localhost (the same machine running the container).
  7. Explore the UI. After login, you'll see the management dashboard with tabs for Overview, Connections, Channels, Exchanges, Queues, and more.

Common Mistakes

  • Using the wrong image. The standard rabbitmq image does not include the management plugin. Always use rabbitmq:3-management or explicitly enable the plugin.
  • Forgetting to publish port 15672. If you omit -p 15672:15672, the UI won't be reachable from your host.
  • Accessing from a different machine. The default guest user is restricted to localhost. If you need remote access, you must create a new user with appropriate permissions (see Tips).
  • Not waiting for startup. The container may be running but RabbitMQ still initializing. Give it 5–10 seconds before opening the browser.

Tips

  • Use a named volume to persist data. Add -v rabbitmq_data:/var/lib/rabbitmq to the docker run command to keep queues and messages across container restarts.
  • Create a custom user for remote access. If you need to log in from another machine, run:
    docker exec -it rabbitmq rabbitmqctl add_user myuser mypassword
    docker exec -it rabbitmq rabbitmqctl set_user_tags myuser administrator
    docker exec -it rabbitmq rabbitmqctl set_permissions -p / myuser ".*" ".*" ".*"
    Then use myuser and mypassword to log in.
  • Stop and remove the container when done. Use docker stop rabbitmq and docker rm rabbitmq to clean up.
  • Check the logs for errors. If the UI doesn't load, docker logs rabbitmq is your first diagnostic tool.

Troubleshooting

  • Page won't load. Ensure the container is running (docker ps) and the port is published. Try curl http://localhost:15672 from the terminal; if it returns HTML, the issue is browser-related.
  • Login fails with guest/guest. This happens if you're accessing from a non-localhost IP (e.g., using a remote Docker host). Create a new user as described in Tips.
  • Port already in use. If 15672 is taken, change the host port, e.g., -p 15673:15672, and access http://localhost:15673.
  • Management plugin not enabled. If you used the plain rabbitmq image, enable the plugin manually:
    docker exec -it rabbitmq rabbitmq-plugins enable rabbitmq_management
    Then restart the container or wait for it to apply.
  • Container exits immediately. Check logs with docker logs rabbitmq. Common causes include memory limits or invalid configuration. Ensure you're using a compatible image and have enough free RAM.

Frequently Asked Questions

What is the default username and password for RabbitMQ?

The default credentials are guest for both username and password. They only work when connecting from localhost.

How do I access RabbitMQ from another computer?

You need to create a new user with permissions (see Tips) and access the server's IP address instead of localhost. Also, ensure your firewall allows port 15672.

Can I use the standard rabbitmq image instead?

Yes, but you must enable the management plugin manually using rabbitmq-plugins enable rabbitmq_management inside the container.

How do I stop the RabbitMQ container?

Run docker stop rabbitmq. To remove it permanently, use docker rm rabbitmq.

Will my queues and messages persist if I restart the container?

Only if you mount a volume. Without a volume, all data is lost when the container is removed. Add -v rabbitmq_data:/var/lib/rabbitmq to persist data.

Why do I see a blank page after login?

This usually indicates a browser cache issue or a problem with the management plugin. Try hard-refreshing (Ctrl+F5) or clearing the browser cache. If it persists, check the container logs for errors.