cloudreve
by unxwares-sac
Self-hosted file management and sharing system (Cloudreve v4), supports multiple storage providers.
About this chart
Cloudreve Helm Chart
Cloudreve is a self-hosted file management and sharing system: personal and shared files, public links, WebDAV, previews and thumbnails, with storage on the local disk or on remote providers (S3, OneDrive, OSS, COS...). This chart, maintained by UnxWares, runs Cloudreve v4 as a single pod with its data on a persistent volume, and a database of your choice.
Features
- Cloudreve v4 on SQLite (default, in the data volume), PostgreSQL, MySQL or MariaDB.
- Optional Redis for sessions and caches, so they survive restarts.
- Secrets stay in Secrets: the session secret is generated once and kept across upgrades (or read from your own
Secret); database and Redis passwords come from Secrets;
conf.iniis rendered at startup into a memory-backed volume, never stored in a ConfigMap or on the node disk. - Hardened pod: non-root (uid 1000), read-only root filesystem, every capability dropped, seccomp
RuntimeDefault, no service account token. - UnxWares image by default: Cloudreve built from its release sources with current Go modules on a current Alpine (see Images); the official image stays one value away.
- Persistent
/cloudreve/data, Ingress or Gateway API HTTPRoute, startup, liveness and readiness probes,helm test, and an end-to-end test in CI.
Architecture
| Resource | Name | Purpose |
|---|---|---|
Deployment (1 replica, Recreate) | <release>-cloudreve | Cloudreve on port 5212. Cloudreve keeps WebDAV locks, its task queue and cron jobs in memory, so it runs a single replica. |
Init container render-config | in the Deployment | Fills conf.ini from the template and the secret-backed environment, into a memory-backed volume. Skipped with confini.existingSecret. |
| Service | <release>-cloudreve | Port service.port (80) to the container port 5212. |
| PersistentVolumeClaim | <release>-cloudreve | /cloudreve/data: SQLite database, files of the local storage policy, avatars, caches. Kept on uninstall. |
| Secret | <release>-cloudreve | Session secret, database password or URL, Redis password (each only when not read from your own Secret). |
| ConfigMap | <release>-cloudreve | conf.ini template with @@...@@ placeholders, and the awk script that fills them. No secret in it. |
| ServiceAccount | <release>-cloudreve | Dedicated account, token not mounted (serviceAccount.automount: false). |
| Ingress or HTTPRoute | <release>-cloudreve | Optional: ingress.enabled or httpRoute.enabled. |
Volumes of the pod: /etc/cloudreve (rendered conf.ini, memory-backed, 1 Mi), /cloudreve/data (the PVC, or an
emptyDir without persistence) and /tmp (emptyDir, 2 Gi, upload chunks and thumbnail work).
Images
imageProvider | Image | Notes |
|---|---|---|
unxwares (default) | ghcr.io/unxwares/cloudreve:<appVersion> | Built from the Cloudreve release sources (web UI included) with the Go module updates proposed upstream in cloudreve/cloudreve#3618, on a current Alpine. Same thumbnail and media tools as upstream (libvips, FFmpeg, LibreOffice, libheif, libraw), no aria2 or supervisord. Rebuilt twice a week, signed with cosign. |
upstream | docker.io/cloudreve/cloudreve:<appVersion> | The official image. The chart starts the binary directly, so its root entrypoint (aria2 under supervisord) never runs. |
Sources, build details and the cosign verification command are in images/. The known vulnerabilities of both images are tracked daily in the CVE watch issue.
Set image.repository and image.tag to use your own build, and image.digest to pin an image by digest:
image:
digest: sha256:0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
Requirements
- Kubernetes
>=1.27.0-0. - A storage class for the data volume (or
persistence.existingClaim). With the SQLite database and the local storage policy, everything lives on this volume: size it for your files. - For PostgreSQL, MySQL or MariaDB: an existing server and an empty database with its user.
- To expose it: an Ingress controller, or a Gateway API implementation for the HTTPRoute.
- Nodes on amd64 or arm64.
Installation
helm repo add unxwares https://helm.unxwares.studio
helm repo update
helm install my-storage unxwares/cloudreve --namespace storage --create-namespace
Packages are signed with the UnxWares Helm Charts key (7902 E52E A435 EF27 C643 2E53 78D6 B532 C599 DA9B). To check
the signature at install time:
curl -fsSL https://helm.unxwares.studio/pgp-public-key.asc | gpg --import
gpg --export 7902E52EA435EF27C6432E5378D6B532C599DA9B > ~/.gnupg/unxwares-helm.gpg
helm install my-storage unxwares/cloudreve --namespace storage --create-namespace \
--verify --keyring ~/.gnupg/unxwares-helm.gpg
Then open it and register the first account right away: it becomes the administrator.
kubectl --namespace storage port-forward svc/my-storage-cloudreve 8080:80
# http://127.0.0.1:8080
Configuration
Persistence
/cloudreve/data is a PVC of persistence.size (10 Gi) by default. Without persistence (persistence.enabled: false) the SQLite database and every uploaded file are lost when the pod restarts. To reuse a volume you manage:
persistence:
existingClaim: cloudreve-data
persistence.storageClassName, accessModes, annotations, extraPvcLabels and subPath (rendered with tpl)
configure the claim.
Database
SQLite is the default and needs nothing else. For a server, set database.type to postgres, mysql or mariadb,
the connection settings, and the password, ideally from your own Secret:
database:
type: postgres
host: cloudreve-db-rw.databases.svc
port: 5432
name: cloudreve
user: cloudreve
existingSecret: cloudreve-db # key "password", see database.existingSecretKeys.password
MySQL and MariaDB also take database.charset (utf8mb4). Cloudreve ignores TLS settings in the separate fields: for
PostgreSQL over TLS, give a full connection URL, either in database.url (stored in the chart Secret) or in your
Secret (database.existingSecretKeys.url):
database:
type: postgres
existingSecret: cloudreve-db
existingSecretKeys:
password: password
url: url # postgres://cloudreve:...@db:5432/cloudreve?sslmode=verify-full
The chart refuses to render a server database without a host (or URL) and a password (or Secret).
Redis
redis:
enabled: true
server: valkey.cache.svc:6379
existingSecret: cloudreve-redis # key "password", see redis.existingSecretKey
db: 0
useTLS: false
redis.user sets an ACL user. With useTLS, the chart verifies the server certificate (redis.tlsSkipVerify: false), unlike Cloudreve's own default.
Session secret
The session secret signs sessions. Left empty, the chart generates 64 random characters at install and reads them back from the release Secret at every upgrade. Tools that render charts offline, such as Argo CD, cannot read it back and would change it at every sync: give it yourself in that case.
cloudreve:
existingSecret: cloudreve-session # key "session-secret", see cloudreve.existingSecretKey
Exposure
Ingress (raise the body size limit of your controller for uploads):
ingress:
enabled: true
className: nginx
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: "0"
cert-manager.io/cluster-issuer: letsencrypt
hosts:
- host: cloud.example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: cloud-example-com-tls
hosts:
- cloud.example.com
Gateway API:
httpRoute:
enabled: true
parentRefs:
- name: public-gateway
namespace: gateways
sectionName: https
hostnames:
- cloud.example.com
Behind a reverse proxy, Cloudreve takes the client address from cloudreve.proxyHeader (X-Forwarded-For). Set
the site URL once, at first install, so that the links Cloudreve generates use it:
extraEnv:
- name: CR_SETTING_DEFAULT_siteURL
value: https://cloud.example.com
Cloudreve settings
cloudreve.logLevel sets the log level. cloudreve.config adds sections and keys to conf.ini
(see the Cloudreve documentation):
cloudreve:
config:
CORS:
AllowOrigins: "https://app.example.com"
AllowCredentials: true
To provide the whole conf.ini yourself, put it under the key conf.ini of a Secret and set
confini.existingSecret: the chart then renders no conf.ini, and the cloudreve, database and redis values are
ignored.
CR_SETTING_DEFAULT_* variables in extraEnv seed settings at first install. Do not put secrets in CR_CONF_*
variables: Cloudreve logs their values.
Resources and scheduling
The defaults request 100m CPU and 128 Mi and limit memory to 1 Gi. Thumbnails of large images, videos and office
documents (libvips, FFmpeg, LibreOffice) can need more: raise resources.limits.memory if the pod is OOM-killed while
generating them. nodeSelector, tolerations, affinity and priorityClassName place the pod.
Time zone
timezone (UTC) sets TZ in the container.
Examples
PostgreSQL and Redis behind an Ingress
database:
type: postgres
host: cloudreve-db-rw.databases.svc
port: 5432
name: cloudreve
user: cloudreve
existingSecret: cloudreve-db
redis:
enabled: true
server: valkey.cache.svc:6379
existingSecret: cloudreve-redis
cloudreve:
existingSecret: cloudreve-session
ingress:
enabled: true
className: nginx
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: "0"
cert-manager.io/cluster-issuer: letsencrypt
hosts:
- host: cloud.example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: cloud-example-com-tls
hosts:
- cloud.example.com
extraEnv:
- name: CR_SETTING_DEFAULT_siteURL
value: https://cloud.example.com
SQLite on an existing volume, official image
imageProvider: upstream
persistence:
existingClaim: cloudreve-data
Security
- The pod runs as uid and gid 1000 (
fsGroup1000 on the volume), with a read-only root filesystem, no capability, no privilege escalation and theRuntimeDefaultseccomp profile. The service account token is not mounted. - Secrets reach the container through
secretKeyRefonly.conf.ini, which contains them, only exists in a memory-backed volume of the pod. - The chart starts
/cloudreve/cloudrevedirectly: the root entrypoint of the official image (aria2 and supervisord) never runs. Remote downloads through aria2 are therefore not available. - Cloudreve listens in plain HTTP: terminate TLS on your Ingress or Gateway.
- Registration settings, storage policies and user groups are managed in the Cloudreve admin panel: review them after creating the administrator account.
- The chart creates no NetworkPolicy: restrict traffic to the pod with your own if your cluster enforces them.
Testing
On every pull request, the repository CI:
- runs
helm lint --strictwith Helm 3 and Helm 4 on the default values and onci/default-values.yaml(SQLite) andci/upstream-values.yaml(official image), and validates the rendered manifests with kubeconform; - installs both values files in a kind cluster with chart-testing, which runs the chart's
helm test: a pod with the Cloudreve image and the same security context calls/api/v4/site/pingthrough the Service; - runs an end-to-end test (
.github/workflows/e2e.yaml) with the image built from the same commit: the first account signs up and is administrator, logs in, uploads a file, finds it in the listing with its size, downloads the same content back, and gets a thumbnail generated for an uploaded image; - lints the Artifact Hub metadata and checks that this README and
values.schema.jsonare generated from the values.
After an install or upgrade:
helm test my-storage --namespace storage
Unit tests (tests/*_test.yaml, helm-unittest, run by
.github/workflows/unit.yaml on pull requests, every push to main and every Tuesday) render the chart without a
cluster and check the security contexts of every container with both image providers, the image selection
(imageProvider, repository, tag, digest), the session secret generated once and reused at upgrade, secrets passed
through secretKeyRef only, the conf.ini template for each database, the messages of the required values, the
probes, persistence, Service, Ingress and HTTPRoute, and the two examples of this README.
Operations
- Backup: with SQLite and the local storage policy, everything is in the PVC: back up the volume (or
/cloudreve/datafrom a pod) while the pod is stopped or idle. With a server database, back up the database and the volume together. - Scaling: one replica only (in-memory locks, queue and cron jobs). Give it more resources rather than replicas.
- Logs:
kubectl --namespace storage logs deploy/my-storage-cloudreve;cloudreve.logLevel: debugfor more. - Rendered configuration: `kubectl --namespace storage exec deploy/my-storage-cloudreve -- cat /etc
Deploy cloudreve with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has cloudreve on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartcloudreve is pinned at v2026.11.4 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply