Skip to content

haohanyang/webdav

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WebDAV Server

A minimal WebDAV server.

Features

  • WebDAV protocol support (PROPFIND, GET, PUT, DELETE, MKCOL, COPY, MOVE, etc.)
  • HTTP Basic Authentication
  • Directory browsing via GET/HEAD (redirected to PROPFIND)
  • In-memory lock system

Usage

Environment Variables

Variable Required Description
WEBDAV_DIR Yes Path to the directory to serve
WEBDAV_USERNAME No* Basic auth username
WEBDAV_PASSWORD No* Basic auth password
WEBDAV_NO_AUTH No Set to any value to disable authentication

* Required unless WEBDAV_NO_AUTH is set.

The server listens on port 8080.

Run with Go

WEBDAV_DIR=/path/to/files WEBDAV_USERNAME=user WEBDAV_PASSWORD=secret go run .

Without authentication:

WEBDAV_DIR=/path/to/files WEBDAV_NO_AUTH=1 go run .

Run with Docker

docker run -p 8080:8080 \
  -e WEBDAV_DIR=/data \
  -e WEBDAV_USERNAME=user \
  -e WEBDAV_PASSWORD=secret \
  -v /path/to/files:/data \
  <your-dockerhub-username>/webdav

Run with Docker Compose

services:
  webdav:
    image: haohanyang/webdav
    ports:
      - 8080:8080
    environment:
      WEBDAV_DIR: /data
      WEBDAV_USERNAME: admin
      WEBDAV_PASSWORD: admin
      # WEBDAV_NO_AUTH: "true"  # uncomment to disable authentication
    volumes:
      - /path/to/my/data:/data

About

Simple WebDav Server

Topics

Resources

Stars

Watchers

Forks

Contributors