Skip to content

Hafiz

Hafiz Logo

Enterprise-grade S3-compatible object storage written in Rust

CI Status Release License


Hafiz (حافظ - "Guardian" in Arabic/Turkish) is a high-performance, S3-compatible object storage system. Built from the ground up in Rust for memory safety, performance, and reliability.

Why Hafiz?

  • High Performance


    Built in Rust with async I/O for maximum throughput and minimal latency.

  • Enterprise Security


    AES-256-GCM encryption, Object Lock (WORM), LDAP integration.

  • S3 Compatible


    Works with AWS SDKs, CLI, and existing S3 tools.

  • Cloud Native


    Helm chart, Docker images, Prometheus metrics.

Quick Start

# Clone and build
git clone https://github.com/shellnoq/hafiz.git
cd hafiz
docker build -t hafiz:local .

# Run
docker run -d \
  --name hafiz \
  -p 9000:9000 \
  -v hafiz-data:/data \
  -e HAFIZ_ROOT_ACCESS_KEY=hafizadmin \
  -e HAFIZ_ROOT_SECRET_KEY=hafizadmin \
  hafiz:local

Access:

  • S3 API: http://localhost:9000
  • Admin UI: http://localhost:9000/admin
  • File Browser: http://localhost:9000/browse
git clone https://github.com/shellnoq/hafiz.git
cd hafiz
docker compose up -d
git clone https://github.com/shellnoq/hafiz.git
cd hafiz
docker build -t hafiz:latest .
docker compose -f docker-compose.cluster.yml up -d
# Prerequisites: Rust 1.85+
git clone https://github.com/shellnoq/hafiz.git
cd hafiz
cargo build --release

HAFIZ_ROOT_ACCESS_KEY=admin \
HAFIZ_ROOT_SECRET_KEY=password \
./target/release/hafiz-server

Features

Core Storage

Feature Status
Bucket Operations ✅
Object Operations ✅
Multipart Uploads ✅
Versioning ✅
Lifecycle Policies ✅
Storage Classes ✅

Security

Feature Status
AWS Signature V4 ✅
Server-Side Encryption ✅
Object Lock (WORM) ✅
Bucket Policies ✅
LDAP Integration ✅
TLS ✅

Operations

Feature Status
Admin API ✅
Web File Browser ✅
Presigned URLs ✅
Prometheus Metrics ✅
Event Notifications ✅
Access Logging ✅
Health Checks ✅

Enterprise

Feature Status
Multi-Server Cluster ✅
Cross-Network Replication ✅
Unidirectional Replication ✅
Air-Gapped Sync ✅
IAM-Style User Policies ✅
PostgreSQL Backend ✅
High Availability ✅

Comparison

Feature Hafiz AWS S3
S3 Compatible ✅ ✅
Object Lock ✅ ✅
LDAP ✅ ❌
Written in Rust ✅ ❌
License Apache 2.0 N/A
Self-Hosted ✅ ❌

Integrations

Hafiz works with any S3-compatible application:

Getting Help

License

Hafiz is open source under the Apache License 2.0.