How can I create multiple libraries in Zotero?

I want to have multiple independent Zotero libraries: one for journal papers with PDF attachments, one for books with PDF attachments, one as a catalog of the books in my physical library without PDF attachments, etc.

I don't want to have one big library with multiple collections. Using Zotero in this way is like using a spreadsheet program that only lets you create one big spreadsheet. You can't create one spreadsheet for one project and another spreadsheet for another project; you have to create one big spreadsheet and then tag the parts that belong to the different projects with different tags. This is quite inconvenient.

I've looked through a bunch of Zotero forum and assistance pages related to creating multiple libraries and I still don't have a clear idea of how to do so. I've run into several pages that discuss having multiple profiles (and hence multiple "data directories"), but I don't understand what a profile is and I can't find any place on the Zotero site that explains what they are and how to use them.

This page, in particular, is not helpful:

https://www.zotero.org/support/kb/multiple_profiles

I am running a stand-alone Zotero 5.0.20 on a Mac. I am not syncing with anything online and I am not using a Zotero-Firefox combination. And I don't know what a Firefox profile is, so explaining that a Zotero profile is like a Firefox profile is not helpful. I am using the Safari browser and, if it uses profiles, I'm not familiar with them.

I have tried to learn how to use Firefox profiles in order to understand Zotero profiles, but Firefox has dedicated interfaces for managing profiles and it appears to me that Zotero requires that you do everything via the Terminal command line interface, and even then the Zotero explanations are not clear to me.

https://support.mozilla.org/en-US/kb/profile-manager-create-and-remove-firefox-profiles

Here is what I do now to create multiple libraries:

1. I navigate to my user directory and locate the Zotero folder (data directory)

2. I know that I can't change the name of this folder because it's what the Zotero program looks for when it starts up, so I create a new folder with an appropriate name for this current library (say "Zotero 1"), and then I move the Zotero folder into that new folder.

3. Now that there is no Zotero folder in my user directory, I can start up Zotero and create a new library, which then creates a new Zotero folder in my user directory.

4. When I want to use the Zotero 1 library, I create a Zotero 2 folder, put the second Zotero folder into that folder and move the original Zotero folder out of the Zotero 1 folder and into the user directory.

This is quite awkward. There must be a better way.

If profiles are the solution, is there a Zotero page for idiots like me that describes how to create, access, and delete profiles without having to learn assembly language programming to do so.
  • You can use Zotero Groups for this purpose. Each Group has a separate independent library.
  • Hi bwiernik,

    Thanks for your response.

    When I try to create a new group using my stand-alone Zotero, it sends me online to log into Zotero. I do not want my libraries to be online, I want them to be entirely self-contained on my computer.

    I have looked at the pages listed below, and they indicate to me that a group is an online feature of Zotero. Do you know if there is a way to create a group that doesn't involve going online?

    https://www.zotero.org/support/groups
    https://www.zotero.org/support/zh/groups
  • Since groups are principally intended for collaboration, you can´t create them without sync, sorry.

    The multiple profile page is what you´re looking for. Up front, to be clear, Zotero is not designed to be used the way you want it to use. You can still do what you want, but since it's a customization, it's not maximized for user-friendliness. That said, Zotero profiles do, in fact, work _exactly_ like Firefox profiles. They use the same software code under the hood and they'll display the same Profile Manager dialog. The only thing you'll need to do is run Zotero once from the Terminal to set this up (the same is true for Firefox).

    This is the relevant part for that:
    A default profile is created when you first start Zotero. To create an additional profile, start Zotero from the command line using the same steps as for generating real-time debug output, but replace the -ZoteroDebug flag with -P to open the profile manager.
    Note the link the the instructions for real-time debug output, which are a key part of this.

    Also, you should update Zotero to the most recent version. I think some handling of multiple profiles was fixed/improved at some point after the 5.0 release.
  • Hi adamsmith,

    Thanks for your response.

    I followed your instructions and created a new Zotero profile and stored it in my main user folder along with my current Zotero data directory. My main user folder now has a dozen or so new Zotero files.

    So here are some questions:

    1. How do I switch between profiles. Do I have to use that command-line string every time I want to switch profiles, or is there a way of accessing profiles without using the command line.

    2. When I tried to delete the test profile, I get this message:

    "Deleting a profile will remove the profile from the list of available profiles and cannot be undone.
    You may also choose to delete the profile data files, including your settings, certificates and other user-related data. This option will delete the folder “/Users/Lamb” and cannot be undone.
    Would you like to delete the profile data files?"

    I don't want to delete my /Users folder because that folder contains all my files!

    Did I make a mistake by choosing that folder as my new profile folder?

    These are the new files that Zotero has added to my /Users folder. Can I just delete these files by hand (except the "Zotero" folder which contains all my books)?

    SiteSecurityServiceState.txt
    extensions.json
    cert8.db
    blocklist.xml
    xulstore.json
    startupCache
    crashes
    mimeTypes.rdf
    key3.db
    pluginreg.dat
    cookies.sqlite
    sessionCheckpoints.json
    Zotero
    cache2
    compatibility.ini
    extensions.ini
    gmp
    localstore.rdf
    permissions.sqlite
    prefs.js
    safebrowsing
    secmod.db
    times.json
  • 1.
    How do I switch between profiles. Do I have to use that command-line string every time I want to switch profiles, or is there a way of accessing profiles without using the command line.
    The profile manager will come up every time you start Zotero unless you check the "Use the selected profile without asking" checkbox.

    2.
    Yes, putting the data directory in the home directory wasn't a good idea. Technical
    instructions for Zotero may not always be as clear as they can be, but they are very really carefully written with respect to the technical details, so when it says
    you have your Zotero data directory in the default location (“Zotero” within your home directory), the new profile will use that directory by default when you first start it. Create a new directory — e.g., “Zotero Work” in your home directory — and, in the new profile, point Zotero to that one from the Advanced → Files and Folders pane of the preferences.
    it's there for a reason.

    Create that folder now -- it doesn't have to be calles Zotero Work, but it should be an otherwise empty folder -- and then point Zotero to that folder as its new data directory. Once you confirm that it recognizes that after restarting Zotero, you can delete all the newly created files (except Zotero, as you say) from your home directory (i.e. /Users/Lamb).

    Subsequently you can obviously just delete the profile if you need to and it will only delete the corresponding folder.

  • Hi adamsmith,

    Thanks for your help!

    1. When I start up Zotero by clicking on its icon in the Dock, I am not presented with the profile manager. But when I start up using the command line, I do get the manager. Is the command line the only way to get the manager?

    2. Can you tell me where the following text that you quoted appears?

    "you have your Zotero data directory in the default location (“Zotero” within your home directory), the new profile will use that directory by default when you first start it. Create a new directory — e.g., “Zotero Work” in your home directory — and, in the new profile, point Zotero to that one from the Advanced → Files and Folders pane of the preferences"

    3. How do I point Zotero to a particular folder as a data directory? Is this part of the process of creating a new profile or something else?

    I am going to be going offline soon, so I may not respond to any more comments before tomorrow.



  • Another somewhat hacky option if you don’t want to use profiles is to create the groups (online), sync the empty libraries in Zotero, then disable syncing for the group libraries in Zotero’s sync preferences.
  • 1. The box only comes up when a) the checkbox to default to a given profile is _not_ checked (as per my comment above) and b) you actually have multiple profiles (I'm not actually 100% sure about the latter).

    2. Right on https://www.zotero.org/support/kb/multiple_profiles

    3. Zotero preferences --> Advanced --> Files and Folders --> Data Directory location
  • Thanks for the idea, bwiernik, but I think the profiles route is going to work for me if I can avoid deleting my home directory.

    adamsmith,

    I have unchecked that box and now the profile manager does appear when I start up from the dock. I think this profiles solution will work fine for me. Thanks again for your help.
  • edited April 21, 2018
    I want to have multiple independent Zotero libraries: one for journal papers with PDF attachments, one for books with PDF attachments, one as a catalog of the books in my physical library without PDF attachments, etc.
    Any reason you're not interested in using Saved Searches to achieve this? E.g.: create "smart collections" for:
    • type=Journal article
    • type=book with attached file
    • type=book with no attached files
  • I have set up a second profile to deal with my new research. The previous library I had was not relevant to the new research at all, so I want them out of my way for now, and performance is better with less references.

    @cl417 another option that I use myself is a combination of "-P" and "-datadir profile". This stores the Zotero data in the folder associated with the profile itself so I don't have to change the data dir setting in the preferences and there's zero chance I'm accidentally meddling with the wrong data directory. I have this set up in my launcher shortcut.

    The only downside is that when I do a restart from within Zotero (either after an extension install or after "restart with debugging enabled") that setting is not taken into account in the automatic restart (or at least that used to be the case, maybe it's changed now), so I have to remember to *not* have it restart, but let it quit, and then start it myself with these params.

    I have created a file (not a directory) "~/Zotero" in the place of the default data directory so that if I ever forget, Zotero will complain. Works pretty well for me.
Sign In or Register to comment.