# Installing RabbitMQ

This section explains how to install RabbitMQ.

1. Create a new system Environment Variable to each Document Generation Services server.
   - Variable Name = RABBITMQ_BASE,
   - Variable Value = C:\ProgramData\RabbitMQ
   Note: This step is mandatory; if not completed, all RabbitMQ configuration information is placed at C:\Users\<current user>\AppData\Roaming\RabbitMQ. This path is incompatible if multiple users access the server hosting RabbitMQ.
2. If clustering multiple DGS servers together, a rabbitmq.config file is required to define the servers for the cluster. Update the server names for your environment. See Appendix: rabbitmq.config file for a sample .config file.
   Note: Consider the following:
   - Verify the file name is rabbitmq.config and is not saved as a .txt file.
   - Enter the server names in UPPERCASE.
3. Install otp_win64_19.1.exe (erl 8.1) from http://www.erlang.org/download.html; the default options are recommended.
4. If clustering multiple DGS servers together: You must update two cookie files for each server that will be clustered; note that these cookie files must be same on all servers. After installing RabbitMQ and erlang, place the rabbitmq.config file in C:\ProgramData\RabbitMQ on each machine. After restarting rabbit on all machines that will be clustered, rabbit should auto-cluster.
5. Install rabbitmq-server-3.6.5.exe from https://www.rabbitmq.com/download.html; the default options are recommended.
6. From a command prompt, enter C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.5\sbin; execute rabbitmq-plugins enable rabbitmq_management. If you receive an error stating Erlang cannot be located, check if a previous command prompt was open.
   Note: This enables a web UI for a Management application at http://localhost:15672/; username and password are both “guest.”

Repeat these steps for every server that hosts the main Document Generation Services application. Note that this procedure does not apply to servers that only host the Scheduler Service.