How to reconfigure RabbitMQ not to use %appdata% for config files?
Follow up for question RabbitMQ: change port on Windows Server
How to reconfigure RabbitMQ not to use %appdata% for config files?
Follow up for question RabbitMQ: change port on Windows Server
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:
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.