Where are the configuration files (settings, library tables)?

KiCad stores user settings (or preferences) and library tables for the user in a system specific location. The default paths are:

  • Unix (Linux etc.): The user’s home directory + .config/kicad/ (= $HOME/.config/kicad/)
  • Windows Vista & later: "C:\Users\username\AppData\Roaming" + kicad\ (= %appdata%\kicad)
  • OSX: The user’s home directory + /Library/Preferences/kicad/

From later 5.99 nightly builds onward the configuration folder has the version number added for each x.y version. For example: 5.99 configuration is in %appdata%\kicad\5.99\ on Windows. Version 5.1 and earlier configuration files are still directly under kicad\ and are not versioned.

When KiCad is started, it reads the environment variable KICAD_CONFIG_HOME. If this is set, the value is used instead of the default path.

There are several files in this folder. The files are human readable and can be edited with a text editor. The file names are mostly self-explanatory.

Fp-lib-table and sym-lib-table are the files which can be seen in Preferences->Manage Footprint/Symbol Libraries dialog: Global Libraries section. By default, when KiCad is run for the first time, these two files, if found, are copied from KiCad installation to the user specific setup.

If some files are deleted, KiCad won’t find them the next time it’s run, and so recreates them from scratch. Deleting everything is effectively the same as running KiCad for the first time. (It is recommended to rename the configuration folder to make possible to compare configurations in case the modified configuration caused some bug to show up.)


Files

Each major/minor version has its own sub-folder (6.0, 6.99, 7.0 etc.). Other files and folders which are directly under kicad/ are for version 5.1 or earlier because their configuration wasn’t versioned. In version 6.0 files are:

  • sym-lib-table: configuration for symbol libraries.
  • fp-lib-table: configuration for footprint libraries.
    __
  • 3d_viewer.json: user preferences and UI layout/UI settings for the 3D viewer.
  • bitmap2component.json: UI layout/UI settings for the image converter.
  • cvpcb.json: UI layout/UI settings for the footprint assignment tool.
  • eeschema.json: user preferences and UI layout/UI settings for the schematic editor.
  • fpedit.json: user preferences and UI layout/UI settings for the footprint editor.
  • gerbview.json: user preferences and UI layout/UI settings for the gerber viewer.
  • installed_packages.json: Package and Content Manager.
  • kicad.json: UI layout/UI settings for the project viewer.
  • kicad_advanced: options which aren’t usually needed; many are for the developers’ use. See common/advanced_config.cpp · master · KiCad / KiCad Source Code / kicad · GitLab.
  • kicad_common.json: common user preferences, environment variables.
  • kipython.json: UI layout/UI settings for Tools → Scripting Console.
  • pcb_calculator.json: UI layout/UI settings for the calculator tools.
  • pcbnew.json: user preferences and UI layout/UI settings for the PCB editor.
  • pl_editor.json: user preferences and UI layout/UI settings for the drawing sheet (page layout) editor.
  • PyShell_pcbnew_startup.py: Scripting Console → Options → Startup → Edit Startup Script.
  • symbol_editor.json: user preferences and UI layout/UI settings for the symbol editor.
  • user.hotkeys: keyboard shortcuts. Can be imported using Preferences → Hotkeys.

Most of the files exist only after the corresponding tool, or part of KiCad, has been used at least once. KiCad saves many of these files only when the KiCad main application is closed.

For implementation reasons json files have sections which aren’t applied to that specific part of KiCad at all.

Sub-folders:

  • 3d: for the internal use of the 3D viewer.
  • colors: color theme json files. Can be added with the PCM.
17 Likes

Thanks @eelik for this great write-up! A few notes from my side:

  1. kicad_advanced file won’t exist unless you manually create it. As noted, this file is intended for developer-facing settings and anything in here may be changed or removed without notice.

  2. Since you mentioned kicad_common.json and environment variables: Note that if you set an actual environment variable in the system environment, you cannot override it with the value in kicad_common.json. The value in the JSON is only used if the variable doesn’t exist in the system environment.