Overview
Discover what makes Cloudreve powerful
Cloudreve is a **self‑hosted file management system** that abstracts the complexities of multi‑cloud storage into a single, unified API surface. At its core, it exposes a RESTful interface for CRUD operations on files and directories while delegating the actual persistence to a pluggable set of storage back‑ends such as local disk, S3-compatible services, OneDrive, Qiniu, Aliyun OSS, Tencent COS, and Upyun. The application is written in **Go** and leverages the lightweight **Gin** web framework for routing, combined with the **ent** ORM to model domain entities and generate type‑safe database access layers. This combination yields a high‑performance, low‑overhead service that can comfortably run on modest hardware while scaling horizontally when combined with a shared database and stateless workers.
Language
Web Framework
Data Layer
Storage Abstraction
Overview
Cloudreve is a self‑hosted file management system that abstracts the complexities of multi‑cloud storage into a single, unified API surface. At its core, it exposes a RESTful interface for CRUD operations on files and directories while delegating the actual persistence to a pluggable set of storage back‑ends such as local disk, S3-compatible services, OneDrive, Qiniu, Aliyun OSS, Tencent COS, and Upyun. The application is written in Go and leverages the lightweight Gin web framework for routing, combined with the ent ORM to model domain entities and generate type‑safe database access layers. This combination yields a high‑performance, low‑overhead service that can comfortably run on modest hardware while scaling horizontally when combined with a shared database and stateless workers.
Technical Stack & Architecture
- Language: Go (1.22+), chosen for its compiled binaries, excellent concurrency primitives, and rich standard library.
- Web Framework: Gin – provides middleware support, JSON binding, and a minimal routing layer.
- Data Layer: ent ORM over PostgreSQL/MySQL/SQLite, enabling schema migrations and compile‑time safety.
- Storage Abstraction: A plugin interface (
storage.Storage) that implementsUpload,Download,Delete, andListmethods. Each provider (S3, OneDrive, etc.) is a separate Go package that satisfies this interface. - Background Jobs: Integration with Aria2/qBittorrent via RPC for large or segmented downloads; jobs are queued in a lightweight in‑memory scheduler that can be swapped with Redis/RabbitMQ for distributed processing.
- WebDAV: Exposed as a reverse proxy that translates WebDAV verbs into the underlying storage API, allowing any WebDAV‑compatible client to interact with Cloudreve transparently.
- Frontend: A single‑page application built with Vue.js, served as static assets from the Go binary. The SPA communicates with the backend over HTTPS and supports PWA features for offline access.
Core Capabilities & APIs
- Resumable Uploads: Implements chunked upload with checkpointing, allowing large files to be resumed after network interruptions.
- Metadata Extraction: Uses the
go-exifandmediainfolibraries to pull EXIF, ID3, and other media tags, exposing them via the API for search and filtering. - Share Links: Generates signed URLs with optional expiration, supporting both public and authenticated access. The link generation logic is configurable to use JWT or HMAC signatures.
- Webhooks & Callbacks: Exposes a webhook endpoint for external services to subscribe to file events (upload, delete). The payload is JSON and can be filtered by event type.
- Plugin System: Developers can extend Cloudreve by implementing the
plugin.Plugininterface, allowing custom authentication back‑ends (OAuth2, LDAP) or new storage providers without modifying core code.
Deployment & Infrastructure
Cloudreve ships as a single static binary that can run on any OS with Go runtime support. For production, Docker images are provided (cloudreve/cloudreve) and are already optimized for size (< 200 MB). The container can be deployed behind a reverse proxy (NGINX/Traefik) with TLS termination. The application is stateless, so scaling horizontally involves running multiple container instances behind a load balancer and sharing the same database and object storage. Persistent configuration is injected via environment variables or a config.yaml file, making it suitable for Kubernetes deployments (Deployment, StatefulSet) or serverless platforms that support Docker.
Integration & Extensibility
- SDKs: A Go SDK mirrors the HTTP API, simplifying client integration.
- CLI Tool:
cloudreve-cli(written in Go) can perform batch operations, sync directories, and manage users from the command line. - Custom Themes: The front‑end exposes a theming API; developers can swap CSS variables or provide custom Vue components.
- OAuth & SSO: The authentication layer can be swapped out for any OIDC provider; the plugin system allows adding new auth flows without touching core logic.
Developer Experience
The project follows a clean repository layout with extensive documentation under docs/. The API is fully typed, and the ent-generated code provides compile‑time guarantees. Community support is active on Discord, Telegram, and GitHub Discussions. Contributing guidelines are explicit, with a clear branching model (main for stable releases, dev for ongoing features). Continuous integration via Azure Pipelines ensures that every PR is tested against multiple Go versions and database back‑ends.
Use Cases
- Enterprise File Hub: Companies can deploy Cloudreve as an internal portal, integrating with existing S3 or OSS back‑ends while providing a unified UI for employees.
- Personal Cloud: Hobbyists can run it on a Raspberry Pi, leveraging local storage or a NAS while accessing files from anywhere.
- Service Provider: SaaS vendors can embed Cloudreve into their product stack, exposing a branded file manager to end‑users with per‑tenant storage isolation.
- DevOps Tooling: CI/CD pipelines can use the API to upload artifacts, trigger Aria2 downloads, or generate share links for build logs.
Advantages Over Alternatives
- Zero‑config Binaries: No external services required beyond a database; the Docker image is ready to run.
- Full Multi‑cloud Support: Unlike many self‑hosted solutions that support only local
Open SourceReady to get started?
Join the community and start self-hosting Cloudreve today
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps
ONLYOFFICE Workspace Community
Open‑source collaboration platform for documents, projects and more
OpenRouteService
Open-source routing and spatial analysis API
Foodsoft
Open‑source software for food cooperative management
WildDuck Mail Server
Scalable, Unicode‑first IMAP/POP3 mail server
Traggo
Tag‑based time tracking for flexible work logging
Kamailio
High‑performance SIP server for VoIP and real‑time communication
