FAQ
What is Hain?
Hain is a peer-to-peer file sync tool that runs from your terminal. Create a space, share a key with a collaborator, and files sync directly between your machines. Files are stored locally, end-to-end between peers.
Does it work offline?
Yes. Your files are always stored locally and available offline. Sync happens when peers are online and connected. When you go offline, you keep working. When you reconnect, changes sync automatically.
Who can see my files?
Only peers who have the share key. Hain connects your machines directly using encrypted peer-to-peer networking. There are no central servers involved.
Does Hain collect any data?
No. Hain has no analytics, no telemetry, no tracking, and no cloud storage. Your files stay on your machines and travel directly between peers. There is no server that sees your data, your usage, or your identity.
What is a share key?
A share key is a 64-character hex string that identifies a space on the P2P network. Anyone with the key can join the space and sync files. Treat it like a password — share it through a secure channel.
Can I use it with the desktop app later?
Yes. The CLI, TUI, and upcoming desktop app all share the same vault format and core. A vault created with the CLI works with the desktop app and vice versa.
What about NAT and firewalls?
Hain uses a distributed network to find and connect peers. It supports NAT hole-punching for direct connections, so most home and office networks work without any configuration.
If you’re behind a strict corporate firewall that blocks UDP traffic, direct connections may fail. In those cases, Hain can relay data through other peers on the network, though this adds latency.
What platforms are supported?
| Platform | Architecture | Status |
|---|---|---|
| Linux | x64 | Supported |
| Linux | arm64 | Supported |
| macOS | arm64 (Apple Silicon) | Supported |
| macOS | x64 (Intel) | Supported |
Windows is not currently supported.
Is the source code available?
Hain is distributed as compiled V8 bytecode. The source code is not publicly available. The distributed tarballs include checksum verification for integrity.
How do I report a bug?
File an issue on the GitHub issue tracker.
How do I update?
Run the in-app updater:
hain update
It downloads the latest release for your platform, verifies its SHA256, and atomically swaps to the new version. See the Updating guide for the rollback path and channel handling.
Can I run two versions side by side?
Each successful update keeps the previous version on disk so hain update --rollback works. Listing what’s installed:
hain update --list-installed
Older versions beyond the previous one are pruned automatically. Pass --no-prune to keep them.
How do I downgrade?
Either roll back to the previously installed version:
hain update --rollback
Or pin to a specific version on your channel:
hain update --version 0.1.0-beta.2
If the version you want is on the other channel (stable vs beta), re-run the curl installer with that tag — hain update won’t cross channels on you.
Is curl | bash safe?
The install script downloads over HTTPS and verifies SHA256 checksums before extracting. You can inspect the script before running it:
curl -fsSL https://raw.githubusercontent.com/hainlabs/hain-releases/main/install.sh | less
What happens to my files if I delete a space?
Leaving a space (hain space leave) removes it from your vault’s space list, but the files remain on disk in the folder you designated for the space. It does not delete files from other peers. Use hain space forget to drop the binding only, without affecting the folder.
Can I move my space folder?
Yes. While Hain is running, it watches for folder moves at the OS level and updates the registry automatically. If you move a folder while Hain is stopped, run hain space adopt <new-path> on next launch to re-bind it. To move a folder and keep Hain running through the move, use hain space relocate <id> <new-path>.
What if I designate a folder that contains sensitive files?
Before binding any folder as a space, Hain walks the folder once and reports findings: SSH keys, .env files, private keys, credentials, and similar. Blocking findings (private key material, large repos, very high file counts) require explicit acknowledgement before sync starts. You can also exclude files from sync at designation time. Run hain space preview-designation <path> to see what Hain would find without binding anything.
Can multiple people edit the same file?
Yes. Hain supports concurrent writes from multiple peers. Conflicting edits are resolved automatically through a deterministic ordering process. For most file-based workflows (documents, code, assets), this works transparently — the latest write wins at the file level.
How many peers can share a space?
There is no hard limit. Performance depends on the number of files, the frequency of changes, and network conditions. Hain is designed for small-to-medium teams (2–20 peers).