https://github.com/jan-di/docker-webdav
Simple dockerized Nginx WebDAV Server
https://github.com/jan-di/docker-webdav
docker nginx webdav webdav-server
Last synced: 9 months ago
JSON representation
Simple dockerized Nginx WebDAV Server
- Host: GitHub
- URL: https://github.com/jan-di/docker-webdav
- Owner: jan-di
- License: mit
- Created: 2020-11-14T12:38:56.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-06-18T14:46:36.000Z (about 2 years ago)
- Last Synced: 2024-06-18T18:12:59.564Z (about 2 years ago)
- Topics: docker, nginx, webdav, webdav-server
- Language: Dockerfile
- Homepage:
- Size: 35.2 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Dockered WebDAV Server




Docker image of a nginx powered webdav server for my personal use. This will implement a [Class 2](https://stackoverflow.com/questions/58900793/what-is-a-level-2-webdav-server) compliant WebDAV server. Feel free to use, but be aware that backwards compatability is not assured and things can break at any time.
Registry | Image | Tags
--- | --- | ---
Dockerhub | `docker.io/jandi/webdav` | [Details](https://hub.docker.com/r/jandi/webdav/tags)
GitHub Container Registry | `ghcr.io/jan-di/webdav` | [Details](https://github.com/jan-di/docker-webdav/pkgs/container/webdav)
## Usage
Specify `WEBDAV_USERNAME` and `WEBDAV_PASSWORD` as environment variables or create a `.htpasswd` file by yourself and put it to `/config/nginx/.htpasswd`.
Even though the image is designed to be used behind a reverse proxy, the webserver must be accessed through HTTPS to prevent issues with certain WebDAV methods (e.g. MOVE)
## Parameters
Configure the container by specifying environment variables:
Name | Description
--- | ---
`WEBDAV_USERNAME` | Name of WebDAV user
`WEBDAV_PASSWORD` | Password of WebDAV user
See also the parameters from the upstream image [linuxserver/nginx](https://github.com/linuxserver/docker-nginx#parameters).
## Endpoints
Endpoint | Auth. req. | Description
--- | --- | ---
`/dav` | yes | WebDAV
`/health` | no | Healthchecks, always return `200`
## Example Configuration
Docker-compose file with webdav server behind traefik reverse proxy:
Make sure you also allow insecure certificates in traefik for internal connections.
```yml
version: '3.8'
services:
web:
image: docker.io/jandi/webdav
labels:
- traefik.enable=true
- traefik.http.routers.webdav.entryPoints=https
- traefik.http.routers.webdav.rule=Host(`domain.example`)
- traefik.http.routers.webdav.tls=true
- traefik.http.services.webdav.loadbalancer.server.scheme=https
- traefik.http.services.webdav.loadbalancer.server.port=443
- traefik.http.services.webdav.loadbalancer.serverstransport=insecureskipverify@file # See https://doc.traefik.io/traefik/routing/services/#insecureskipverify
networks:
- ~traefik
volumes:
- ./data/web:/var/www
environment:
- PUID=1000
- PGID=1000
- TZ=Europe/Berlin
- WEBDAV_USERNAME=username
- WEBDAV_PASSWORD=super-secret-password
restart: unless-stopped
networks:
~traefik:
external: true
```
Skip the verification of the self signed nginx cert in global Treafik configuration (eg. traefik_dynamic.yml).
See [doc.traefik.io -> insecureSkipVerify](https://doc.traefik.io/traefik/routing/services/#insecureskipverify)
```yml
http:
serversTransports:
insecureskipverify:
insecureSkipVerify: true
```