This repository allows you to run the Zotero data server locally using docker containers, and easily build the Zotero client application.
Before use, make sure you have Docker installed. For instructions on how to install Docker Desktop, see: Install Docker Engine.
-
Elasticsearch uses a mmapfs directory by default to store its indices. The default operating system limits on mmap counts is likely to be too low, which may result in out of memory exceptions. On Linux, you can increase the limits by running the following command as root:
$ sudo sysctl -w vm.max_map_count=262144
To set this value permanently, update the vm.max_map_count setting in /etc/sysctl.conf:
$ sudo echo "vm.max_map_count=262144" >> /etc/sysctl.conf
More info: Elasticsearch reference
-
Redis service requires to enable the memory overcommit configuration in host machine. Without it, a background save or replication may fail under low memory condition. To fix this issue run the following command as root:
$ sudo sysctl -w vm.overcommit_memory=1
To set this value permanently, add vm.overcommit_memory = 1 to /etc/sysctl.conf file:
$ sudo echo "vm.overcommit_memory=1" >> /etc/sysctl.conf
More info: Redis warning discussion
Download souce code and configure the server:
$ sudo docker compose up -d
The source code is downloaded when the docker image is created. To upgrade and download a new version of the dataserver, it is necessary to use the above command with the --build option.
Available endpoints:
Name | URL | Login | Password | Base repo |
---|---|---|---|---|
Zotero API | http://localhost:8080 | admin | admin | github zotero/dataserver |
Stream Server | http://localhost:8081 | - | - | github zotero/stream-server |
Web Library | http://localhost:8001 | - | - | github zotero/web-library |
PHPMyAdmin | http://localhost:3000 | root | zotero | PHPMyAdmin docker image |
S3 API | http://localhost:9000 | - | - | Minio docker image |
S3 Web UI | http://localhost:4000 | zotero | zoterodocker | Minio docker image |
Data location:
Name | URL |
---|---|
MySQL Database | /mysql/data |
S3 File Storage | /minio/data |
Redis Dumps | /redis/data |
Build Zotero Desktop App:
$ cd client
$ sudo docker compose up [linux|windows]
The build will be placed in the /client/staging folder in unpackaged form. The new files will be copied in this folder after finishing the compilation and closing zotero.
The source code is downloaded when the docker image is created. It is compiled when the container is created. Therefore, to check and download a new version of zotero, it is necessary to use the above command with the --build option to recreate the image and then compile in a new container.
Run:
$ ./staging/Zotero_VERSION/zotero(.exe)
Connect with the default user and password:
Name | Login | Password |
---|---|---|
Zotero | admin | admin |
Create new users:
$ sudo docker exec zotero-dataserver /scripts/create-user.sh [USER_NAME] [EMAIL] [PASSWORD]
List users:
$ sudo docker exec zotero-dataserver /scripts/list-users.sh
Create shared group libraries:
$ sudo docker exec zotero-dataserver /scripts/create-group.sh [OWNER_USER_NAME] [GROUP_NAME] "[GROUP_FULLNAME]"
List groups:
$ sudo docker exec zotero-dataserver /scripts/list-groups.sh
Add users to a group:
$ sudo docker exec zotero-dataserver /scripts/add-user-group.sh [USER_NAME] [GROUP_NAME]
Remove users from a group:
$ sudo docker exec zotero-dataserver /scripts/remove-user-group.sh [USER_NAME] [GROUP_NAME]
You can add, edit and delete users and groups with PhpMyAdmin accessing to http://localhost:3000.