---
title: "Deploy Dufs"
description: "Share files from one volume: web UI, uploads, WebDAV, search."
category: "Storage"
url: https://railway.com/deploy/dufs-on-railway
---

# Deploy Dufs

Share files from one volume: web UI, uploads, WebDAV, search.

**[Deploy Dufs on Railway](https://railway.com/template/dufs-on-railway)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/dufs-on-railway/manifest.json

- **Creator:** Rakit
- **Category:** Storage

## Template content

### dufs https://raw.githubusercontent.com/sigoden/dufs/refs/heads/main/assets/favicon.ico

- **Source:** codestorm-official/dufs
- **Start command:** `/bin/sh -c 'exec dufs /data -p "${PORT:-3000}" -a "${DUFS_USERNAME}:${DUFS_PASSWORD}@/:rw" --allow-all'`
- **Public domain:** Yes

## Documentation

# Deploy and Host Dufs on Railway

Dufs is a tiny, fast file server: a web UI for browsing, uploading, searching, and editing files, plus WebDAV and a REST-style API — all in one Rust binary. The whole server is 2 MB, it needs no database, and everything it serves lives on a single volume.

## About Hosting Dufs

Hosting Dufs takes one service and one volume. The official image is `FROM scratch` with no shell, so this template wraps the pinned binary in a 3-line Alpine layer — that lets the start command read the admin credentials and the injected `PORT` from variables instead of baking them in. Anonymous requests are refused; the admin signs in with basic auth and gets full read-write over `/data`, including WebDAV mounts from desktop clients. There is deliberately no health-check path: the UI is auth-gated, so Railway finishes the deploy as soon as the server starts, which a 2 MB binary does in well under a second.

## Common Use Cases

- Share files with a team from a URL you control, with one password.
- Upload logs, exports, or media from scripts via `curl -T` or WebDAV.
- Mount a folder from macOS/Windows/Linux through WebDAV, on a volume.
- Serve static assets from an always-on URL during development.
- A drop-box for automation: anything your n8n flow or agent can PUT.

## Dependencies for Dufs Hosting

- Official Docker image `sigoden/dufs:v0.47.0` (2 MB, multi-architecture) — the binary is copied into a 3-line Alpine wrapper.
- One persistent volume attached at `/data`.
- No PostgreSQL, Redis, or any other service.

### Implementation Details

First run: open `https://YOUR-DOMAIN`, sign in with the username and the generated `DUFS_PASSWORD` (reveal it from the service variables). Everything under `/data` is then browsable, searchable, and editable from the UI, and mountable via WebDAV at `https://YOUR-DOMAIN/webdav` with the same credentials.

| Path | Purpose |
| --- | --- |
| `/` | Web UI — basic-auth sign-in |
| `/webdav` | WebDAV mount point — same credentials |
| `/upload`, `/api` | REST-style upload and query endpoints |
| `/data` | Everything served — attach the volume here |

Anonymous requests get `401`; the single admin rule covers the whole volume. For public read-only sharing, the setup guide documents the one-line rule change (`@/:ro`) — private by default.

## Comparison with Alternatives

✅ = built-in, ❌ = not available or requires extra work.

| Capability | This template (Dufs) | File Browser | Nextcloud |
| --- | --- | --- | --- |
| Actively maintained upstream | ✅ | ❌ (upstream advises treating it as unmaintained) | ✅ |
| Single tiny binary, one volume | ✅ (2 MB) | ❌ | ❌ (PHP stack + database) |
| WebDAV built in | ✅ | ❌ | ✅ |
| Search across files | ✅ | ❌ | ✅ |
| Basic-auth sign-in, no accounts database | ✅ | ⚠️ (user store in its own DB) | ❌ |
| Upload from `curl -T` and scripts | ✅ | ✅ | ❌ |
| Resource footprint at idle | ~10 MB RAM | ~50 MB RAM | 512 MB+ |

Sources: the [Dufs repository](https://github.com/sigoden/dufs), the [File Browser security notes](https://github.com/filebrowser/filebrowser#security), and the Nextcloud documentation.

## Security Considerations

- Private by default: anonymous requests are refused (`401`); the admin password is generated at deploy and visible in the service variables — seal it and store it in a password manager.
- The single admin rule covers the whole volume. Anyone with the password can read, upload, edit, and delete everything on the volume.
- Keep the domain private if the files are sensitive; adding a public read-only rule (`@/:ro`) is a one-line change documented in the setup guide, and it makes everything downloadable anonymously.
- WebDAV over the public domain rides Railway's TLS; desktop mounts should use `https://`, never plain HTTP.
- Dufs has no per-user permissions, versioning, or audit log — it is a fast single-volume file server, not a document management system.

## Why Deploy Dufs on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Dufs on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.

A 2 MB server and one volume put a password-protected, WebDAV-capable file share online in one click — with nothing else to maintain.

## Similar templates

- [RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set](https://railway.com/deploy/rustfs-or-just-updated-s3-object-store-p) — S3-compatible object store, keys and public URL preset, volume kept
- [TimescaleDB](https://railway.com/deploy/timescaledb-railway-template) — Time-series analytics on PostgreSQL: fast, familiar, scalable.
- [Neo4j 2026.10 Community](https://railway.com/deploy/neo4j-202610-community) — Neo4j graph database with APOC, Browser, Bolt TCP proxy and a volume

Open this page in a browser: https://railway.com/deploy/dufs-on-railway
