How to change Jenkins default folder on Windows?

Michał Kuliński picture Michał Kuliński · Oct 2, 2012 · Viewed 44.6k times · Source

How to change Jenkins default folder on Windows where Jenkins runs as Windows service. I want to change C:\Users\Coola\.jenkins folder to d:\Jenkins due to lack of space on C: partition (Every build takes ~10MB of free space). I don't want to reinstall Jenkins as Windows service. I just want to change folder of existing Jenkins instance. In case of lack of global solution I could focus only on relocating jobs folder.

Thanks in advance for your help.

Answer

grams picture grams · Oct 3, 2012
  • Stop Jenkins service
  • Move C:\Users\Coola\.jenkins folder to d:\Jenkins
  • Using regedit, change HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Jenkins\ImagePath to "d:\Jenkins\jenkins.exe"
  • Start service