# Appendix: Configuring additional Document Generation Services resources

This section explains hows to add servers to an existing cluster.

1. Stop “DocGenServices Service” on all existing servers.
2. Go to “C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.5.3\sbin” and execute “rabbitmqctl stop_app” on each clustered server.
3. Setup the environment variable “RABBITMQ_BASE” as described above on the new servers.
4. Copy the .erlang.cookie file from the initial server to the new servers. `C:\Users\<UserThatInstalledERLang>\.erlang.cookie` and `C:\Windows\.erlang.cookie.`
   Note: You can change the values, but make sure these values match across file paths and if installed on separate machines; for example: `WKFS_DocGenServicesStaging`. You can locate this in the `Document Generation Services web.config` or the `Transforms.xml` for your environment.
5. Modify the rabbitmq.config file on the existing servers to include the new servers. Copy this file to the new servers.
6. Delete folder C:\ProgramData\RabbitMQ\db from all existing servers.
7. Install otp_win64_17.5.exe on the new servers.
8. Install rabbitmq-server-3.5.3.exe on the new servers (If already installed then execute “rabbitmqctl stop_app” and delete C:\ProgramData\RabbitMQ\db).
9. On the new servers go to C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.5.3\sbin with a new cmd prompt and execute “rabbitmq-plugins enable rabbitmq_management.”
   Note: This step starts the service.
10. On the old servers go to C:\Program Files (x86)\RabbitMQ Server\rabbitmq_server-3.5.3\sbin and execute “rabbitmqctl.bat start_app.”
11. Verify at <http://localhost:15672/> that all servers are now in the cluster. You can check that URL from any of the clustered servers and you should see all servers listed together in the “Nodes” section.
12. Install Document Generation Services on the new servers.
13. Start “DocGenServices Service” on all servers.
14. Verify no errors exist at the end of “C:\ProgramData\WKFS\DGS\ DocGenSvcHost.log” on all servers.
15. Verify by assembling documents that each server is part of the RabbitMQ pool by checking “C:\ProgramData\WKFS\DGS\ DocGenSvcHost.log.”