Easy to configure, docker-based WebDAV server. Based on Apache HTTP Server Version 2.4 with mod_dav
.
-
Review and modify the
config
file. -
Generate an HTTPS certificate using Let's Encrypt. Copy the generated
fullchain.pem
andprivkey.pem
into a folder called "secrets". -
Create your users using
htpasswd
(on most distros provided byapache2-utils
).$ htpasswd -cB secrets/users foo $ htpasswd -B secrets/users bar $ htpasswd -B secrets/users baz
-
Build the image.
$ docker build -t easy-webdav .
-
Run the container and use a bind mount (
-v
) for the "secrets" folder as well as your data. Alternatively, see the next section for how to use Docker Compose.$ docker run -p 443:443 -v /path/to/your/data:/webdav/data -v $(realpath ./secrets):/run/secrets:ro easy-webdav
To enable support for CalDAV and CardDAV, Radicale must be included in the docker image. This can be done using a build argument:
$ docker build --build-arg radicale=1 -t easy-webdav .
In addition, at the very least, WEBDAV_RADICALE
and WEBDAV_RADICALE_STORAGE
must be set in the config file.
Note that including Radicale significantly increases the image size.
version: '3.8'
services:
webdav:
image: easy-webdav
restart: unless-stopped
ports:
- "443:443"
volumes:
- type: bind
source: /path/to/your/data
target: /webdav/data
secrets:
- fullchain
- privkey
- users
secrets:
fullchain:
file: /path/to/secrets/fullchain.pem
privkey:
file: /path/to/secrets/privkey.pem
users:
file: /path/to/secrets/users