# Iterate. Improve.

## My Zotero Setup

I needed a solution to manage my collection of research papers, and I wanted it to be free and open.

After trying a few solutions, including kbibtex and Polar, I settled on Zotero.

## Zotero basic workflow

The fundamental idea of Zotero is this: you import a paper into it, and the metadata of the paper are automatically downloaded creating an entry in the database. You don't need to have the actual pdf/djvu file of the work to create an entry, but if you do, the pdf will be copied to a directory structure automatically created by Zotero (on my system I use ~/docs/zotero).

The nice thing about this workflow is that almost everything is automated. You can install an add-on in your browser, called Zotero Connector, that makes the importing easy: when you are browsing the arXiv or a journal's website, you just click the Connector button and the paper is added to your Zotero collection. This includes both the metadata and the full text, if the website gives access to that.

## Zotero storage

My collection of papers is large, and the SSD on my laptop isn't. So I needed a solution to move the storage to an external location.

I also want this external location to be: – Under my full control (I don't want to risk losing access to my files because of a third party.) – Easy to retrieve things from (I like traveling with a clean laptop, but at my destination I need to keep working.)

My current solution is to use a combination of Zotero Sync and NextCloud. With this combination, the metadata of my papers are synchronized using my Zotero account, but the actual file are in the NAS running in my kitchen.

## NextCloud

If you don't know what NextCloud is, you can think of it as a replacement for many Google products that you can self-host: it's a combination of Drive, Calendar, Photos (not as good), and its functionality can be extended with other NextCloud Apps.

There are many ways to install NextCloud: the simplest are surely using NextCloudPi (which despite the name works on many platforms, not only on the Raspberry Pi) or YunoHost. I am currently using the Docker image maintained by the people at linuxserver.io.

Installing NextCloud is relatively easy, but if you don't want to you can always use a provider. There are pros and cons to using a provider rather than self-hosting, maybe I'll say a little more in the next iteration.

Now that we have access to NextCloud, we have to teach Zotero to use it as storage.

## Using NextCloud as Zotero Storage

The instructions to set this up are all in the Zotero Sync link under the WebDAV section, but I'll be a little more detailed here.

The first thing you have to do is to create a Zotero account. It's free, and it will be used to sync the metadata library only. Unfortunately this is a necessary step, without a Zotero account we cannot use the sync functionality at all.

Now, create a directory called zotero in NextCloud. It doesn't matter where this directory is exactly, but the name is case-sensitive. Open this directory and click on “Settings” in the lower left corner, and copy the link in the “WebDAV” textbox. You should see something like this:

Then in the Zotero application go to Edit>Preferences and turn on Sync, which requires entering your Zotero username and password. Make sure to check the box about files syncing and select “WebDAV” from the dropdown menu. Fill in your NextCloud credentials and paste the link you copied from NextCloud in the URL text box.

Now, when you add papers to Zotero the files will be synced to NextCloud and you can delete them from your local Zotero storage (in my case ~/docs/zotero/storage/) and they will be automatically downloaded again when you try to access them from Zotero.