Unclear how to get WebDAV running

I’m trying to enable the WebDAV extension. I’m running seaf-server 8.0.8 on NixOS. A couple of things are unclear to me:

  • Where is the seafdav.conf file supposed to go? NixOS puts all the other conf files in /etc/seafile but the manual states that for some reason seafdav.conf needs to go in the installation folder? That folder is read-only in NixOS. When putting seafdav.conf in /etc/seafile, I don’t see WebDAV listening in netstat so that doesn’t seem to work. I also tried /etc/seafile/conf/seafdav.conf without success.
  • You can specify the port but not the host? Will it use the host in seafile.conf under [fileserver]?
  • The docs say that I need to modify share_name if I deploy behind nginx (which I do). But… to what? I don’t want to WebDAV just into one single share.

Content of /etc/seafile/seafdav.conf is

enabled = true
port = 8032
share_name = /
workers = 5
timeout = 1200

You should find official instructions here : https://manual.seafile.com/extension/webdav/

I’m trying to follow those but as I described, they tell me to place the config file in the installation folder and I can’t do that since it’s read-only. I tried figuring out whether seaf-server takes command line arguments to tell it where the config files are located but it neither has a manpage nor accepts -h and the manual is silent on this issue.

Edit: I see that NixOS’ config starts seaf-server with

-F /etc/seafile

I didn’t find any docs on that option but since the other config files are located there, I assume seafdav.conf should also be there. However placing it there does not lead to WebDAV listening on the specified port.

Hi flyx

You seem to have installed seafile inside the /etc folder, which I have never done and I am not sure if that is a good idea or causes any issues.

In any case let me try and help.

→ The correct seafdav.conf should be the one in /etc/seafile/conf/seafdav.conf
→ It will use the host from seafile.conf, e.g. https://example.seafile.com
→ It requires a share name, e.g. https://example.seafile.com/webdav

Now this share name in seafdav (e.g. /webdav) needs to work together with your nginx config.
Something like below.


enabled = true
port = 8080
share_name = /webdav

conf file in nginx:

location /webdav {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 1200s;
client_max_body_size 0;
proxy_request_buffering off;

   access_log      /var/log/nginx/seafdav.access.log;
   error_log       /var/log/nginx/seafdav.error.log;


The webdav server should then be accessible under https://example.seafile.com/webdav

I hope that gives you the right direction.

Thanks for this detailed answer.

I do not have installed seafile in /etc. For reference, NixOS installs it in /nix/store/p8b44145a5v7xziyp0h8rsiz3qpx5vrx-seafile-server-8.0.8 but that shouldn’t matter. I believe the -F /etc/seafile argument causes the server to look for the config files in /etc/seafile.

I have already setup nginx with a /seafdav location and added this as share_name. However the nginx config will only become relevant after I succeeded in getting seafile to listen to the given WebDAV port in the first place, which currently isn’t the case. netstat shows

tcp        0      0*               LISTEN      108432/seaf-server

for the server, but the WebDAV listener at configured port 8032 is missing. I can guess two possible reasons:

  • seafdav.conf isn’t read from the folder given with -F and needs a separate command line option. I failed to find docs on this.
  • seafdav doesn’t use the proper host. If it simply uses the host from [fileserver] config, it should be but I haven’t found any docs on this either.

Hi flyx

I am sorry but I don’t know NixOS and couldn’t really help you with this specific item.
The only thing that looks wrong to me is that the conf file is looked for in /etc/seafile. It should be /etc/seafile/conf

My seafile folder lhas the following content:

@~> ls -l seafile
seafile-server-latest → seafile-server-9.0.4/

And the seafile/conf folder has this content:

~> ls -l seafile/conf/

I don’t think my NixOS setup is relevant for this issue. The admin manual seems to assume I download the release from seafile instead of using a package manager, so these issues will probably arise with any package manager.

All the other configs are directly under /etc/seafile and they work fine:

~> ls -l /etc/seafile
total 0
lrwxrwxrwx 1 root root 30 May  5 11:04 ccnet.conf -> /etc/static/seafile/ccnet.conf
lrwxrwxrwx 1 root root 32 May  5 11:04 seafdav.conf -> /etc/static/seafile/seafdav.conf
lrwxrwxrwx 1 root root 32 May  5 11:04 seafile.conf -> /etc/static/seafile/seafile.conf
lrwxrwxrwx 1 root root 38 May  5 11:04 seahub_settings.py -> /etc/static/seafile/seahub_settings.py

(The symlinks are just an artefact from NixOS building the system config from declarative input.)

My systemd service for seahub does this:

ExecStart=/nix/store/i65vw40j6ngzbs57hngkv0dac3zhqsyn-python3.9-gunicorn-20.1.0/bin/gunicorn seahub.wsgi:application \
--name seahub \
--workers 4 \
--log-level=info \
--preload \
--timeout=1200 \
--limit-request-line=8190 \
--bind unix:/run/seahub/gunicorn.sock

Since the WebDAV manual mentions gunicorn, do I need to give similar config to seaf-server that is currently missing? seaf-server.service is:

ExecStart=/nix/store/ygi22wlcrfbhl7cnkx1akscm75v2cpil-seafile-server-8.0.8/bin/seaf-server \
--foreground \
-F /etc/seafile \
-c /var/lib/seafile/ccnet \
-d /var/lib/seafile/data \
-l /var/log/seafile/server.log \
-P /run/seafile/server.pid \
-p /run/seafile

Sorry flyx - I am out :slight_smile:

I am not good enough with these things, I am just relatively experienced with setting up Seafile on normal Ubuntu.

I hope someone else can help you,


I finally figured this out: seafdav is a completely separate application. Neither seafile-server nor seahub will read the seafdav.conf file or act on it. The seafdav application is not packaged in NixOS which is why I didn’t find any information on it. The solution is packaging it, which I am doing now.

Thanks to everyone who commented.