Add option to require authentication only for uploads while keeping downloads public
Author: NOBLES5ECreated Aug 6, 2025Updated May 6, 2026
Add a command-line option to require authentication only for upload operations while keeping file browsing and downloads publicly accessible.
Motivation
Many users want to share files publicly for download but restrict who can upload new files. Currently, the --auth flag applies authentication to all operations (browse, download, upload), which doesn't support this common use case.
Proposed Solution
Add a new flag like --auth-upload-only or --upload-auth that works in combination with existing auth options:
# Example usage
miniserve --upload-files --auth-upload-only --auth username:password ./sharedThis would:
- ✅ Allow public browsing and downloading
- Require authentication for uploads only
Use Cases
- Public file sharing with controlled uploads
- Team collaboration where everyone can access files but only authorized users can add content
- Public documentation/resource servers with admin-only updates
- Educational environments where students can download materials but only teachers can upload
Source: svenstaro/miniserve