Webd is a lightweight, efficient WebDAV server designed for simplicity and security. Configured through a single URL command, it supports basic authentication, TLS encryption, and adjustable logging levels. Perfect for file sharing, remote development, and content management scenarios, webd offers a zero-configuration approach with its intuitive URL-style syntax, making it an ideal solution for developers and system administrators who need quick, secure WebDAV capabilities.
- Features
- Requirements
- Installation
- Usage
- Configuration
- Examples
- How It Works
- Common Use Cases
- Troubleshooting
- Contributing
- License
- 🔑 Basic Authentication: Secure access to your WebDAV server with username/password
- 🔒 TLS Support: Enable HTTPS for encrypted data transfer
- 📊 Flexible Logging System: Configurable verbosity with multiple logging levels
- 🌐 HTTP/HTTPS Protocol Support: Full support for both protocols
- 📦 Single-Binary Deployment: Easy to distribute and install with no dependencies
- ⚙️ Zero Configuration Files: Everything is specified via a single URL command
- 🚀 Low Resource Footprint: Minimal CPU and memory usage
- Go 1.24 or higher (for building from source)
- Network access for serving WebDAV content
- Admin privileges may be required for binding to ports below 1024
Download the latest release for your platform from our releases page.
go install github.com/yosebyte/webd/cmd/webd@latest
# Clone the repository
git clone https://github.com/yosebyte/webd.git
# Build the binary
cd webd
go build -o webd ./cmd/webd
# Optional: Install to your GOPATH/bin
go install ./cmd/webd
Webd is available as a container image:
# Pull the container image
docker pull ghcr.io/yosebyte/webd:latest
# Run a WebDAV server
docker run -d --rm -p 10101:10101 -v /path/to/share:/data ghcr.io/yosebyte/webd http://qwer:[email protected]:10101/secret#/data
Webd operates using a single, intuitive URL-style command:
webd http://<username>:<password>@<server_addr>/<prefix>?<log=level>#<root_dir>
username:password
: Basic authentication credentials (optional)server_addr
: Server address to bind to (hostname:port)prefix
: URL prefix for the WebDAV endpointlog
: Log level (debug, info, warn, error, fatal)root_dir
: Local directory to share via WebDAV
Webd uses a minimalist approach with all configuration specified in the URL command:
debug
: Verbose debugging information showing all operationsinfo
: General operational information (default)warn
: Warning conditionserror
: Error conditionsfatal
: Critical conditions
webd http://qwer:[email protected]:10101/secret?log=debug#/root
This will:
- Start a WebDAV server on 10.1.0.1:10101
- Require username "qwer" and password "1234" for access
- Mount the local "/root" directory to the "/secret" WebDAV path
- Log at the DEBUG level
webd https://qwer:[email protected]:10101/secret?log=warn#/root
This will:
- Start a WebDAV server with TLS encryption on 10.1.0.1:10101
- Generate a self-signed certificate for secure communication
- Require username "qwer" and password "1234" for access
- Mount the local "/root" directory to the "/secret" WebDAV path
- Log at the WARN level
Webd creates a WebDAV server using the Go standard library and golang.org/x/net/webdav:
- Parses the provided URL to extract configuration parameters
- Sets up authentication if username/password are provided
- Configures TLS for HTTPS connections when requested
- Mounts the specified directory as a WebDAV resource
- Handles incoming connections with proper logging
- 📁 Remote File Access: Access your files from anywhere securely
- 💻 Development Environments: Mount remote directories for development
- 🔄 Content Management: Simple way to manage and update website content
- 📱 Mobile Device Access: Connect to your files from mobile devices
- 🔒 Secure File Sharing: Share files with teams using authentication
- Ensure the target directory exists and has appropriate permissions
- Verify firewall settings allow traffic on the specified port
- For HTTPS, check that clients properly handle self-signed certificates
- Increase log level to debug for more detailed information
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Open a Pull Request
This project is licensed under the MIT License.