> ## Documentation Index
> Fetch the complete documentation index at: https://ayakaleaf-pro.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Zotero Integration

> Let users import a .bib file from their Zotero library into a project.

> [!NOTE]
>
> This feature is initially developed by [davrot](https://github.com/davrot) and [yu-i-i/overleaf-cep](https://github.com/yu-i-i/overleaf-cep), modified by [ayaka-notes/ayakaleaf-pro](https://github.com/ayaka-notes/ayakaleaf-pro) with OAuth. It is introduced from v6.2.0 and later. It's still in beta status. We need your feedback if you have any problem.

![](https://mintcdn.com/ayakaleaf-pro/x9kfDjtWlyyhG_mR/images/on-premises/img-b751b9f6.png?fit=max\&auto=format\&n=x9kfDjtWlyyhG_mR\&q=85\&s=80eb902caf484c8cfc1c776017ac2c66)

![](https://mintcdn.com/ayakaleaf-pro/UZ_4Jfz7cU6MnXtE/images/on-premises/image-41.png?fit=max\&auto=format\&n=UZ_4Jfz7cU6MnXtE\&q=85\&s=366c8e9396506163e23ffdc92fbe8c02)

### Setup Zotero Integration

1. Open [this link](https://www.zotero.org/oauth/apps) to create a Zotero OAuth client (as image shows)
2. Choose **Application Type**: **Browser**
3. Setup Callback URL with your `${OVERLEAF_SITE_URL}/user/zotero/oauth/callback`
4. Configure your `config/variables.env`

![](https://mintcdn.com/ayakaleaf-pro/UZ_4Jfz7cU6MnXtE/images/on-premises/image-42.png?fit=max\&auto=format\&n=UZ_4Jfz7cU6MnXtE\&q=85\&s=7b2ed79ba28f7d77bc07711068ca71fc)

```dotenv title="config/variables.env" theme={null}
#################
#    Zotero     #
#################
# 'zotero' must be in ENABLED_LINKED_FILE_TYPES (set in develop/docker-compose.yml)
ENABLED_LINKED_FILE_TYPES=project_file,project_output_file,url,zotero

# From a Zotero OAuth client (register at https://www.zotero.org/oauth/apps)
# Application Type: Browser 
# Callback URL -> ${OVERLEAF_SITE_URL}/user/zotero/oauth/callback
ZOTERO_CLIENT_ID=
ZOTERO_CLIENT_SECRET=
# Encrypts the Zotero API key in mongo (set in dev to avoid writing a key file
# to /var/lib/overleaf/data, which the dev web container can't create)
# How to generate: `openssl rand -hex 32`
ZOTERO_CIPHER_PASSWORD=dev-zotero-cipher-password
# Optional: route the module's server-side Zotero requests (OAuth + API) through
# an HTTP proxy (must be reachable from the web container; same as github-sync)
# http://10.0.0.1:10808
# (Optional) ZOTERO_PROXY_URL=
```

### Notes

> [!WARNING]
>
> When upgrading an existing installation with Zotero linked bibliography files to the re-released 6.3.0, follow the [#ayakaleaf-pro-6.3.0](https://ayakaleaf-pro.mintlify.site/on-premises/release-notes/release-notes-6.x.x.md#ayakaleaf-pro-6.3.0 "mention"). New installations do not need this migration.

> [!CAUTION]
>
> Since Ayakaleaf is a collaborative platform, to improve security, starting with version 6.3.0, only the original creator of a Reference `bib` file will be allowed to update the imported file.

For example, suppose the project owner, User A, enables link sharing and creates a `test.bib` file in the project, linking it to their own Zotero account. If another user, User B, accesses the project through the shared link, User B will still be able to read and download `test.bib`, but will not be allowed to update or re-import the file from Zotero. Only User A, as the original creator of the Reference file, can perform updates. Conversely, only the original creator of the `.bib` file has permission to update it.

### Q\&A

> [accordion] How do I use Zotero in a project?
>
> **Answer:** After linking Zotero in **Account Settings**, open a project and click **New file → From Zotero**. Choose a file name, `zotero.bib` by default, and the library, then create the file. Cite its entries as usual, for example with `\bibliography{zotero}`.
>
> The file is read-only in the editor. After changing your Zotero library, open the file and click **Refresh** to import it again.

> [accordion] Why is "Main bibliography file for this project" empty or disabled?
>
> **Answer:** This setting only lists `.bib` files that can be edited in the editor. Files imported from Zotero are read-only, so they are not listed. This is expected: you can still cite their entries.

> [accordion] Does my instance need to be reachable from the internet?
>
> **Answer:** No. Linking Zotero goes through the user's browser, so only the server needs to reach Zotero. If it needs a proxy for that, set `ZOTERO_PROXY_URL`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.