Installing on Windows – RabbitMQ

Run rabbitmq server

Overview

This guide covers installing RabbitMQ on Windows. It focuses on the two recommended installation options

: Using

  • Chocolatey Using
  • the

  • official installer as an administrative user

The

guide also covers some post-installation topics in the context

of Windows:

  • The basics of configuring nodes
  • CLI tool authentication
  • RabbitMQ Windows Service
  • Node Administration
  • Effects of firewall and security tools
  • Log file location
  • Default user limitations

and more. These topics are covered in more detail in the rest of the documentation guides.

A separate companion guide covers known issues specific to Windows and ways to mitigate them.

Using chocolatey

RabbitMQ packages are distributed through Chocolatey. New versions can take some time (sometimes weeks) to go through approvals, so this option is not guaranteed to provide the latest version. However, it manages the required dependencies.

To install RabbitMQ with Chocolatey, run the following command from the

command line or from PowerShell:

Choco install Rabbitmq

For many use cases, Chocolatey is the optimal installation method

. The

Chocolatey RabbitMQ package is open source and can be found on GitHub

.

Using

the installer The official RabbitMQ installer

is produced for each version of RabbitMQ.

Compared to installing through Chocolatey, this option gives Windows users the most flexibility, but also requires them to know certain assumptions and requirements in the installer:

  • Only one version of Erlang should be installed at a time Erlang must
  • be installed with an
  • administrative

  • account strongly recommends that rabbitMQ also be installed as an administrative account
  • The installation path should contain only ASCII characters. It is strongly recommended that the path does not contain spaces in any directory names.
  • It may be necessary to manually copy the shared secret file used by
  • CLI tools CLI tools require the

  • Windows console to operate in UTF-8 mode

When these conditions are not met, the Windows CLI and service tools may require reinstallation or other manual steps to work as expected

.

This is covered in more detail in the Windows-specific issues guide.

RabbitMQ dependencies

requires the installation of a supported 64-bit version of Erlang for Windows. The latest binary builds for Windows can be obtained from the Erlang/OTP Version Tree page.

Note that Erlang must be installed using an administrative account or it will not be discoverable to the RabbitMQ Windows service.

Once a supported version of Erlang is installed, download the RabbitMQ installer, rabbitmq-server-{version}.exe and run it. Installs RabbitMQ as a Windows service and starts it using the default settings.

Direct downloads

Description Download Signature Installer for Windows Systems (from GitHub) rabbitmq-server-3.11.13.exe

Signature Run the

RabbitMQ Windows Service

Once Erlang and RabbitMQ have been installed, a RabbitMQ node can be started as a Windows service. The RabbitMQ service starts automatically. The RabbitMQ service for Windows can be managed from the Start menu.

CLI Tools

RabbitMQ nodes are often managed, inspected, and operated with

CLI tools in PowerShell. On Windows,

CLI

tools

have a .bat suffix compared to other platforms. For example, rabbitmqctl on Windows is invoked as rabbitmqctl.bat.

For these tools to work, they must be able to authenticate with RabbitMQ nodes using a shared secret file called an Erlang cookie.

The main CLI tools guide covers most topics related to using command-line tools.

To explore which commands various RabbitMQ CLI tools provide, use

the help command: # lists the commands provided by rabbitmqctl.bat rabbitmqctl.bat help # lists the commands provided by rabbitmq-diagnostics.bat rabbitmq-diagnostics.bat help #… You guessed it! rabbitmq-plugins.bat help

For information about a specific command, pass its name as an argument to help:

rabbitmqctl.bat help add_user

Location

of the

cookie file On Windows, the location of the cookie file depends on whether the HOMEDRIVE and HOMEPATH environment variables are set.

If RabbitMQ is installed with a non-administrative account, a shared secret file used by CLI nodes and tools will not be placed in a correct location, which causes authentication errors when using CLI and rabbitmqctl.bat and CLI tools.

One of these options can be used to mitigate:

  • Reinstall RabbitMQ with an administrative user
  • Copy the .erlang.cookie file manually from %SystemRoot% or %SystemRoot%\system32\config\systemprofile to %HOMEDRIVE%%HOMEPATH%.

Node

Configuration

The service starts using its default settings, listening for connections on default interfaces and ports. The

configuration of the node is mainly done by a configuration file. Several available environment variables can be used to control the node data location, configuration file path, and so on.

This is discussed in more detail in the

Configuration Guide Changing Environment Variables

in Windows

Important: After setting the environment variables, you must reinstall the Windows service. Restarting the service will not be enough.

Managing a RabbitMQ node

Service Management

Links to RabbitMQ directories can be found

in the Start menu.

There is also a link to a Command Prompt window that will launch in the dir sbin in the Start menu. This is the most convenient way to run the command-line tools.

Note that CLI tools will need to authenticate to the target RabbitMQ node.

Stop

a node To stop the broker or check its status, use rabbitmqctl.bat

in sbin (as administrator).

rabbitmqctl.bat stop Checking the status of the node The following CLI command runs a basic health check and

displays information about the node if it is running.

# A basic check of the connectivity/authentication status of

the node and

the CLI tool status of rabbitmqctl.bat

For it to work, two conditions must be met:

The node must be

  • running
  • rabbitmqctl.bat must be able to authenticate with the node

See the CLI Tools section and the Health and Monitoring Checks guide for more information

. Management Server

log files

and

logs are vitally important in troubleshooting and root cause analysis. See the Logging and Locating Files and Directories guides for information about log file location, log rotation, and more.

Firewalls

and security tools

Firewalls and security tools can prevent the RabbitMQ Windows service and CLI tools from working correctly

.

Such tools must be configured to whitelist access to ports used by RabbitMQ.

Default user access

The broker creates a user guest with a guest password. Unconfigured clients will generally use these credentials. By default, these credentials can only be used when connecting to the broker as localhost, so you’ll need to take action before connecting from any other computer.

See the access control documentation for information about creating more users and deleting the guest user.

Port access RabbitMQ nodes bind to ports (open server TCP sockets) to accept client and CLI tool connections. Other processes and tools, such as antivirus software, can prevent RabbitMQ from joining a port. When that happens, the node will not start.

CLI tools, client libraries, and RabbitMQ nodes also open connections (client TCP sockets). Firewalls can prevent nodes and CLI tools from communicating with each other. Ensure that the following ports are accessible

:

  • 4369: epmd, a peer discovery service used by RabbitMQ
  • nodes and CLI tools 5672,

  • 5671: used by AMQP 0-9-1 and 1.0 clients without and with TLS 25672: used
  • for communication between nodes and CLI tools (Erlang distribution server port) and assigned from a dynamic range (limited to a single port by default, calculated as AMQP+20000 port). Unless external connections on these ports are actually required (for example, the cluster uses federation tools or CLIs are used on machines outside the subnet), these ports should not be publicly exposed. See the networking guide for more information.
  • 35672-35682: Used by CLI tools (Erlang distribution client ports) for communication with nodes and assigned from a dynamic range (calculated as server distribution port + 10000 through server distribution port + 10010). See the networking guide for more information.
  • 15672: HTTP API clients, management UI, and rabbitmqadmin
  • (only if management plug-in is enabled) 61613, 61614: STOMP clients without and with TLS (only if STOMP plug-in is enabled) 1883,

  • 8883: MQTT clients without and with TLS, if MQTT
  • plug-in is enabled 15674:

  • STOMP-over-WebSockets clients (only if the STOMP Web plug-in is enabled) 15675
  • :
  • MQTT-over-WebSockets clients (only if the MQTT Web plug-in is enabled)

You can configure RabbitMQ to use different ports and specific network interfaces

. Upgrading the Erlang virtual machine If you have an existing installation and plan to upgrade the Erlang virtual machine from a 32-bit version to a 64-bit version, you must uninstall the agent before upgrading

the virtual machine

. The installer will not be able to stop or remove a service that was installed with an Erlang virtual machine of a different architecture.

Dump file location

when running as a service In the event that the

Erlang virtual machine terminates when RabbitMQ is running as a service, instead of writing the memory dump to the current directory (which makes no sense for a service), it is written to a erl_crash.dump file in the base directory of the RabbitMQ server, by default to %APPDATA%\%RABBITMQ_SERVICENAME% – normally %APPDATA%\RabbitMQ otherwise.