Sign inSign up

gzurowski/zotero-dav

By gzurowski

Updated 6 months ago

Lightweight WebDAV server for Zotero file syncing - self-host your research library with Docker

Image
0

10K+

gzurowski/zotero-dav repository overview

Zotero DAV

Docker Hub Security

A Docker image providing WebDAV access for Zotero, built on the official Nginx Alpine Linux image.

Quick Start

Important: Replace myuser and mysecretpassword in the examples below with your own credentials.

Using Docker
docker run -d \
  --name zotero-webdav \
  -p 8080:80 \
  -e ZOTERO_USER=myuser \
  -e ZOTERO_PASS=mysecretpassword \
  -v zotero-data:/var/lib/dav/data \
  gzurowski/zotero-dav
Using Docker Compose

Create a docker-compose.yml:

services:
  zotero:
    image: gzurowski/zotero-dav
    ports:
      - "8080:80"
    environment:
      - ZOTERO_USER=myuser
      - ZOTERO_PASS=mysecretpassword
    volumes:
      - zotero-data:/var/lib/dav/data

volumes:
  zotero-data:

Then run:

docker compose up -d

Configuration

Environment VariableDefaultDescription
ZOTERO_USERzoteroWebDAV username
ZOTERO_PASSzoteroWebDAV password
UID101User ID for file ownership
GID101Group ID for file ownership

Configuring Zotero

  1. Open Zotero and go to Settings
  2. Select the Sync tab
  3. Under File Syncing, check Sync attachment files in My Library
  4. Select WebDAV from the dropdown
  5. Enter your server details:
    • URL: http://my-server:8080/zotero/
    • Username: Your configured username (e.g., myuser)
    • Password: Your configured password
  6. Click Verify Server to test the connection

Zotero Sync Settings

Development

Clone this repository:

git clone https://github.com/gzurowski/zotero-dav.git
Build
docker compose build
Run
docker compose run --build

The server will be available at http://localhost:8888 with default credentials zotero:zotero.

Test
# Health check
curl http://localhost:8888/health

# List directory
curl -u zotero:zotero -X PROPFIND http://localhost:8888/zotero/

# Upload a test file
echo "Hello Zotero!" > test.txt
curl -u zotero:zotero -T test.txt http://localhost:8888/zotero/test.txt

# Download the file
curl -u zotero:zotero http://localhost:8888/zotero/test.txt

# Delete the file
curl -u zotero:zotero -X DELETE http://localhost:8888/zotero/test.txt

Uploaded files are stored in the ./data directory.

Issues

If you encounter any problems or have suggestions, please open an issue.

Tag summary

Content type

Image

Digest

sha256:1ec49d1c9

Size

25.5 MB

Last updated

6 months ago

docker pull gzurowski/zotero-dav