Libertas is a modern, self-hosted media library and management system built with performance and privacy in mind. It allows you to organize your photos and videos, automatically extract metadata, and manage your collection through a beautiful web interface.
- Media Management: Securely upload, store, and organize your photos and videos.
- Smart Import: Bulk import existing media collections using the CLI importer, with automatic duplicate detection and storage quota management.
- Metadata Extraction: Automatically extracts and indexes EXIF data (camera model, date taken, etc.) for powerful search and filtering.
- Albums: Create and manage albums to organize your memories.
- People & Face Detection: (In Development) Detect faces and tag people in your photos.
- Background Processing: Efficient asynchronous processing for thumbnail generation and metadata analysis using NATS messaging.
- User Management: Multi-user support with configurable storage quotas.
- Language: Rust
- Framework: Axum
- Database: PostgreSQL (via SQLx)
- Messaging: NATS
- Async Runtime: Tokio
- Framework: React 19
- Build Tool: Vite
- Styling: Tailwind CSS v4
- Routing: TanStack Router
- State Management: Zustand
- UI Components: Radix UI, Shadcn UI
- Containerization: Docker & Docker Compose
libertas_api: The main REST API server.libertas_core: Shared business logic, models, and database repositories.libertas_frontend: The React-based web user interface.libertas_importer: CLI tool for bulk importing media from the local filesystem.libertas_infra: Infrastructure code and factory functions for dependency injection.libertas_worker: Background worker service for processing media tasks (e.g., thumbnail generation).
Start the PostgreSQL database and NATS server using Docker Compose:
docker compose up -dYou can run the API server and Worker separately.
Run the API:
cargo run -p libertas_apiRun the Worker:
cargo run -p libertas_workerNavigate to the frontend directory and start the development server:
cd libertas-frontend
npm install
npm run devThe web interface should now be accessible at http://localhost:5173 (or the port shown in your terminal).
To import an existing folder of photos/videos for a specific user:
cargo run -p libertas_importer -- --username <USERNAME> --path /path/to/media --recursiveOptions:
-u, --username: The username of the account to import media into.-p, --path: The local path to the directory containing media files.-r, --recursive: (Optional) Recursively search for media files in subdirectories.