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
  • 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:

  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 | Custom JVM options file location | System, plugins, config and logs directory.

213 out of 344 found this helpful
81 comments

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

4

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

2

I see. Wasn't aware of those. Thank you very much pointing this out!

1
Avatar
Permanently deleted user

What are the names of env. vars for androidStudio, webstorm, phpstorm?

Edited by Permanently deleted user
1

STUDIO_PROPERTIES
WEBIDE_PROPERTIES
PHPSTORM_PROPERTIES

1
Avatar
Permanently deleted user

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"

Edited by Permanently deleted user
1
Avatar
Permanently deleted user

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?

1
Avatar
Permanently deleted user

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

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

1
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

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
Avatar
Permanently deleted user

Ok, now works like a charm! Thank you!

0
Avatar
Permanently deleted user

OK, Thanks

0

What is %IDE%_PROPERTIES about IdeaIC (IntelliJ IDEA Community Edition)?

 
 
 
Edited by S. M. Mir-Ismaili
0

And since you are using PhpStorm, the environment variable must be PHPSTORM_PROPERTIES instead of IDEA_PROPERTIES.

0

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
Avatar
Permanently deleted user

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?

0
Avatar
Permanently deleted user

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 Permanently deleted user
0

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

0

The file should be located outside the IDE installation directory where it has write permissions.

Edit Custom Properties will not work properly when the location is overridden: https://youtrack.jetbrains.com/issue/IJPL-37142/Revisit-.properties-file-loading-scheme .

0
Avatar
Permanently deleted user

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

This does not work for me as at 2023-08-18

The JetBrains toolbox does NOT allow me to change the install location of the IDEs or the ToolBox default itsself. 

Can someone from JetBrains (Serge Baranov?) confirm if the ToolBox behaviour has changed, to prevent this configuration item being edit-able, please?

Edited by Alexander Zawadzki
0

Hi Serge, thanks for your answer ! if anderstood you right i configure it in my environment variables like so. But still not working well :

For example if open help→edit customer properties , intellij try to open the default location : {user.home}\AppData\Roaming\JetBrains\IntelliJIdea2024.1\idea.properties: 

File does not exist: {user.home}\AppData\Roaming\JetBrains\IntelliJIdea2024.1\idea.properties

0

Redouane Najib If you want to override the location of idea.properties, use the environment variables as documented (IDEA_PROPERTIES=C:\Users\USER\idea.properties).

0

Hi, i am trying to costomize my Intellij. I tried to change my user.home config but intellij stay looking for idea.properties in my default ${user.home}\AppData\Roaming\JetBrains\IntelliJIdea2024.1\idea.properties

In idea.properties i changed as described above :

user.home=c:/dev/tools

idea.home.path=${user.home}/ideaIU-2024.1.4


# Use ${xxx} where xxx is any Java property (including defined in previous lines of this file) to refer to its value.
# Note for Windows users: please make sure you're using forward slashes: C:/dir1/dir2.

any help ? thx in advise

0

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?

0

Derick I updated the document. For any new IDE, you can find it out yourself by opening <idename>.bat or .sh file in the bin directory, then searching for IDE_PROPERTIES_PROPERTY. This line will contain the environment variable name of the property that is specific to this IDE, for example, rustrover.bat:

IF NOT "%RUSTROVER_PROPERTIES%" == "" SET IDE_PROPERTIES_PROPERTY="-Didea.properties.file=%RUSTROVER_PROPERTIES%"
Edited by Serge Baranov
0

Please sign in to leave a comment.

Have more questions?

Submit a request