Blazing Moon

Zotero Syncing and Sharing

The Challenge: Synchronizing Zotero Between Two Computers

Zotero is an awesome citation manager, especially in combination with its Microsoft Word integration. But what if a document has Zotero citations and you want to edit it on two different computers? This might be because you're keeping two computers synchronized for use in different places, or because you're doing joint research with another person.

Problem

Well, you have a big problem. Maybe you copy the document from Computer #1 to Computer #2. "A-ha," you think, "I'll bet I also have to copy my Zotero sources from Computer #1 to Computer #2!" Maybe you copy the Zotero sources by doing a Zotero Export from Computer #1, and a Zotero Import to Computer #2.

When you open the document on Computer #2 and try to edit a citation you will be very, very sad.

Why? When you edit a citation, the correct source won’t be highlighted in the Zotero dialog box: Zotero no longer know which source this citation refers to. Then when you leave the Zotero dialog box you’ll get an error saying "This citation no longer exists in the Zotero database. Delete it?"

Worse, if there are 20 citations in your document, any time you try to add or edit any citation you'll get the warning message twenty times, once for each citation in the document. As I said: very, very sad.

The Cause

When you add a source to Zotero, it creates an entry in a database. Each entry has a unique index number. For example (and this isn’t technically correct but will give you the idea), the first source you add might have an ID of 32 and the second source might have an ID of 49.

When you add a citation to a Word document, Zotero remembers which source it refers to by remembering the record’s ID in the database, for example, 32.

Here’s the problem: if you add the exact same sources to Zotero on another computer, the sources will almost certainly get assigned different ID numbers. So the source that had an ID of 32 on Computer #1 might have an ID of 98 on Computer #2. When you copy the Word document from Computer #1 to Computer #2, it’s still expecting to find your source by its original ID (for example, 32), but on your new computer there’s no such source record—on Computer #2 that source has an ID of 98.

Working Around the Problem

Rather than exporting the sources from Computer #1 and importing the sources into Computer #2, you can move the actual Zotero database from one computer to the other. That way Computer #2 will have not only the same sources as Computer #2, but will also have exactly the same IDs, so your Word references will work just fine.

  1. Tell Computer #1 where the shared Zotero database will live.
    1. Click Zotero in Firefox's lower right corner, then the Actions button (the little gray gear), then Preferences, then Advanced.
      Diagram showing Zotero's Actions menu
    2. Click "Show Data Directory" and make a note of the location of the folder. If you've already created citations you'll need to know this folder's location in a moment.
      Screen image showing Zotero's Storage Location entry
    3. Click "Custom" and specify where you want the Zotero database to live, probably where your other documents live.
  2. Add citations to the database.
    1. If you haven't added any citations yet, you can just start adding them now.
    2. If you already have citations you want to import, go to the folder you noted earlier (in step 1b above) and copy all the contents of that folder to your new folder.
  3. Tell Computer #2 about the shared location too.
    1. Copy your document from Computer #1 to Computer #2.
    2. Copy your new Zotero folder from Computer #1 to Computer #2.
    3. Tell Computer #2 where to find the shared folder, just as you did in step 1a above.
  4. Repeat as needed.
    1. Now, every time you want to move your citations from one computer to another, copy both the Word document and the Zotero citation folder.

Warning: This is a Sync, Not a Merge!

To do this safely, one computer must be treated as Primary at any given time. During that time, no citations should be added on the Secondary computer.

When you copy the Zotero database from Computer #1 to Computer #2, it will blow away all Zotero sources on Computer #2. So if someone has added new references on Computer #2, when you import Computer #1’s Zotero database you will wipe out the new references on Computer #2.

This isn’t a big deal if you’re just synchronizing two of your own computers, and if you're always using either one or the other. It might be a big deal if two people are co-researching something.

Variations

Use a shared network location. If both your computers are on the same network, and if there is a network location that both of them are able to write to, it should be possible to simply tell Zotero on both computers to use the shared network location. I have not tried this. Also, if people were using both computers at the same time I would expect surprising, and possibly tragic, consequences.

Use the default Zotero folder. Rather than create a new folder for your Zotero sources, you could simply copy the folder back and forth using Zotero and Firefox's default location (the one you made note of in step 1b). While there's no strong reason to create your own folder, there are two benefits. First, the path to the standard location is fairly long and obscure, so if you create your own folder you can put it somewhere easier to navigate to. Second, if you keep your Zotero database mixed in with your other documents, you're much more likely to back it up.