Changing IDE default directories used for config, plugins, and caches storage
Common cases when you may need to change the default locations of the IDE files:
- user profile drive runs out of space
- disk is slow and you want to use faster HDD or SSD for caches
- default user profile points to the UNC path unsupported by the IDE
- home directory is on a network drive
- user profile directory is not detected correctly (Java bug 4787931)
- you want to create a portable installation on a USB stick
- home directory is encrypted and slows down the IDE or causes caches corruption
- caches should be excluded from the home directory backup
- antivirus or search indexer is scanning the home directory affecting IDE performance
- idea.config.path
- idea.system.path
- idea.plugins.path
- idea.log.path
Example:
idea.config.path=c:/work/idea/caches/trunk-config
idea.system.path=c:/work/idea/caches/trunk-system
idea.plugins.path=c:/work/idea/caches/trunk-plugins
- IDEA_PROPERTIES — IntelliJ IDEA
- CLION_PROPERTIES — CLion
- APPCODE_PROPERTIES — AppCode
- PYCHARM_PROPERTIES — PyCharm
- RUBYMINE_PROPERTIES — RubyMine
- DATAGRIP_PROPERTIES — DataGrip
- STUDIO_PROPERTIES — Android Studio
- WEBIDE_PROPERTIES — WebStorm
- PHPSTORM_PROPERTIES — PhpStorm
- GOLAND_PROPERTIES — GoLand
- RIDER_PROPERTIES — Rider
- RUSTROVER_PROPERTIES — RustRover
For example: IDEA_PROPERTIES=C:\Users\USER\idea.properties
The order in which IDE will read idea.properties files is as follows:
- Environment variable (%IDE%_PROPERTIES)
- HOME\idea.properties (where HOME is the user's home directory on the system)
- IDE_HOME\bin\idea.properties
- Default IDE configuration directory
Unlike .vmoptions file handling, idea.properties file with the higher priority doesn't undefine or discard variables already defined in the file location with lower priority. If there is the same variable defined in multiple properties files, the value of the variable from the higher priority file will be used, this way you can override the defaults already defined in IDE_HOME\bin\idea.properties in another file in the IDE default config directory or defined via the %IDE%_PROPERTIES environment variable.
Changing the default location of the IDE files using the Toolbox App
If you use the Toolbox App, note that the Toolbox App provides the possibility to set a custom location for each installed IDE in its own settings.
To change the default location of a particular tool, hover an IDE item in the Toolbox Tools tab, press a gear icon, click Settings | Configuration | Custom JVM options file location | System, plugins, config and logs directory.
Please sign in to leave a comment.
This is useful information. It would be nice if there was a comment here on what should/should not be copied during this process.
Jeff, It's assuming that you move the contents of these folders to the new corresponding locations.
What are the names of env. vars for androidStudio, webstorm, phpstorm?
I see. Wasn't aware of those. Thank you very much pointing this out!
STUDIO_PROPERTIES
WEBIDE_PROPERTIES
PHPSTORM_PROPERTIES
Android Studio has issues accepting its new reality... But maybe restart will fix that.
Also, I added evn var for studio, edited idea.properties as all others and AS fails to install update.
It did accept change of config and system directories but unlike all other JB apps it still creates directory under default location. Reboot did not help. Update issues are gone after setting _JAVA_OPTIONS values to "-Xms2048m"
I noticed that after all those changes I can't run program from normal (32bit) launcher. Only 64bit works. Why is that? Have I done something wrong?
Not sure when it changed, but `$CL_PROPERTIES` is not valid for CLion, at least for 2018.3.2 on 64 bit Linux. Reference `$IDE_HOME/bin/clion.sh`, the script tests for variable named `"$CLION_PROPERTIES"`
Here are straightforward instructions if you need two separate instances of the IDE running in a way
instance #2 won't be locked if instance #1 has a modal window, for PHPStorm64 using Java 64 under
Windows (you can change the directories to your liking):
- Copy the entire C:\users\xxx\.PhpStorm2017.2 folder to, say, d:\apps\JetbrainsSecondInstance\AlternativeConfFolder
- Copy the C:\Program Files\JetBrains\PhpStorm 2017.1.2\bin\idea.properties to, say, d:\apps\JetbrainsSecondInstance\idea.properties
- Edit the d:\apps\JetbrainsSecondInstance\idea.properties and uncomment (remove the #) and change the following lines (note the forward slashes):
idea.config.path=d:/Apps/JetbrainsSecondInstance/AlternativeConfFolder/config
idea.system.path=d:/Apps/JetbrainsSecondInstance/AlternativeConfFolder/system
idea.plugins.path=${idea.config.path}/plugins
idea.log.path=${idea.system.path}/log
- Create a d:\apps\JetbrainsSecondInstance\Phpstorm2ndInstance.bat bat file that reads:
@echo off
SET PHPSTORM_PROPERTIES=d:\apps\JetbrainsSecondInstance\idea.properties
start "" "c:\Program Files\JetBrains\PhpStorm 2017.1.2\bin\phpstorm64.exe"
- Launch the .bat file. You're done! That is a totally separate instance and will not halt when instance #1 has a modal window locking things up.
Hi. I have set up PyCharm to store its `config` and `system` folders at `C:\DJP\pycharmConfig`. This works well.
However, when I update PyCharm with a patch the update process creates a folder in my Windows profile called `.PyCharm2016.1\system\restart`. The folder has about 172 MB of files inside. This causes problems because the storage limit on my profile is only 15 MB...
I would like this `restart` folder to be put in `C:\DJP\pycharmConfig\system`. How can I do this?
Thanks for any help that you can offer.
Unfortunately, this is exactly my situation. I am running PyCharm on my local mac laptop and want to use the JetBrains client to connect to a remote unix server. Everything is working great, but the big problem is, that the default paths
are writing in my home directory on the remote server, where out institution has greatly restricted storage.
I tried the above suggested solution. I copied
1c7d191582b91_pycharm-professional-2023.2.1/bin/idea.propertiesto/home/user/idea.propertiesand changed and uncommented the file paths in this file toBut this does not seem to have any effect. Whereas, when I directly change the file
1c7d191582b91_pycharm-professional-2023.2.1/bin/idea.propertiesI can no longer start my remote projects as the JetBrains Client runs into a lot of errors during the start-up. Any ideas, how I could get PyCharm to let go of my user home on the remote server?Both IntelliJ IDEA Ultimate and Community share the same environment variable for the properties file location: IDEA_PROPERTIES.
Serge Baranov , should IJ_HOST_CONFIG_BASE_DIR / IJ_HOST_SYSTEM_BASE_DIR env vars work when using JetBrains Gateway as well? (Windows client, Linux server). I added these configs to .bashrc, restarted JB client/gateway, but the two new directories are empty and ‘ps’ shows original .config/.cache directories in home still being used.
Do I have to move the contents of original directories or reset / delete anything to for these keys to take effect?
OK, Thanks
What is %IDE%_PROPERTIES about IdeaIC (IntelliJ IDEA Community Edition)?
IDE is using idea.system.path + "tmp" for the temp location, so there is no way to override it separately: https://github.com/JetBrains/intellij-community/blob/625cfb6efdb256ccf2e656648d580d8007b99f9a/platform/util/src/com/intellij/openapi/application/PathManager.java#L318.
Is it possible to only change the temp/tmp folder location?
I need this because I keep the system and config folder inside idea.home.path because settings etc have to be reimported on every update to avoid crashes + config loss
This works great BUT installing patch updates fails because the temp folder is inside of the idea installation.
So can I only move the temp folder out there?
Ok, now works like a charm! Thank you!
And since you are using PhpStorm, the environment variable must be PHPSTORM_PROPERTIES instead of IDEA_PROPERTIES.
This has not been a very user-friendly experience. I'm just now beginning to learn object-based programming, starting with Kotlin (read as: I'm a noob). I shouldn't have to be an advanced software-engineer just to figure out how to relocate a config folder. You know what would be great? Building this feature into the software itself. Seems like this is something you could just put into the software's preference settings.
In addition, I feel like this article isn't written very clearly. I think it makes some excluding assumptions about knowledge and experience level.
It starts off telling me "the easiest way" to edit the idea.properties file is by using help>edit custom properties which leaves the original file unmodified, but then it doesn't tell me what to do next after opening up this blank idea.properites file. Rather, it tells me to open the original file located in IDE_HOME and modify it directly. Wait... I thought we weren't modifying the original file...ok...now we are? And what the heck is IDE_HOME? (Don't worry, I was able to figure this part out on my own, but it just goes to show you the anti-beginner tone and lack of clarity of the article).
So when I do create a blank idea.properties file, it puts it in the very same config folder I am trying to relocate. This absolutely makes no sense. The way around it? All I have to do is "override the location of idea.properties file using IDE specific environment variable". umm... what? The article just assumes everybody knows what this is and how to do this? This made no sense to me. I was able to get a bit more clarity by reading through some of the comments above, but it just points me to an entirely different website which gives no specifics on how to apply this to IntelliJ.
Can you please get somebody beginner-friendly on your team?
It's asinine that this cannot be changed inside the UI and I have to manually edit a config file!
Worse, the information here is out-of-date.
It can be changed via UI of the Toolbox application if you are using it to manage your IDE installation: https://www.jetbrains.com/toolbox/app/ .
For 2020.x versions the default folders were changed and this document will be updated soon to reflect it. Sorry for the delay.
Related tickets:
https://youtrack.jetbrains.com/issue/IDEA-22407
https://youtrack.jetbrains.com/issue/IDEA-26855
https://youtrack.jetbrains.com/issue/IDEA-230993
As outlined in this document, the environment variable must point to idea.properties file itself, not to a directory. There is even an example:
IDEA_PROPERTIES=C:\Users\USER\idea.properties
Don't forget to reboot or logout/login.
Okey I created a new environment variable following the steps of the link called "IDEA_PROPERTIES" with the value "C:/Users/<username>/Configurations/PHPStorm/config". Then I deleted the line "IDEA_PROPERTIES=C:/Users/<username>/Configurations/PHPStorm/config" from the idea.propierties file.
When I opened again PHPStorm, again created a new folder in my user directory. What I'm doing wrong?
In the Windows environment variables settings: https://www.computerhope.com/issues/ch000549.htm.
This is really amazing. specially when using other storage to optimize access.
I wish i could use the same idea.properties with multiple sections instead of having to use environment variables.
I found that placing the “idea.properties” in my home folder (my preferred way) will create conflicts if i run multiple different ide types (e.g. rider, pycharm, clion, etc.). specially when moving the sys path.
Then, where I need to put or edit the line "IDEA_PROPERTIES=C:/Users/<username>/Configurations/PHPStorm/config" ?
You say that I need to set this in the system. Do you mean that I need to set something in Windows?
Serge Baranov Interesting! Could you tell me where or how to define this environment variables?
For some reason, in order to restore the configuration (aka plugins) after setting this, I needed to move the `%RIDER_PROPERTIES%\plugins` directory into `%RIDER_PROPERTIES%\config\plugins` as that was what Rider somehow builds for plugins (but did not, before?). You can see that in the gear toggle “View custom VM options”.
Same for WebStorm and thus I guess all IDEs.
For years I was benefiting from having multiple installations of the same IDE on the same PC, which people using Visual Studio could only envy and dream of. Now they crippled it. This whole concept of changing config settings provided in this article is under-thought. And now with the whole Community Edition cancellation low blow, the problem sticks out even more. I had installed on the same PC the Ultimate Edition UE and the Community Edition CE, obviously in separate folders and separate config. They decided to cancel CE. My CE installation was updated to "Ultimate" so that UE and CE still have separate installation folders, but share the same config folder. This is absolute no-go. I need to have separate configs, I was investigating how to do that, landed here.
First, the recommended way of changing config path is by using Help/Edit Custom and changing idea.properties in config folder. Do you see the nonsense? How could you expect changing config path using file stored in config path? This is the chicken/egg conundrum.
Second, they recommend setting environment variable IDEA_PROPERTIES. How could you expect setting two different installations of the same IDE using the same variable? Obviously not, unless you can propagate the variable directly to each exe file, but this is not described in docs. I don't think you can propagate environment variable using VM options unless it is pre-configured as system property. I tried adding this to vmoptions using -Didea.properties=c:\new_path, but it did not work.
Third, you can change the bin\idea.properties, which is not recommended, because it does not survive updates. If you look in the file it contains idea.config.path=${user.home}/.IntelliJIdea/config. Look at the value. This looks like some prehistoric remnant. If I look around, the .IntelliJIdea folder does not exist and is not used either by Windows, Linux or Mac systems. Instead for Windows it should look like %APPDATA%\JetBrains\IntelliJIdea2022.2. So theoretically we can set that. Anyway editing this file is the last resort, because I suspect it will lose the config folder on each update, which can be quite serious, so I don't want to do that.
Fourth, if the installation is managed by Toolbox, in my case yes, there is a last option by setting the config folder using Toolbox UI. Click Tool Actions, Settings, Configuration. There is a Select "button" under System, config and logs directory. Using this you can browse to new folder. After applying this it actually worked, the CE uses separate config path from UE. It created AppData\Local\Programs\IntelliJ IDEA Community Edition.vmoptions, which contains, I believe so far undocumented settings:
-Didea.config.path=C:\Users\JohnDoe\AppData\Roaming\JetBrains\IntelliJIdea2025.3CE\config
-Didea.system.path=C:\Users\JohnDoe\AppData\Roaming\JetBrains\IntelliJIdea2025.3CE\system
-Didea.log.path=C:\Users\JohnDoe\AppData\Roaming\JetBrains\IntelliJIdea2025.3CE\system\log
-Didea.plugins.path=C:\Users\JohnDoe\AppData\Roaming\JetBrains\IntelliJIdea2025.3CE\config\plugins
So I hope this guide will help other people who want to keep the IDEA Community Edition besides Ultimate Edition as usual, eliminating the low blow by Jetbrains.