Getting Started
This guide gets a DittoFS server running and an NFS share mounted in a few minutes.
Install
Section titled “Install”Pick whichever fits your platform.
Nix (recommended)
Section titled “Nix (recommended)”# Run directly without installingnix run github:marmos91/dittofs -- initnix run github:marmos91/dittofs -- start
# Or install both dfs (server) and dfsctl (client) to your profilenix profile install github:marmos91/dittofsdfs init && dfs startQuick install (macOS / Linux)
Section titled “Quick install (macOS / Linux)”curl -fsSL https://github.com/marmos91/dittofs/releases/latest/download/install.sh | shHomebrew
Section titled “Homebrew”brew tap marmos91/tapbrew install marmos91/tap/dfs # server daemonbrew install marmos91/tap/dfsctl # client CLIDebian / Ubuntu (APT)
Section titled “Debian / Ubuntu (APT)”curl -fsSL https://s3.cubbit.eu/dittofs-binaries/apt/dittofs.gpg.key | gpg --dearmor --yes | sudo tee /usr/share/keyrings/dittofs.gpg > /dev/nullecho "deb [signed-by=/usr/share/keyrings/dittofs.gpg] https://s3.cubbit.eu/dittofs-binaries/apt stable main" | sudo tee /etc/apt/sources.list.d/dfs.listsudo apt update && sudo apt install dfssudo systemctl enable --now dfsDocker
Section titled “Docker”docker run -d \ -p 12049:12049 -p 12445:12445 -p 8080:8080 \ -v /path/to/config.yaml:/config/config.yaml:ro \ -v dittofs-data:/data \ marmos91c/dittofs:latestBuild from source
Section titled “Build from source”git clone https://github.com/marmos91/dittofs.gitcd dittofsgo build -o dfs cmd/dfs/main.go./dfs init./dfs startFirst run and the admin password
Section titled “First run and the admin password”On first start, DittoFS creates an admin user. By default it prints a
generated password once:
*** IMPORTANT: Admin user created with password: aBcDeFgHiJkLmNoPqRsTuVwX ***Save it. The account is created with MustChangePassword, so you set a new
password on first login. To choose the password up front (handy for Docker,
Kubernetes, and CI), set it before the first start:
DITTOFS_ADMIN_INITIAL_PASSWORD=my-secure-password ./dfs startMount your first NFS share
Section titled “Mount your first NFS share”# 1. Start the server./dfs start
# 2. Log in and set your password./dfsctl login --server http://localhost:8080 --username admin./dfsctl user change-password
# 3. Create a user with your host UID (needed for NFS write access)./dfsctl user create --username $(whoami) --host-uid
# 4. Create stores./dfsctl store metadata add --name default --type badger./dfsctl store block local add --name local-cache --type fs./dfsctl store block remote add --name s3-remote --type s3
# 5. Create a share and grant access./dfsctl share create --name /export --metadata default \ --local local-cache --remote s3-remote./dfsctl share permission grant /export --user $(whoami) --level read-write
# 6. Enable the NFS adapter./dfsctl adapter enable nfs
# 7. Mount it (Linux)sudo mkdir -p /mnt/nfssudo mount -t nfs -o tcp,port=12049,mountport=12049 localhost:/export /mnt/nfsecho "Hello DittoFS!" > /mnt/nfs/hello.txtOn macOS, mount with resvport and nolock:
sudo mount -t nfs -o tcp,port=12049,mountport=12049,resvport,nolock localhost:/export /tmp/nfsNext steps
Section titled “Next steps”- Configuration — tune the server and manage stores.
- SMB — serve the same shares to Windows and macOS.
- Snapshots — point-in-time protection for shares.