This guide explains how to enable WebDAV access to your files.

By default, the configuration below enables WebDAV for your ~/downloads directory.

Before you begin, log in to your service via SSH.


Step 1 – Enable WebDAV

Run the following commands one by one:

echo -en "\
Include /etc/apache2/mods-available/dav.load\n\
Include /etc/apache2/mods-available/dav_fs.load\n\
\n\
DavLockDB $HOME/DavLock\n\
Alias /$(whoami)/webdav $HOME/downloads\n\
<Directory $HOME/downloads>\n\
DAV On\n\
</Directory>" \
> ~/.apache2/conf.d/dav.conf
mv ~/downloads/.htaccess ~/www/$(whoami).$(hostname)/$(whoami); touch ~/downloads/.htaccess
/usr/sbin/apache2ctl -k graceful

Once the commands have completed successfully, WebDAV will be enabled for your ~/downloads directory.


Step 2 – Access Your WebDAV Share

Your WebDAV URL will be:

https://server.hostname/username/webdav

Replace:

  • server.hostname with your server hostname.
  • username with your service username.

For example:

https://someserver.seedhost.eu/testseed/webdav

Using a Different Directory

If you would like to share a directory other than ~/downloads, edit the following configuration file:

~/.apache2/conf.d/dav.conf

Edit lines 5 and 6 so that they point to the directory you want to share via WebDAV.

These lines contain the Alias and <Directory> directives, which define the shared directory.

After saving the file, reload Apache again:

/usr/sbin/apache2ctl -k graceful
⚠ Important

WebDAV cannot be enabled for your entire $HOME directory.

Only specific subdirectories, such as ~/downloads or one of its subdirectories, can be shared using this configuration.


Notes

  • By default, WebDAV provides access to your ~/downloads directory.
  • Remember to reload Apache after making any changes to the WebDAV configuration.
  • When changing the shared directory, update both the Alias and the corresponding <Directory> directive in the configuration file.
Was this answer helpful? 155 Users Found This Useful (239 Votes)