Locations for Zotero and Zotfile Preferences

Where are the preferences and hidden preferences for Zotero and Zotfile stored? I know that they can be edited in the about:config file, but that seems to include all of Mozilla's configuration keys as well. Is there any place where just Zotero and Zotfile preferences keys are stored? And more importantly, can they be exported?

I had set up Zotero and Zotfile on my laptop a few months back, tailoring the preferences to my liking and setting a few hidden preferences as well (colored annotations, recursive entries). When I installed my lab computer with Zotero and Zotfile and synced the databases, the preferences did not change from their default values on my lab comp. Assuming that the online sync option may not make a copy of the preferences file to the servers, I also just copied the whole zotero database to the new system, but there was still no change in preferences leading me to conclude that they aren't stored anywhere in the Zotero Database.

Now, I need to format my laptop and reinstall Zotero and Zotfile, and I was wondering if there was an easier way to transfer the preferences than manually setting each of them again.
  • edited August 16, 2015
    They're stored in the prefs.js file in the profile directory. You can grep for extensions.zotero to get just the Zotero ones, if you know how to do that, but otherwise they're mixed in with Mozilla prefs.
  • edited August 16, 2015
    Thanks, Dan!

    I prefer using Windows, so I've never used grep, but since it extracts text matching an expression, I can do the equivalent in MATLAB or LabVIEW if need be.

    So, adding back those entries into the new prefs.js file in the new system or directly substituting the entire prefs.js file into the new system (I don't make any changes to firefox preferences, so they would still be default values) should automatically transfer the preferences of Zotero and Zotfile, correct?
  • edited August 16, 2015
    That's right. I'd opt for transferring just the Zotero-related lines if possible. They're actually probably grouped together in the file, so a simple copy/paste into a new file should be easy.
  • (And you'll want to omit the extensions.zotero.dataDir/extensions.zotero.lastDataDir prefs from the old machine.)
  • out of curiosity and for less technically savvy folks: wouldn't Firefox's sync also sync Zotero preferences or does it only sync its own?
  • Follow up question: Where are the preferences stored for Zotero and Zotfile stored in Zotero 5+? I recently upgraded to Zotero 5.0.6, and had to manually enter the preferences for Zotfile atleast.

    I did not find anything in the prefs.js files located in the Zotero program files folder.
  • edited July 25, 2017
    Zotero Prefs:
    Windows/Linux: Edition -> Preferences
    MacOS: Zotero menu -> Preferences

    ZotFile Prefs:
    Tools -> Add-ons, then ZotFile "Options" button.
    In a next release, there should be a direct access via Tools -> Zotfile Preferences.
  • @K.%20Vijayanth%20Reddy
    Uhm sorry, I read your question too quickly.
    They're stored in the prefs.js file of your data directory. Open the Zotero Preferences, "Advanced" pane, "Files and Folders" tab, "Show Data Directory" button.
  • @Gracile: I looked there... There is no prefs.js in my data directory.
  • edited July 25, 2017
    Found it after doing a system wide search for prefs.js. :)

    For future reference: In the standalone version, it can be found (in Windows systems atleast) at:

    %APPDATA%\Zotero\Zotero\Profiles\[profilename]
  • [it's documented there, as Dan wrote above :-)]
  • But what's happen when you click "Show Data Directory" ?
  • > [it's documented there, as Dan wrote above :-)]
    Oops! My bad.. :)

    > But what's happen when you click "Show Data Directory" ?
    It opens my data directory where all the notes, indexes, etc. and the Zotero database are stored. The prefs.js file is not stored there..
  • Ok. I had had the same problem. There's a difference between the data directory and the profile directory. I'm not sure to remember correctly but I think the data directory was migrated but not the profile directory and I had lost my prefs before manually moving prefs.js (again I don't remember exactly). Anyway, @dstillman is it the default behaviour regarding prefs.js?
  • edited July 25, 2017
    If you were using Zotero for Firefox before, Zotero 5.0 should transfer your Zotero preferences at the same time it migrates the data directory. It doesn't currently try to transfer any other preferences, though we could add support for ZotFile and plugins (though it won't help for people who've already upgraded).
  • I am using Zotero version5.089 and it seems that not all preferences are stored in the above mentioned prefs.js file. For example, if one wants to run multiple instances of Zotero (e.g. on an application server) one of the settings that must be changed is "extensions.zotero.httpServer.port". I can't seem to find that setting in prefs.js. Does anyone know where this setting is stored? We want to set this for each user of the terminal server via a script, and for that we need to know where to find it :-).
  • @Dennis_Z: As with Firefox, only prefs that differ from their defaults are stored in there. If you want to set a non-default pref, you have to add a line.
  • Thank you @dstillermann, that is really useful. I tested this for the port number and after changing it, it indeed shows up there. Would you happen to know where the settings of the Chrome browser plugin are stored as well? The port number must be changed there too.
  • The browser stores those as IndexedDB data. I'm not sure there's a good way to modify those outside of either the Connector preferences or the Chrome devtools. Maybe there's some way to script the latter, but I don't know.
Sign In or Register to comment.