Three stacked blue boxes with binary digits on them
Bit flipping laboratory & Personal website
No sneaky cookies haunt these pages, but whether someone tracks you I do not know. Information flows through many channels, and every action leaves a trace.

2025-12-12
Notes from my installation of Zotero on a Debian-based operating system. Inclusion of ChatGPT transcripts in highlight notes, or at least as close as I could get. Strategy for encrypted library backups on-premise using another computer.

Zotero setup and workflow

Research accumulates a lot of digital papers and textbooks over time. The ability to search them all, take notes inline (the notes can be associated with highlighted regions of the documents), and search within notes is more than a paper notebook can handle. After a friend recommended zotero for managing my research library, I spent some time checking it out. I like zotero a lot so far, and I use it every day.

Basic setup

Installation (on Debian-based systems) is a snap using snap. It doesn't look like any other binary installation methods are officially supported on Linux at the moment.

sudo snap install zotero-snap

You can upload papers to the library from your filesystem, which is really helpful if you have a lot of PDF documents already downloaded like I did. Adding more papers is easier though, with a Chrome browser extension that adds a button to the toolbar for saving the current page to zotero directly from the browser.

From there it's just a matter of organizing papers into collections, taking notes on parts of the papers you highlight, and so on. The interface is pretty straightforward. There's still a lot of it I haven't explored yet.

ChatGPT conversations

Whenever I'm reading a technical paper or textbook (which seems like it's pretty much whenever I'm reading anything these days), I always have ChatGPT or some other LLM open in another window so I can ask clarifying questions, get help with difficult concepts, or even just test my own understanding as I go along. Those chat transcripts are often useful enough that I want to include them in zotero as part of my notes.

Ideally, I'd be able to highlight a section of text in the paper I'm reading, strike up a conversation with the LLM right in zotero with the highlighted section in context, and have the transcript saved as a comment in the highlight note, formatting and all. Realistically, the tooling isn't there - not yet anyway. The best I can do for now is:

  1. Use a browser extension like ChatGPT to PDF to export the ChatGPT conversation. Several export formats are possible, but so far I've found that PDF works best because it's best at preserving the distinction between my prompts and the ChatGPT's responses. It also preserves any images that ChatGPT sees fit to include. A quick search of the Chrome Web Store turns up many alternatives, and likely ones that work for other LLMs.

  2. Import the exported PDF into zotero as a child attachment under the paper I'm reading. Usually the PDF already has a name that makes sense. This part is a little tedious because it involves going back to the Library and clicking a lot of buttons.

  3. Add a comment to the highlight note that triggered the ChatGPT conversation containing the name of the attached PDF. Going back to review the note is also a little tedious, because again, it's only accessible through the Library interface.

On-site library backup

While zotero has built-in cloud sync functionality, it's currently not free for libraries over 300MB. I decided to manage my own backups using a little headless Alpine Linux computer I already have and an encrypted backup tool called restic. The nice thing about restic is that it's really straightforward and works over ssh, so you only need to install it on the client (my school laptop). For a Debian-based client, it looks something like this.

sudo apt install restic

The next steps involve communicating with the server (that's the Alpine Linux box for me) over ssh. There are different ways to do this (and arguably key-based authentication is best), but I'll use sshpass to feed my server password to ssh. With that in mind, I'll assume there are some environment variables already set up.

The next step is to initialize a repository. This only needs to be done once. It puts the restic repository in a zt directory in my home directory on the server.

restic init --repo sftp:$USR@$HOST:zt

For making backups, it's convenient to put the backup commands in a script of their own so there's a single simple command for it. Changing the current directory (instead of supplying restic a fully qualified path to the directory that should be backed up) is important because otherwise restic will include the full path in the backup.

cd $ZT_ROOT
sshpass -f $PW restic backup Zotero --repo sftp:$USR@$HOST:zt

This restores the latest library backup from the server to the client. As always, please make your own manual backups of anything important before playing around with new scripts like this!

restic restore latest --repo sftp:$USR@$HOST:zt --target $ZT_ROOT

These are the basics, but if you need a more complex workflow or a one-off task like restoring from something besides the latest backup, restic has a lot of options.


Steven Baldasty
Proud father, Barefoot runner, Chocolate enthusiast, Seasoned software engineer, Starry eyed PhD student, Novice human
Handsome brown haired man with glasses