This guide describes how RabbitMQ can be installed and configured manually on Windows. In general we recommend using one the more automation-friendly options for Windows when possible.
RabbitMQ requires a 64-bit supported version of Erlang for Windows to be installed. Latest binary builds for Windows can be obtained from the Erlang/OTP Version Tree page.
Erlang will appear in the Start Menu, and \erl{version}\bin\erl.exe will be in C:\Program Files for 64-bit Erlang installations
Important: your system should only have one version of Erlang installed. Please consult the Windows-specific Issues page.
In case there's an existing RabbitMQ installation with the broker running as a service and you installed an Erlang VM with a different architecture then the service must be uninstalled before updating ERLANG_HOME.
Set ERLANG_HOME to where you actually put your Erlang installation, e.g. C:\Program Files\erl{version} (full path). The RabbitMQ batch files expect to execute %ERLANG_HOME%\bin\erl.exe.
Go to Start > Settings > Control Panel > System > Advanced > Environment Variables. Create the system environment variable ERLANG_HOME and set it to the full path of the directory which contains bin\erl.exe.
After making sure a supported Erlang version is installed, download rabbitmq-server-windows-3.11.17.zip.
Description | Download | Signature |
---|---|---|
Installer for Windows systems (from GitHub) | rabbitmq-server-windows-3.11.17.zip | Signature |
From the zip file, extract the folder named rabbitmq_server-3.11.17 into C:\Program Files\RabbitMQ (or somewhere suitable for application files).
The Erlang cookie is a shared secret used for authentication between RabbitMQ nodes and CLI tools. The value is stored in a file commonly referred to as the Erlang cookie file.
The cookie file used by the service account and the user running rabbitmqctl.bat must be synchronised for CLI tools such as rabbitmqctl.bat to function. All nodes in a cluster must have the same cookie value (cookie file contents).
Please see How CLI Tools Authenticate to Nodes (and Nodes to Each Other): the Erlang Cookie for details.
Within the rabbitmq_server-3.11.17\sbin directory are some scripts which run commands to control the RabbitMQ server.
The RabbitMQ server can be run as either an application or service (not both).
Log in as an administrator. To see the output, run these from a Command Prompt in the sbin directory.
Note: On Windows Vista (and later) it is necessary to elevate privilege (e.g. right-click on the icon to select Run as Administrator).
Set up the system path so RabbitMQ server and CLI tools from the sbin directory can be executed without using fully qualified paths.
Now it should be possible to run rabbitmq commands from any (administrator) Command Prompt.
Navigate to rabbitmq_server-3.11.17\sbin to run commands if the system path does not contain the RabbitMQ sbin directory.
By default, the RabbitMQ logs and node's data directory are stored in the current user's Application Data directory e.g. C:\Documents and Settings\%USERNAME%\Application Data or C:\Users\%USERNAME%\AppData\Roaming.
Execute echo %APPDATA% at a Command Prompt to find this directory. Alternatively, Start > Run %APPDATA% will open this folder.
A node can be configured to use a different data directory using one of these environment variables: RABBITMQ_BASE, RABBITMQ_MNESIA_BASE or RABBITMQ_MNESIA_DIR. Please read the relocation guide for a description of how each of these variables works.
The application is started by the rabbitmq-server.bat script in sbin.
The service will run fine using its default settings. It is possible to customise the RabbitMQ environment or edit configuration.
Important: after setting environment variables, it is necessary to restart the node.
Run the command
rabbitmq-server.bat -detached
This will start a node in the background (not attached to the Command Prompt).
Alternatively, rabbitmq-server.bat can be executed in Windows Explorer to start a node in foreground.
When a node is started, a Command Prompt window opens, displays a short startup banner, indicating that the RabbitMQ broker has been started successfully.
If the node was started without the -detached option, e.g. using Windows Explorer, a second Command Prompt window will be necessary to control the application using CLI tools.
Important: closing the original Command Prompt window will forcefully shut down a server started this way.
The service will run in the security context of the system account without the need for a user to be logged in on a console. This is normally more appropriate for production use. The server should not be run as a service and application simultaneously.
The service runs using the rabbitmq-service.bat script in sbin.
The service will run fine using its default settings. It is possible to customise the RabbitMQ environment or edit configuration.
Important: after setting environment variables, it is necessary to reinstall the service.
Install the service by running
rabbitmq-service.bat install
A service with the name defined by RABBITMQ_SERVICENAME should now appear in the Windows Services control panel (Start > Run services.msc).
To manage the service (install, remove, start, stop, enable, disable), use rabbitmq-service.bat commands. Alternatively, the Windows Services panel (services.msc) can be used to perform some of the same functions as the service script.
To start the broker, execute
rabbitmq-service.bat start
If the output from this command is "Service RABBITMQ_SERVICENAME started", then the service was started successfully.
Confirm the service named RABBITMQ_SERVICENAME
reports a "Started" status in Services:
Start > Run services.msc.
If you have an existing installation and are planning to upgrade the Erlang VM from a 32bit to a 64bit version then you must uninstall the broker before upgrading the VM. The installer will not be able to stop or remove a service that was installed with an Erlang VM of a different architecture.
Links to RabbitMQ directories can be found in the Start Menu.
There is also a link to a command prompt window that will start in the sbin dir, in the Start Menu. This is the most convenient way to run the command line tools. Note that CLI tools will have to authenticate to the RabbitMQ node running locally. That involves a shared secret file which has to be placed into the correct location for the user.
To stop the broker or check its status, use rabbitmqctl.bat in sbin (as an administrator).
rabbitmqctl.bat stop
The following command performs the most basic node health check and displays some information about the node if it is running:
rabbitmqctl.bat status
See RabbitMQ CLI tools guide and the Monitoring and Health Checks guide for details.
Server logs are critically important in troubleshooting and root cause analysis. See Logging and File and Directory Location guides to learn about log file location, log rotation and more.
In the event that the Erlang VM crashes whilst RabbitMQ is running as a service, rather than writing the crash dump to the current directory (which doesn't make sense for a service) it is written to an erl_crash.dump file in the base directory of the RabbitMQ server (set by the RABBITMQ_BASE environment variable, defaulting to %APPDATA%\%RABBITMQ_SERVICENAME% - typically %APPDATA%\RabbitMQ otherwise).
The broker creates a user guest with password guest. Unconfigured clients will in general use these credentials. By default, these credentials can only be used when connecting to the broker as localhost so you will need to take action before connecting from any other machine.
See the documentation on access control for information on how to create more users and delete the guest user.
RabbitMQ nodes bind to ports (open server TCP sockets) in order to accept client and CLI tool connections. Other processes and tools such as anti-virus software may prevent RabbitMQ from binding to a port. When that happens, the node will fail to 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. Make sure the following ports are accessible:
It is possible to configure RabbitMQ to use different ports and specific network interfaces.
We aim to make RabbitMQ a first-class citizen on Windows. However, sometimes there are circumstances beyond our control. Please consult the Windows-specific Issues page.
If you have questions about the contents of this guide or any other topic related to RabbitMQ, don't hesitate to ask them on the RabbitMQ mailing list.
If you'd like to contribute an improvement to the site, its source is available on GitHub. Simply fork the repository and submit a pull request. Thank you!