DirForge
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
A stateless, read-only web file browser for homelab and NAS power users. No database, no background workers, no disk writes - just point it at a mounted path and go.
Live Demo
Browse files in a clean web UI with search, previews, and archive inspection. Download individual files or entire folders as ZIP. Access the same data through a RESTful JSON API, an S3-compatible endpoint for tools like rclone, a read-only WebDAV mount for native OS file managers, or an MCP server for AI assistants. Everything runs in a single stateless container with no external dependencies.
Quick Start
> **Prerequisite:** Docker or Podman (images are published for amd64 and arm64).
Docker run
Docker Compose
> **Warning:** The default compose file falls back to admin/dirforge credentials if you don't set BasicAuthUser and BasicAuthPass in your .env. Change these before exposing the service on your network.
Podman
The same commands work with Podman. Replace docker with podman:
For Compose, use podman compose (Podman 4.1+):
> **Notes for Podman users:**
> - podman compose is a built-in subcommand in Podman 4.1+, not the older third-party podman-compose Python package.
> - DirForge uses ports above 1024, so rootless Podman works without extra configuration.
> - On SELinux systems (Fedora, RHEL), add :z to volume mounts: -v /srv/share:/data:ro,z.
Standalone (Windows)
1. Download dirforge-win-x64.zip from the latest release
2. Extract to a folder (e.g. C:\DirForge)
3. Edit appsettings.json — set RootPath to the directory you want to share
4. **Console mode:** Double-click DirForge.exe to run interactively
5. **Windows Service:** Right-click install-service.bat → Run as administrator. DirForge will start on boot automatically. Use uninstall-service.bat to remove the service.
Standalone (Linux)
1. Download dirforge-linux-x64.tar.gz (or linux-arm64) from the latest release
2. Extract: tar -xzf dirforge-linux-x64.tar.gz -C /opt/dirforge
3. Edit appsettings.json — set RootPath to the directory you want to share
4. **Run directly:** ./DirForge
5. **Install as systemd service:**
The tarball includes an example dirforge.service file with systemd hardening options.
Open http://localhost:8091.
With the default config profile in this repository, sharing, dashboard, and metrics are enabled.
Features
Browsing
- List and grid view layouts
- Sortable columns (name, size, date)
- Light and dark themes (toggle or set default via DefaultTheme)
- File preview modal for text, images, video, audio, and PDF
- Inline archive browser for .zip, .tar, .tar.gz, .tgz, and .gz
- Image lightbox with navigation
- Recursive search with configurable depth and time budget
- Age badges on files and folders
- Custom site title via SiteTitle
Sharing & Downloads
- Direct file downloads
- Folder download as ZIP archive (with configurable max size)
- Signed share links with expiry
- One-time share links
- QR code generation for share links
- File hash calculation (CRC32, MD5, SHA-1, SHA-256, SHA-512)
- Sidecar checksum verification (.md5, .sha1, .sha256, .sha512, .sfv)
WebDAV
- Read-only WebDAV endpoint at /webdav/ (DAV Class 1)
- Supports OPTIONS, PROPFIND, GET, and HEAD methods
- Compatible with Windows Explorer, macOS Finder, and other WebDAV clients
- Same security policies as the web UI (hidden paths, denied extensions, auth)
S3-Compatible API
- Read-only S3 endpoint at /s3/ for scripted and programmatic access
- Compatible with aws cli, rclone, MinIO client, and other S3-compatible tools
- AWS Signature V4 authentication (access key + secret key)
- Supports ListBuckets, GetBucketLocation, ListObjectsV2, GetObject, HeadObject
- HTTP Range requests for partial downloads
- Hidden paths, denied extensions, and auth enforced
Security & Operations
- HTTP Basic Auth (username + password)
- Bearer token auth via configurable header (for MCP clients, API consumers, automation)
- External auth via reverse proxy headers (e.g. Authelia, Authentik)
- Hide files by dotfile flag or glob patterns