Repolode
sigoden

sigoden/dufs

A distinctive command-line file server in Rust for static serving, uploads, search, access control and WebDAV.

Open-source alternative to:DropboxGoogle DriveMicrosoft OneDrive

Stars
10,975
Forks
607
Open issues
2
Last commit
3 days ago

What is it?

Dufs is a file server you start from the command line to share a directory over HTTP or HTTPS. By default it serves files read-only, and flags such as --allow-upload, --allow-delete or -A (allow all) enable write operations. Visitors get a browser UI with directory listing, drag-and-drop uploads, folder download as zip, and file creation and editing.

Access is controlled per path with account rules passed through --auth, supporting read-only and read-write roles, anonymous public paths, and sha-512 hashed passwords. Dufs also supports WebDAV, resumable uploads and downloads, search, sha256 hash queries, and a simple JSON or plain-text listing that works well with curl.

For static sites it can render index.html or serve a single-page application. It can be installed through cargo, Homebrew, Docker, or prebuilt binaries for macOS, Linux and Windows.

Key features

  • 01Serves static files and folders, with optional index.html and SPA rendering
  • 02Drag-and-drop uploads, plus creating, editing and searching files
  • 03Account-based access control with per-path read-only or read-write rules
  • 04WebDAV support and resumable uploads and downloads
  • 05Folder download as zip and sha256 hash queries
  • 06Configurable via CLI flags, environment variables or a YAML file

Use cases

  • Quickly sharing a local folder with colleagues over the LAN
  • Hosting a static website or single-page app from a directory
  • Providing a simple upload drop box for files from others
  • Mounting a self-hosted network drive through WebDAV clients

Quick start

  1. 1

    Install with cargo

    cargo install dufs
  2. 2

    Serve the current directory in read-only mode

    dufs
  3. 3

    Allow all operations such as upload, delete and search

    dufs -A

Things to know

  • Some advanced features such as digest auth do not work with hashed passwords.

Topics

FAQ

What is dufs?
A distinctive command-line file server in Rust for static serving, uploads, search, access control and WebDAV. Dufs is a file server you start from the command line to share a directory over HTTP or HTTPS. By default it serves files read-only, and flags such as --allow-upload, --allow-delete or -A (allow all) enable write operations. Visitors get a browser UI with directory listing, drag-and-drop uploads, folder download as zip, and file creation and editing.
Is dufs free to use? What license does it have?
dufs is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is dufs still maintained?
Actively maintained. The last commit to dufs was on Oct 22, 2026.
What can I use dufs for?
Quickly sharing a local folder with colleagues over the LAN Hosting a static website or single-page app from a directory Providing a simple upload drop box for files from others Mounting a self-hosted network drive through WebDAV clients
How do I install dufs?
Install with cargo: cargo install dufs Serve the current directory in read-only mode: dufs Allow all operations such as upload, delete and search: dufs -A
Where can I get dufs?
The source code and installation instructions are on GitHub: https://github.com/sigoden/dufs

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects