A Simple WebDAV File Server
10K+
A secure, fast, and lightweight WebDav Server, built from the official Nginx image with minimal configuration.
docker-compose.yaml file with the following content:version: '3'
services:
nginx-webdav:
image: baksili/webdav-server:latest
container_name: webdav
restart: unless-stopped
ports:
- "80:80/tcp"
volumes:
- "/path/to/your/data:/media/data"
environment:
- USERNAME=<your-username>
- PASSWORD=<your-password>
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
interval: 30s
Replace /path/to/your/data with the actual path to the directory you want to serve.
Set the desired USERNAME and PASSWORD for authentication.
Run the following command to start the container:
$ docker-compose up -d
/media/data - The directory to be served by WebDav.To restrict access to authorized users, define the USERNAME and PASSWORD environment variables in the docker-compose.yaml file.
To enable SSL/TLS support, uncomment the VIRTUAL_HOST and LETSENCRYPT_EMAIL environment variables in the docker-compose.yaml file and provide the appropriate values:
VIRTUAL_HOST: Your domain name.LETSENCRYPT_EMAIL: Your email address for Let's Encrypt certificate generation.Uncomment the following line in the volumes section to persist the generated SSL certificates:
- "./letsencrypt:/etc/letsencrypt"
The container will automatically generate and configure SSL certificates using Certbot and Let's Encrypt.
The healthcheck section in the docker-compose.yaml file ensures that the container is running and responsive. It sends an HTTP request to http://localhost every 30 seconds to check the container's health.
Content type
Image
Digest
sha256:9d8bc1a64…
Size
97 MB
Last updated
over 1 year ago
docker pull baksili/webdav-server:382a0a555b4f47dc292cf9a9374fc3394ad25dfe