Configuring WebDAV Access for Zotero on Ubuntu

July 25, 2023

Getting Started

More than two years ago I made the switch from Mendeley to Zotero due to its more user-friendly interface, open-source nature, versatile Plugin Support and WebDAV integration. And I love it. In this guide, We will walk you through the process of setting up WebDAV access for Zotero on an Ubuntu machine, allowing you to seamlessly sync and access your research library from anywhere with your Ubuntu machine. Zotero, a powerful open-source reference management tool, has become a favorite among researchers, academics, and students for its intuitive interface, extensive features, and excellent cross-platform support. By leveraging WebDAV, you can unlock a new level of accessibility, making your research workflow even more efficient.

Install the Apache Web Server on Ubuntu 20.04

This is a summary from this source. We assume you own the domain and will use to access your server.

sudo apt update
sudo apt install apache2

# You need to adjust the firewall rules and open ports 80 and 443

You can try accessing your web server by visiting It is unsecure for now and we will use letsencrypt to secure it later. Once you ensure the web server is accessible then:

Set Up Virtual Hosts

sudo mkdir /var/www/
sudo chown -R $USER:$USER /var/www/
sudo chmod -R 755 /var/www/
echo "<h1>Nothing is here!</h1>" | sudo tee /var/www/
sudo nano /etc/apache2/sites-available/

Then paste the following configuration in the We will create the required directories and credentials in the next step.

DavLockDB /usr/local/apache/var/DavLock

<VirtualHost *:443>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    Alias /zotero /var/www/
    <Directory /var/www/>
      DAV On
      AuthType Digest
      AuthName "zotero"
      AuthUserFile /usr/local/apache/var/users.password
      Require valid-user

<VirtualHost *:80>
    Redirect /

Now before we proceed to enable the website, let’s config the WebDAV access and create required directories and credentials:

Configure WebDAV Access with Apache on Ubuntu 20.04

This is a summary of steps available here.

sudo a2enmod dav
sudo a2enmod dav_fs
sudo systemctl restart apache2

sudo mkdir /var/www/zotero
sudo chown www-data:www-data /var/www/zotero

sudo mkdir -p /usr/local/apache/var/
sudo chown www-data:www-data /usr/local/apache/var

Adding Authentication to WebDAV

sudo touch /usr/local/apache/var/users.password
sudo chown www-data:www-data /usr/local/apache/var/users.password

# In the following command the first "zotero" is the name of the folder /var/www/zotero
# and the second "zotero" is the username. You will be prompt to enter password then
sudo htdigest /usr/local/apache/var/users.password zotero zotero

Now let’s enable the authentication and the website:

sudo a2enmod auth_digest
sudo a2ensite
sudo systemctl reload apache2
sudo systemctl restart apache2.service

Finally you will need to obtain SSL certificate for your website:

# Install certbot and then
sudo certbot

Config Zotero Application to use WebDAV

In Zotero, open settings and then go to the Sync tab:

Config Zotero to use WebDAV
Config Zotero to use WebDAV

Linux Zotero