How to Install RustFS FUSE-based Filesystem on Ubuntu 22.04

RustFS is an encrypted, FUSE-based filesystem written in Rust. It allows you to store files securely, where the actual data on disk is encrypted, while you interact with the mounted directory as if it were a normal folder.

Prerequisites

Before starting, make sure you have:

  • Ubuntu 22.04 (or similar Linux server/VM)

  • root or sudo access

  • Internet connection

Update Package Index

We update the repository lists to ensure we install the latest available versions.

apt update

Install Required System Packages. These packages are needed for building RustFS and enabling filesystem mounting:

apt install fuse3 pkg-config libssl-dev build-essential -y
  • fuse3 enables filesystem mounting

  • build-essential, libssl-dev, pkg-config → Required to compile Rust programs

Install Rust Toolchain

RustFS is distributed as a Rust crate, so we install Rust first,

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source ~/.cargo/env
  • This installs cargo (Rust package manager) and compiler tools.

Output:

root@vps:/tmp# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
info: downloading installer
warn: It looks like you have an existing rustup settings file at:
warn: /root/.rustup/settings.toml
warn: Rustup will install the default toolchain as specified in the settings file,
warn: instead of the one inferred from the default host triple.

Welcome to Rust!

This will download and install the official compiler for the Rust
programming language, and its package manager, Cargo.

Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:

  /root/.rustup
.
.
.
Current installation options:

   default host triple: x86_64-unknown-linux-gnu
     default toolchain: stable (default)
               profile: default
  modify PATH variable: yes

1) Proceed with standard installation (default - just press enter)
2) Customize installation
3) Cancel installation
>1

Install RustFS via Cargo

This downloads and builds the RustFS binary directly from crates.io,

cargo install rustfs

Output:

root@vps:/tmp# cargo install rustfs
    Updating crates.io index
  Downloaded rustfs v0.0.2
  Downloaded 1 crate (9.3KiB) in 0.34s
  Installing rustfs v0.0.2
    Updating crates.io index
   Compiling rustfs v0.0.2
    Finished `release` profile [optimized] target(s) in 0.89s
  Installing /root/.cargo/bin/rustfs
   Installed package `rustfs v0.0.2` (executable `rustfs`)

The compiled binary will be located at.

~/.cargo/bin/rustfs

Output:

root@vps:~# ~/.cargo/bin/rustfs
Hello, RustFS!

Make RustFS Available System-Wide. We create a symbolic link so it can run from anywhere:

ln -s ~/.cargo/bin/rustfs /usr/local/bin/rustfs

Usage Example

Create Storage and Mount Points

The storage directory holds encrypted data, while the mount directory is where you access files normally.

mkdir ~/rustfs-storage
mkdir ~/rustfs-mount

Mount RustFS.

Mount the encrypted filesystem using a password:

rustfs mount ~/rustfs-storage ~/rustfs-mount --password "YourStrongPassword"

Output:

root@vps:/tmp# rustfs mount ~/rustfs-storage ~/rustfs-mount --password "rexeKOWEN5dee"
Hello, RustFS!
  • Files you place in ~/rustfs-mount will appear encrypted inside ~/rustfs-storage.

Conclusion

RustFS provides secure, transparent encryption for your data while letting you work with files normally via a mounted folder. By installing via Cargo, we avoid private repository access and ensure that the filesystem is built directly from the official Rust package source. Once configured, RustFS can be used for secure backups, confidential data storage, or cloud/cluster storage setups.


CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS