filestash README

The project's README from github.com/mickael-kerjean/filestash. As one markdown file: README.md.

screenshot

What is this?

Filestash started as a storage agnostic Dropbox-like file manager that speaks every storage protocol (FTP, SFTP, S3, SMB, WebDAV, IPFS, and about 20 more). It grew into what we want to be the world's best file management platform, centered around 3 separate products:

  1. Web client (the file manager available from your browser): documentation / screenshot / demo
  2. Native client (to sync your data on your device): repo / screenshots for mac, windows, linux, android & iphone
  3. Gateways (to expose your storages over any protocol): showcase

The philosophy that guides this project is: "anything that's not a fundamental truth of the universe lives in a plugin". That keeps the core lean and fast, and the opinions replaceable, so when your requirements get deep or weird, the answer is a plugin, not a fork. You only carry the bloat you really need.

storage + auth architecture

Key Features

Plugins

Malleability isn't an afterthought, it's the whole architecture:

anything that's not a fundamental truth of the universe lives in a plugin

Taken literally, the "truths of the universe" are a set of core interfaces, one for every key component of Filestash, and they're yours to implement (storage, authentication, authorisation, search, thumbnailing, apps, middleware, frontend changes, ...)

The oldest one is the storage interface, the one at work whenever you connect to a storage:

type IBackend interface {
	Ls(path string) ([]os.FileInfo, error)
	Stat(path string) (os.FileInfo, error)
	Cat(path string) (io.ReadCloser, error)
	Mkdir(path string) error
	Rm(path string) error
	Mv(from string, to string) error
	Save(path string, file io.Reader) error
	Touch(path string) error
}

Historically, plugins were made in Go and compiled in. Today there's a second path: runtime plugins, a zip you drop in the plugins folder. The zip can reshape the frontend and it can carry wasm implementing the very same core interfaces. That wasm runs in a VM with tight control on permissions: no declared network host, no way to phone home. Installing a plugin doesn't mean trusting it with everything.

For example:

use filestash::*;

#[derive(Default)]
pub struct Plugin;

impl Authorisation for Plugin {
    fn ls(&self, _ctx: &Context, path: &str) -> Decision {
        self.check(path)
    }
    fn cat(&self, _ctx: &Context, path: &str) -> Decision { ... }
    fn stat(&self, _ctx: &Context, path: &str) -> Decision { ... }
}

impl Plugin {
    fn check(&self, path: &str) -> Decision {
        if path.split("/").any(|segment| segment == "top_secret") {
            log::warn!("[TOPSECRET] access denied !!");
            return Decision::Deny;
        }
        Decision::Allow
    }
}

register!(Plugin: Authorisation);

These few lines give you a readonly view of your data where every folder named "top_secret" is off limits. For more examples, browse the plugin folder, the runtime plugin cookbook, and the plugin marketplace.

And to be clear, code is the power-user path, there are no code options

Getting Started

To install Filestash, head to the Getting started guide. If you want to leverage plugins, head over to the inventory, or learn about developing your own plugins.

Support

Why

Familiar with the infamous comment from Dropbox's launch on HN? In my memory it goes like this:

Credits

Filestash stands on the shoulder of: contributors, folks developing awesome libraries, BrandonM, a whole bunch of C stuff (the C standard library, libjpeg, libpng, libgif, libraw and many more), fontawesome, material, Browser stack to let us test on real devices, and the many guys from Nebraska and elsewhere who have been thanklessly maintaining the critical pieces that Filestash sits on top:

credit to the nebraska guy on xkcd

filestash (mickael-kerjean/filestash)

ipfs
Searching Database…

14.8K ·GitHub
What is this?Filestash is a storage-agnostic, Dropbox-like file manager that speaks nearly every storage protocol (S3, FTP, SFTP, WebDAV, SMB, NFS, Git, IPFS, Dropbox, Azure, SharePoint and more), so you get one file browser for all your backends.
Is this just a web file manager, or something bigger?It is three products in one: a web client you use from the browser, a native client to sync files to your device, and gateways that expose your storage over other protocols.
How do I get it running?You deploy it yourself as a self-hosted server by following the official Getting Started guide; there is no hosted SaaS version described.
Do I need to know Go to extend it with plugins?Not necessarily. Compiled Go plugins are the historical path, but you can also drop in runtime plugins as a zip containing WASM, without recompiling the server.
Can an installed plugin do whatever it wants with my server?No. Runtime plugins execute inside a locked-down WASM VM with no declared network access, so installing one doesn't automatically grant it full trust.
What storage backends can I connect to?S3, FTP, SFTP, WebDAV, SMB, NFS, Git, IPFS, Dropbox, Azure and SharePoint are among the officially listed backends, since the storage layer is just one of the plugin interfaces.
Why build a new file manager instead of just using Dropbox?The project's philosophy is that 'anything that's not a fundamental truth of the universe lives in a plugin', keeping the core lean while letting you connect to whatever storage you already use instead of being locked to one vendor.
What else can it do besides browsing files?Beyond browsing, it supports versioning, audit logs, antivirus scanning, quotas, chat, Chromecast casting, on-demand video transcoding, and mounting shared links as a network drive.
What is the plugin marketplace?It's a catalog of ready-made plugins and file apps (viewers for formats like SVG, themed UIs, AI/OCR features, etc.) that you can install without writing any code yourself.
What are similar projects?sftpgo, alist, rclone, copyparty, ceph, OpenList, cloudreve, filebrowser
Size
73 MB
Stars
14.8K
Updated
CommitOct 16
Age
9y
Commits · 90 Days