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
Locations can be changed by editing idea.properties file. The easiest way is to use Help | Edit Custom Properties… menu action. It will create a copy of this file in the appropriate location so that the original file in the IDE bin subdirectory remains unmodified and doesn't cause conflicts during the patch updates.
 
Follow the comments in IDE_HOME\bin\idea.properties file to change the defaults, make sure to uncomment the lines defining these properties:
  • 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
 
 
Changing the location of idea.properties file
 
If needed, you can also override the location of idea.properties file using IDE specific environment variable:
  • IDEA_PROPERTIES — IntelliJ IDEA
  • CLION_PROPERTIES — CLion
  • APPCODE_PROPERTIES — AppCode
  • PYCHARM_PROPERTIES — PyCharm
  • DATAGRIP_PROPERTIES — DataGrip
  • STUDIO_PROPERTIES — Android Studio
  • WEBIDE_PROPERTIES — WebStorm
  • PHPSTORM_PROPERTIES — PhpStorm
  • GOLAND_PROPERTIES — GoLand
  • RIDER_PROPERTIES — Rider

For example: IDEA_PROPERTIES=C:\Users\USER\idea.properties

 

The order in which IDE will read idea.properties files is as follows:

  1. Environment variable (%IDE%_PROPERTIES)
  2. HOME\idea.properties (where HOME is the user's home directory on the system)
  3. IDE_HOME\bin\idea.properties
  4. 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 | System, plugins, config and logs directory.

65 comments
Comment actions Permalink

This is useful information.  It would be nice if there was a comment here on what should/should not  be copied during this process.

2
Comment actions Permalink

Jeff, It's assuming that you move the contents of these folders to the new corresponding locations.

2
Comment actions Permalink

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.

1
Comment actions Permalink

Both IntelliJ IDEA Ultimate and Community share the same environment variable for the properties file location: IDEA_PROPERTIES.

1
Comment actions Permalink

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"`

if [ -n "$CLION_PROPERTIES" ]; then ...

 

1
Comment actions Permalink

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.

1
Comment actions Permalink

When idea.plugins.path has been changed, there is an error with com.intellij.platform.images plugin:

Plugin 'com.intellij.platform.images' is compatible with IntelliJ IDEA only because it doesn't define any explicit module dependencies.

If /plugins directory and sub-dir /platform-images is created in root path with a copy of lib/platform-images.jar & resources_en.jar, the error disappears.

0
Comment actions Permalink

For anyone coming here looking for a way to start multiple instances of IDEA this way - on Windows you must execute idea.bat rather than idea64.exe for this to work. See IDEA-273669

0
Comment actions Permalink

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?

0
Comment actions Permalink

Hello,

I created a new folder in my Windows user account like this: "C:/Users/<username>/Configurations/PHPStorm" and placed in it all content of "C:/Users/<username>/.PhpStorm2018.2".

Also, I edited the idea.propierties located in "C:/Users/<username>/Configurations/PHPStorm/config/idea.propierties" to change configuration directories:

idea.config.path=C:/Users/<username>/Configurations/PHPStorm/config
idea.system.path=C:/Users/<username>/Configurations/PHPStorm/system
idea.plugins.path=${idea.config.path}/plugins
IDEA_PROPERTIES=C:/Users/<username>/Configurations/PHPStorm/config

And finally, I erased "C:/Users/<username>/.PhpStorm2018.2" folder. 

The problem is that when I open PHPStorm again, the directory "C:/Users/<username>/.PhpStorm2018.2" is recreated.

What I'm doing wrong?

0
Comment actions Permalink

I am glad you said that.  I was just about to  not do so...  I found "config" and "system" in the directory and the other two seem to be subdirectories of "system"...  I copied these to my SDD drive and restarted Idea.  It took a minute for IDEA to figure out what was going on and then worked fine on my grails project.  After this I saw at least some of the disk activity on the SDD. 

0
Comment actions Permalink

I tried to change the values but it didnt worked. There will be created a new folder in my profile. I use IntelliJ IDEA 13.0.1.

0
Comment actions Permalink

IDEA_PROPERTIES is the environment variable that must be set in the system, it's not a property in the file.

0
Comment actions Permalink

#1
idea.properties in Default IDE configuration directory (assuming it is/was <SYSTEM DRIVE>\Documents and Settings\<USER ACCOUNT NAME>\.<PRODUCT><VERSION>) are ignored.

Windows 7 Professional 64bit SP1
IntelliJ Idea 2017.2.6

#2 Also, why does *every* update ignore/discard these settings, so that I have to re-do them manually all the time?

0
Comment actions Permalink

I changed the values *and* copied the idea.properties from $IDE_HOME/bin to $HOME. Neither seems to have had an effect. v13.0.2-IC

0
Comment actions Permalink

One last thing, it created the custom idea.properties file inside of C:\Users\MyName\.PhpStorm2018.2\config, but I'm wanting to change the location of the config folder to be G:\OneDrive\AppData\PhpStorm\config....

So do I copy over the config dir to the new location and add

idea.config.path=G:\OneDrive\AppData\PhpStorm\config

To the copy in the original location, or do I try to make the change to the original one in the installation directory.

While I'm asking, for keeping sync between two system, (never running at same time), should I also sync the system directory as well? I know one minor peeve is every time I go from one machine to the other, I have to re setup deployment options for every project (connections are on both machines, but I have to set which one is default and the directory mapping).

0
Comment actions Permalink

A couple of questions:

  1. What happens when I upgrade using the Toolbox? Will I still be able to roll back to the previous version? (Not that I've ever needed to... :-) )
  2. How does this relate to the "System and config directory" setting in the Toolbox? Changing this setting and pointing it at the .IntelliJIdea2017.1 directory seems to work. (Note: I've renamed the directory in the picture)

0
Comment actions Permalink

Jem Mawson, make sure to uncomment the lines in the file. Copying is not needed unless you are on Mac.

0
Comment actions Permalink

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?

Edited by Marc Fernandez
0
Comment actions Permalink

See https://intellij-support.jetbrains.com/hc/articles/206544869. Don't edit files inside IDEA_HOME. Problem solved.

https://youtrack.jetbrains.com/issue/IDEA-162752#comment=27-1659279 has more details if you are relocating IDE folders via .properties.

0
Comment actions Permalink

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.

Edited by Jetbrains
0
Comment actions Permalink

Yes, uncommented those lines & they didn't take effect. Strange corporate policy stuff is afoot I think.

0
Comment actions Permalink

Awesome, thanks for the info, should make things nice and smooth :)

0
Comment actions Permalink

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?

0
Comment actions Permalink

This issue is extremely frustrating for Windows users (and it shows a bias towards Mac/Java).  By default, Windows 8 does not allow users to modify files in the Program Files directory (for valid security reasons).  In addition, when you open the config file using notepad, it's munged together with no line breaks.  So you spend 10 minutes hitting a line return in front of every '#' in order to read it, but can't save it once you modify it.  No amount of manipulating in the UI allows you to change the default home directory and it always leads to a build error.  JetBrains needs a more elegant solution to this that is not focused around working on a Mac.

0
Comment actions Permalink

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.

0
Comment actions Permalink

How does this work with multiple products? AFAIU the approach from above would not work if I like to tweak DataGrip, RubyMine PHPStorm and WebStorm for example. 

For DataGrip the following is commented out: `idea.config.path=${user.home}/.DataGrip/config` and `idea.system.path=${user.home}/.DataGrip/system`. I cannot imagine that setting both to some generic path like ${user.home}/.JetBrains will work as probably each IDE will fight with the settings of the other.

Am I missing something here or is the proposal from above only suitable for a single product? Or is there a product specific env variable available? Something like

IDEA_PROPERTIES_DataGrip

?

 

 

0
Comment actions Permalink

The recommended way of settings VM options and properties is already at the very top of the article.

0
Comment actions Permalink

When updating, the updater finds a problem, with the only solution to either replace or ignore the file bin/idea.properties (see image).

If I select replace, I'll lose my adaptations.

If I select ignore, I might miss on new features introduced by Jetbrains in the update.

Can you add another option called 'merge', or 'compare' which would offer me more control on what values to choose for individual properties?

Thanks in advance,

:re

Edited by Roger Erens
0

Please sign in to leave a comment.

Have more questions?

Submit a request