Sync files over private server

Hello everyone,

I am running my own Nextcloud server with all the .pdf-files that I want to have in my Zotero saved on that server in a directory /nextcloud/data/pdfs. I am accessing this server via my home Desktop PC, my mobile laptop and my phone and data is kept up to date by a sync client, so that on every computer I have the same "/nextcloud/data/pdfs" folder present.
Is it possible to tell Zotero that it shall import and keep updated the references only from that specific folder?

This is the idea that I came up with:
When adding a new journal from my local drive on my desktop computer to the Zotero software, I only click on the plus button, then "Link to file" and point it towards the pdf that I have in the folder /nextcloud/data/pdfs.
Now when I do this, I guess that Zotero does not upload the file to the Zotero web storage, but only creates a link from the Zotero software to the locally synced file. Now I am starting my laptop and launch Zotero, it is getting synced and I see the reference. Double clicking on the new entry I get an error that the file could not be found (as it has not been uploaded on the server, of course). However Zotero could find the file in the exactly same path that is has been added from my desktop computer, as I have the /nextcloud/data/pdfs folder synced.
Is there a way to tell Zotero that the link that has been provided for a newly added pdf file is the same that Zotero can use to track down the file on another device?

During my google research on this topic, I found this tutorial which seems to be one way to do something similar via WebDAV:
http://guides.lib.berkeley.edu/c.php?g=4472&p=15932
Following this tutorial the folder "zotero" gets created in the /nextcloud-directory on my data folder on my server, however it remains empty. Something must be wrong as I expected that all the pdf files I have imported earlier in the Zotero software by clicking "Store Copy of File" should have been uploaded on the /Nextcloud/data/zotero path?
  • Is there a way to tell Zotero that the link that has been provided for a newly added pdf file is the same that Zotero can use to track down the file on another device?
    My guess would be that the link isn't actually the same -- it includes your computer name or username that's different across devices. You'd want to set a base folder for relative links (likely the nextcloud folder) in the Advanced/Files and Folders tab of the Zotero preferences and then this should work.

    The WebDAV route is the other option, but note that works with attached, not linked files, so if you have linked files that'd be why nothing is uploading to the Zotero folder.
  • Hello again and thank you for your reply.

    I am still having trouble getting this to work properly. I do not seem to understand the "relative links" option you mentioned first. How exactly does this work?
    I tried configuring it this way: On both the laptop and the desktop computer I copletely deactivated sync over the server (since the files should be automatically synced by nextcloud) and selected the specific folder as linked attachment base folder. It is leading to the folder that is synced by my nextcloud device and looks like this:
    /home/username/Nextcloud/zotero
    Now that this is all set up I just tried to download a pdf to my library using Firefox and the Zotero add-on. Opening the pdf in Firefox I clicked on the Download-button and choose "Save to Zotero" and "Retrieve Metadata". It is downloading the file and I can open it from the Zotero interface, metadata is also correctly being integrated. The pdf is stored locally, as it should be, however not in the destination I selected as linked attachment base folder, but in Firefox-profile-name/zotero/storage, which may be the standard folder for downloads? What am I doing wrong here? Any help appreciated!
  • right, Zotero by default stores files in its own data directory. The relative paths tell Zotero what to do with links, not to create attachments as links. You either need to link them manually or you need to set up ZotFile (www.zotfile.com) to do so for you.

    Also, you do want sync running through Zotero, just not file sync. Without database sync this won't work, and with database sync through nextcloud (or any other sync service) you'll corrupt your database.
Sign In or Register to comment.