Shared folders, on demand
Share a folder and every device can browse it right away. Only the listing travels; a file's bytes move when someone opens it, and only the blocks of the part being read.
Zig & Oriel · Linux · Windows · macOS · Android
NomadFS shares folders across your laptop, phone and home server. Every device sees every shared folder at once; a file only travels when someone opens it. Add a swarm folder that all of them write to, and mount it all like any other folder.
01 · what it does
Not a cloud and not a full mirror. Your devices keep their own files and lend them to each other on request.
Share a folder and every device can browse it right away. Only the listing travels; a file's bytes move when someone opens it, and only the blocks of the part being read.
One folder every device reads and writes. Add, rename and delete from anywhere; edits merge without a server, and two edits at once keep both, the other as a conflict copy. Your own programs can use it too, through a local API.
Every device's shares appear under <mount>/<device>/<share>, read-only, and the swarm folder under <mount>/Swarm, writable from any app: a folder on Linux and macOS, a drive in Windows Explorer.
Join a device with a code or by scanning its QR code with the phone camera. The invite works once, for ten minutes, and the swarm key travels encrypted: it is never shown.
Devices talk over Noise XXpsk0 sessions keyed by your swarm, with Ed25519 device identities you can list and revoke. Every block is checked against its hash when it arrives.
Browse devices, preview images, video, audio, PDF and text, manage the swarm folder, write and edit Markdown notes across your devices, mount from a tab or the tray, and connect devices. Built with Oriel.
02 · the app
The same app on Linux, Windows, macOS and Android: a drawer on wide windows, a navigation bar on phones.
on the phone
03 · how it works
Metadata goes everywhere. Bytes go only where they are asked for.
A shared folder is scanned into a Merkle tree: files are split with FastCDC into content-addressed blocks. The bytes stay in your files; NomadFS records where each block lives and stores only the directory blocks. Shares are rescanned every 30 seconds.
Each device asks the others for their share roots and reads one directory block at a time as you browse. Nothing is copied ahead of time.
A read loads only the blocks that cover the requested range, from the device that has them, and checks each against its hash. Fetched blocks are cached, so what you opened once still opens offline.
Its listing is a replicated manifest, a state-based CRDT, kept on every device and merged with each reachable peer every 10 seconds. Concurrent edits keep both versions under the same conflict name on every device.
the network
There is no server in the middle. Each device keeps one encrypted connection to each device it talks to, and tells the others every address it has: the home network, Tailscale or another VPN, a public address. A keepalive notices a dropped connection within 45 seconds, and it comes back in seconds.
When none of a device's addresses answers, another device that reaches both carries the connection, still encrypted end to end. A small node on a cloud server joins two private networks the same way.
Each step uses a technology you may want to look into: content-defined chunking, Merkle DAGs, the Noise handshake, relays, a CRDT. Learn how NomadFS works, one diagram-led page each.
04 · for your programs
The swarm folder isn't only for people. The running node serves it to the programs on your machine over a small HTTP API, so an app can keep its data on every device you own without a server, a mount or a sync engine of its own.
The running node (the app, or nomadfs as a service) listens on 127.0.0.1 and writes its address and a random token to api.json in its device folder, readable by your user only. It's removed when the node stops.
GET, PUT and DELETE on files/<path>, a listing under list/ and the folder's state under status. Files up to 8 MiB; the swarm takes care of getting them to every device.
Every file carries its content id as an ETag. A PUT with If-Match writes only over the version you read, If-None-Match: * only where nothing is yet: anything else answers 412, and you merge and try again.
Until the node has synced with its peers once, writes answer 503: a device that just woke up can't overwrite the swarm's data with its own empty folder. Edits made apart still meet as conflict copies, never lost.
nomadfs swarm status # synced yet?
nomadfs swarm ls notes # names, sizes, etags (JSON)
nomadfs swarm get notes/todo.md # the file, on stdout
# from a file or stdin; prints the new etag
nomadfs swarm put notes/todo.md --if-match <etag>
nomadfs swarm put notes/new.md --create
nomadfs swarm rm notes/old.md --if-match <etag>
already using it
locket sync setup nomadfs on one, locket sync join nomadfs on the others.The endpoints, headers and answers are in the swarm folder docs. Needs NomadFS 0.6.0 or later.
05 · download
The app for the desktop and Android, and the command line node for servers. Free and open source.
Finding the latest release…
AppImage, .deb or .rpm. The AppImage updates itself.
An installer for the app, which updates itself. SmartScreen asks once: More info, then Run anyway.
A disk image: drag NomadFS to Applications, then open it with right-click → Open the first time.
On Google Play as a test for invited testers while it waits for its public release, or the APK, which updates itself.
Google Play (testing)Or install from a terminal: the app and the command line, for your user, each file checked against the release's checksums.
curl -fsSL https://raw.githubusercontent.com/highercomve/nomadfs/main/scripts/install.sh | bash
irm https://raw.githubusercontent.com/highercomve/nomadfs/main/scripts/install.ps1 | iex
Every file is also on the release page; Getting started covers the first launch.
06 · from source
NomadFS is early software. To build it yourself you need Zig 0.16. The command line node and the app share one core; the app is made with Oriel by foreachdeveloper.
# build zig-out/bin/nomadfs, run the tests
zig build
zig build test
# share a folder, then invite another device
./zig-out/bin/nomadfs --share Photos:$HOME/Pictures
./zig-out/bin/nomadfs --invite
# mount every device's shares (Windows: --mount Z:)
./zig-out/bin/nomadfs --mount ~/NomadFS
# fetches Oriel v0.20.7
cd nomadfs-gui
zig build run # the desktop app
zig build package # deb, rpm, AppImage
# Android: an APK with arm64-v8a and x86_64
oriel android build
Every command reads nomadfs.conf from the current folder, ~/.nomadfs/ or /etc/nomadfs/. The getting started guide walks through a first swarm.
07 · set out
Install the app, share a folder, and scan the invite from your phone.