selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
docker-webdav logo

Self-host docker-webdav

Apache-based WebDAV file server in a Docker image

ReleaseOpen SourceMIT
docker run --restart always -v /srv/dav:/var/lib/dav -e AUTH_TYPE=Digest -e USERNAME=alice -e PASSWORD=secret1234 --publish 80:80 -d bytemark/webdav
Updated4 years ago
LanguageShell
Setup difficultyEasy
Stars
438
Ports
80 (Plain HTTP WebDAV access in the basic usage example), 443 (HTTPS when SSL is enabled (e.g. SSL_CERT=selfsigned))
Docker
bytemark/webdav

What is docker-webdav?

A Docker image that runs a WebDAV server on top of Apache httpd, aimed at anyone who wants simple, password-protected file sharing over HTTP(S) from a single container. Authentication is configurable as Basic or Digest, a single account can be supplied through environment variables, and multi-user setups work by bind-mounting your own htpasswd/htdigest file. The container can generate a self-signed TLS certificate or use a certificate and key you mount in, although the documentation recommends terminating SSL in a reverse proxy such as Traefik. Anonymous HTTP methods can be whitelisted, and the WebDAV endpoint can be served under a chosen URL path with custom server names. Persistent files live in a volume at /var/lib/dav. Run it with docker run or Docker Compose using the bytemark/webdav image; note the repository was last updated in October 2022.

Should you self-host docker-webdav?

docker-webdav scores 48/100 on selfhost.directory (how scoring works) and ranks #52 of 86 in File Sharing. It has 438 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is MIT-licensed and written mostly in Shell.

Its closest alternative on selfhost.directory is copyparty (82/100, 47 159 stars). It scores higher overall, so compare the two before you pick. See docker-webdav vs copyparty side by side.

docker-webdav README

How to install docker-webdav

Install docker-webdav with Docker

Any architecture that the httpd image supports
Environment variables
AUTH_TYPE, USERNAME, PASSWORD, REALM, SERVER_NAMES, LOCATION, ANONYMOUS_METHODS, SSL_CERT
docker run --restart always -v /srv/dav:/var/lib/dav \
    -e AUTH_TYPE=Digest -e USERNAME=alice -e PASSWORD=secret1234 \
    --publish 80:80 -d bytemark/webdav

All environment variables are optional; supported tags: 2.4, latest.

How to configure docker-webdav

  • ANONYMOUS_METHODSComma-separated list of HTTP request methods allowed without authentication; ALL disables authentication.

    Comma-separated list of HTTP request methods allowed without authentication; ALL disables authentication.

    values: HTTP methods or ALL

  • AUTH_TYPEBasicApache authentication type to use.

    Apache authentication type to use.

    values: Basic, Digest

  • LOCATION/The URL path for WebDAV, e.g. /webdav.

    The URL path for WebDAV, e.g. /webdav.

  • PASSWORDSingle-user login password; ignored if you bind mount your own authentication file to /user.passwd.

    Single-user login password; ignored if you bind mount your own authentication file to /user.passwd.

  • REALMWebDAVSets AuthName, an identifier displayed to clients when they connect.

    Sets AuthName, an identifier displayed to clients when they connect.

  • SERVER_NAMESlocalhostComma-separated list of domains; the first is set as ServerName, the rest as ServerAlias.

    Comma-separated list of domains; the first is set as ServerName, the rest as ServerAlias.

  • SSL_CERTSet to selfsigned to generate a self-signed certificate and enable Apache's SSL module.

    Set to selfsigned to generate a self-signed certificate and enable Apache's SSL module.

    values: selfsigned

  • USERNAMESingle-user login username; ignored if you bind mount your own authentication file to /user.passwd.

    Single-user login username; ignored if you bind mount your own authentication file to /user.passwd.

More in Web Servers

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…