biFrǫSt is a remote file system that mounts a virtual folder and translates file operations into HTTP requests handled by a stateless REST API server.
It allows applications to interact with remote files as if they were stored locally.
Currently, biFrǫSt is primarily supported on Linux (via FUSE3). Other platforms may work with additional effort but are not officially supported.
-
Remote mount via FUSE3 (Rust client).
-
REST API server built with Node.js/Express (TypeScript).
-
HMAC-based authentication with timestamp and nonce validation (replay-attack protection).
-
File and directory operations:
- Read/write/append/truncate files;
- Create/delete/move/rename files and directories;
- Support for symbolic and hard links.
-
Metadata management: size, permissions, timestamps.
-
Range requests for efficient large file access.
-
Client-side caching with automatic invalidation.
-
Client (Rust)
- Mounts the virtual file system;
- Provides also commands for registration and configuration;
- Converts FUSE calls into signed HTTP requests;
- Implements caching.
-
Server (TypeScript)
- Stateless RESTful service;
- Validates requests with HMAC;
- Handles large file streaming with Range requests;
- Handles multiple users.
All requests are signed with HMAC-SHA256. See Authentication for details.
HMAC provides:
- Authentication: verifies that the request comes from a valid user;
- Integrity: ensures that requests and responses are not tampered with in transit;
- Replay protection: timestamps and nonces prevent reuse of old requests.
Confidentiality is not provided by HMAC. The data is not encrypted in transit. To protect sensitive information, you should use HTTPS (TLS/SSL) to encrypt communication between client and server. For example, you can deploy a reverse proxy like Nginx with a valid SSL certificate to secure your biFrǫSt server.
- Full API reference: API documentation
Note: Some steps in the installation scripts require root privileges.
This includes installing system dependencies (e.g., viaapt-getordnf) and setting up a system service/daemon withsystemd.
You may be prompted to enter your password viasudoduring these steps.
You can install the client by running the provided command:
wget -qO- https://raw.githubusercontent.com/bifrost-org/biFroSt/main/scripts/install_bifrost_client.sh | bashYou can install the server by running the provided commands:
wget -q https://raw.githubusercontent.com/bifrost-org/biFroSt/main/scripts/install_bifrost_server.sh
bash install_bifrost_server.sh
rm install_bifrost_server.shStep 1: Install system dependencies
On Debian/Ubuntu:
sudo apt install -y build-essential pkg-config fuse3 libfuse3-dev curl gitOn Fedora/RHEL/CentOS:
sudo dnf install -y gcc gcc-c++ make pkgconfig fuse3 fuse3-devel curl gitStep 2: Install Rust (if not installed)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"Step 3: Clone and build the client
git clone https://github.com/bifrost-org/biFroSt.git
cd biFroSt/client
cargo build --release
sudo cp target/release/bifrost /usr/local/bin/
sudo chmod +x /usr/local/bin/bifrostMake sure FUSE allows
allow_otherby checking/etc/fuse.conf(uncomment or adduser_allow_otherif needed).
Step 1: Install Node.js and npm
Debian/Ubuntu:
sudo apt install -y nodejs npmFedora/RHEL/CentOS:
sudo dnf install -y nodejs npmStep 2: Clone and build the server
git clone https://github.com/bifrost-org/biFroSt.git
cd biFroSt/server
npm install # install dependencies
npm run build # compile TypeScriptThe compiled server will be in dist/. You can run it with:
node dist/server.jsOr create a system service / daemon to run it in the background.
Before running the server, you need to create an .env file inside the dist/ directory.
This file defines the server configuration and database credentials.
Create dist/.env with the following content, replacing the placeholders with your values:
# PostgreSQL database configuration
DB_HOST=localhost
DB_PORT=5432
DB_NAME=bifrost
DB_USER=your_username
DB_PASSWORD=your_password
# Port the app listens on
PORT=3000
# MASTER_KEY is the symmetric key used by the server to encrypt and decrypt users' secret keys.
# It must be exactly 32 bytes (64 hexadecimal characters) for AES-256-GCM encryption.
# Generate it with: `openssl rand -hex 32`.
# DO NOT change this key after generation, or previously encrypted data will become unrecoverable.
MASTER_KEY=your_generated_master_key
# Root path containing all users' directories
USERS_PATH=/path/to/usersMake sure all paths and credentials exist and are accessible by the user running the server.
biFrǫSt (server) requires a PostgreSQL database to store user informations. The installation script does not create the database or tables - this is the responsibility of the user.
Make sure you have a PostgreSQL database ready. For example:
createdb -h <DB_HOST> -p <DB_PORT> -U <DB_USER> <DB_NAME>A SQL schema file is provided as schema.sql in the repository. It contains the table structure required by the server:
psql -h <DB_HOST> -p <DB_PORT> -U <DB_USER> -d <DB_NAME> -c "
CREATE TABLE IF NOT EXISTS \"user\" (
id SERIAL PRIMARY KEY,
username TEXT NOT NULL,
api_key TEXT NOT NULL,
crypted_secret_key TEXT NOT NULL,
iv TEXT NOT NULL,
tag TEXT NOT NULL
);"Make sure the PostgreSQL user exists and has privileges to create databases and tables. If you installed PostgreSQL from a package, the default user might be
postgreswith no password.
bifrost configConfigures the client. You will be prompted for:
- Server address (hostname or IP);
- Server port;
- Mount point (local folder where the virtual file system will be mounted);
- Timeout (in seconds).
The configuration is saved in ~/.bifrost.
bifrost registerCreates a new user on the server using your system username.
The server will return an api_key and a secret_key, which are stored in ~/.bifrost/.
bifrost start [OPTIONS]Starts the client for the current user using the previously configured settings.
The virtual file system will be mounted at the mount point defined in bifrost config.
Options:
-d,--detached→ run the client as a background daemon-e,--enable-autorun→ autorun the program on startup
bifrost stop [OPTIONS]Options:
-d,--disable-autorun→ disable autorun
Unmounts the virtual folder and stops the client.