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.

209 out of 338 found this helpful
77 comments

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

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

0

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

Simple steps if you want to change your Jetbrains IDEA Default location from C drive to some other drive(I will take D drive).

1. If you are opening for first time, open IDE, and click on "Do not import settings" and continue.

2. A welcome to IDE(Webstorm, IntelliJ, etc...) will pop up which always opens if any project is not opened.

3. Click on bottom left "Options Menu"/Settings Icon and Select "Edit Custom Properties". A input box will pop up.

4. Enter these 4 lines:

idea.config.path=D:/Users/Your username/.webstorm/config
idea.system.path=D:/Users/Your username/.webstorm/system
idea.log.path=D:/Users/Your username/.webstorm/log
idea.plugins.path=D:/Users/Your username/.webstorm/plugins

Replace "your username" with your username.

5. Save and Close the windows. Reopen the app.

6. Tadaa. It has created the folder in your given directories. Go and check and have fun. Enjoy!!

0

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

Hi, am getting the error like below, even I followed the 'Device Guard' also, but still getting the same error, am not able to start the IntelliJ 2022 version. I'm having Windows 10 O.S of 64 bit one.

Error Details:

2022-12-04 22:43:59,750 [     98]   WARN - #c.i.i.StartupUtil - Unable to load JNA library (OS: Windows 10 10.0)
java.lang.UnsatisfiedLinkError: C:\Users\<UserName>\AppData\Local\JetBrains\IdeaIC2022.2\tmp\jna15202628661876121531.dll: Your organization used Device Guard to block this app. Contact your support person for more info
    at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)

Please help me here, what and where exactly need to exclude the dir/files in which location.

0

You need to add IdeaIC2022.2\tmp to the exclusions list of your software so that it allows to load libraries from this directory. It may also help if you update to IntelliJ IDEA 2022.3 where the location of native libraries has changed and they should be also signed.

0

sorry to bother again Serge Baranov, didn't understand this phrase -- IdeaIC2022.2\tmp to the exclusions list of your software, where exactly i need to add. please help me here. thanks in advance!

0

Vidyasagarareddy Agraharam Please contact your security team for assistance, they should know how to configure Device Guard to allow IntelliJ IDEA to work properly.

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

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

Configuration (idea.config.path): ~/.config/JetBrains/IntelliJIdea2022.2
Plugins (idea.plugins.path): ~/.local/share/JetBrains/IntelliJIdea2022.2
System (idea.system.path): ~/.cache/JetBrains/IntelliJIdea2022.2
Logs (idea.log.path): ~/.cache/JetBrains/IntelliJIdea2022.2/log

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.properties to /home/user/idea.properties and changed and uncommented the file paths in this file to

idea.config.path=/projects/IDE_files/config
idea.system.path=/projects/IDE_files/system
idea.plugins.path=/projects/IDE_files/config/plugins
idea.log.path=/projects/IDE_files/system/log

But this does not seem to have any effect. Whereas, when I directly change the file 1c7d191582b91_pycharm-professional-2023.2.1/bin/idea.properties I 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?

The error message is essentially:
The IDE cannot create a lock file in the directory.\nPossible reason: the directory is located on a network disk.\n\nIf you have modified the 'idea.system.path' property, please make sure it is correct,\notherwise, please re-install the IDE

PS: I also tried setting system links from ~/.cache/JetBrains/ to a more suitable location, but then start up is also stopped, with the message cant write .lock file.

 

Edited by Luelze
0

Luelze Please see https://youtrack.jetbrains.com/issue/CWM-6669/Can-use-Gateway-on-remote-machines-with-a-file-system-that-doesnt-support-file-locks#focus=Comments-27-6304753.0-0. You can use these environment variables to override IDE config/system directories:

IJ_HOST_CONFIG_BASE_DIR
IJ_HOST_SYSTEM_BASE_DIR
0

Serge Baranov Interesting! Could you tell me where or how to define this environment variables?

0

Luelze Just google how to set up environment variables on the remote Linux system.

0

What's the variable name for Rubymine or the new Rust IDE? 

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

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

Please sign in to leave a comment.

Have more questions?

Submit a request