How to reconfigure RabbitMQ not to use %appdata% on Windows?

Viewed 1625
1 Answers

as described, a how to on how to re-config rabbit MQ to use an arbitrary directory. This will have some benefits regarding access of the database files etc. when running as a service without having to redefine the %appdata% access rights, which are user bound.

In your windows environmental settings, you'll need to redefine RABBITMQ_BASE, I have tested it with c:\rmq (or one of the others as described in the documentation). Set it to the directory you want to target. See image:

enter image description here

Next, it seems you need to run some commands, I haven't been able to target the correct directory during or prior installation.

So, run the following commands, basically it reinstalls the service again:

C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.14\sbin>rabbitmq-service.bat remove

C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.14\sbin>rabbitmq-service.bat install

C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.14\sbin>rabbitmq-service.bat start

Optional: reinstall management plugin:

C:\Program Files\RabbitMQ Server\rabbitmq_server-3.6.14\sbin>rabbitmq-plugins enable rabbitmq_management

As you can see, the database files are placed in the c:\rmq directory.

enter image description here

Related