nextcloud
by HelmForge
Nextcloud file collaboration with PostgreSQL, Redis and coordinated backups
About this chart
Nextcloud
Nextcloud provides self-hosted file synchronization, sharing and collaboration. This chart uses the official Apache image with PostgreSQL, Redis, managed background jobs and coordinated S3 backups.
Requirements
- Kubernetes 1.29 or newer and Helm 3 or newer.
- Persistent storage supporting UID/GID 33 and fsGroup ownership.
- Public DNS and a TLS-enabled ingress or Gateway controller for external access.
- Existing private S3-compatible buckets when primary object storage or integrated backups are enabled, with Secret or supported workload identity credentials.
- External Secrets Operator only when that integration is enabled.
The application defaults to nextcloud:35.0.2-apache, with verified amd64 and
arm64 support. The chart is Apache-2.0 licensed; Nextcloud Server is AGPL-3.0.
One replica and Recreate updates provide an explicit single-writer operating
model. Backups and upgrades have scheduled downtime.
Installation
helm repo add helmforge https://repo.helmforge.dev
helm repo update
helm install nextcloud helmforge/nextcloud \
--namespace nextcloud --create-namespace
Alternatively, use OCI:
helm install nextcloud oci://ghcr.io/helmforgedev/helm/nextcloud \
--namespace nextcloud --create-namespace
Wait for initial installation to complete, then forward the local service:
kubectl -n nextcloud port-forward service/nextcloud 8080:80
Open http://localhost:8080. The default administrator login is admin. Retrieve
the admin-password key from Secret nextcloud-auth using your approved Secret
workflow. Prefer nextcloud.existingSecret for managed production credentials.
The bootstrap password does not reset existing account passwords.
Features
- Official application image and official HelmForge PostgreSQL/Redis dependencies.
- Automated native installation and guarded sequential application upgrades.
- Persistent native configuration, instance identity, custom apps, themes and data.
- Non-root Apache, read-only root filesystem, dropped capabilities and seccomp.
- Kubernetes CronJob with native Job logs, status history and overlap prevention.
- Existing Secret and External Secrets Operator contracts.
- S3-compatible primary object storage with static Secret or workload identity credentials.
- Upgrade guards that block accidental primary bucket, endpoint or prefix changes.
- Explicit trusted hosts/proxies, SMTP, Ingress, Gateway API and dualstack Service.
- Coordinated SQL/files backup, checksummed S3 publication and fresh-storage restore.
- Real HTTP/WebDAV acceptance tests and a full backup/recovery scenario.
Production configuration
Start with examples/production.yaml. Supply the actual public hostname, proxy CIDRs, TLS Secret, storage sizes and credential Secrets. Configure ingress upload limits and timeouts alongside the PHP limits. Verify email delivery before relying on password recovery or sharing notifications.
Helm uninstall deletes the chart-created application PVC. Use
persistence.existingClaim when the volume lifecycle is managed independently,
set persistence.existingClaimAccessModes to the claim's actual access modes
when cron or backup is enabled, and retain tested backups before removing a
release or namespace.
PostgreSQL and Redis are enabled by default. To use managed private endpoints,
disable the corresponding subchart and provide externalDatabase or
externalRedis settings. These external services must already exist. The chart
supports PostgreSQL and standalone Redis; it does not perform database-engine
conversion or configure Redis Sentinel/Cluster discovery.
Background jobs
The chart runs Nextcloud background processing as a Kubernetes CronJob every
five minutes, matching the upstream recommendation. Each one-shot Job uses the
official application image, runs cron.php through PHP CLI as UID/GID 33 and
records completion or failure in the Kubernetes Job history. concurrencyPolicy: Forbid prevents overlapping scheduled executions; backoffLimit: 0 preserves
the first failure for diagnosis rather than silently retrying it. A PVC-backed
exclusive lock also serializes manually instantiated Jobs with scheduled runs.
The CronJob mounts the application PVC and is pinned to the application Pod's
node by default so ReadWriteOnce volumes work. ReadWriteOncePod cannot be used
while cron or backup is enabled. Existing claims must declare their actual modes
through persistence.existingClaimAccessModes; rendering fails when the value is
missing for these multi-Pod paths. Inspect executions with kubectl get jobs -l app.kubernetes.io/component=cron and kubectl logs job/<job-name> -c cron.
Set cron.suspend: true to retain manual Job support without scheduling runs.
Optional integrations
Enable imaginary.enabled for private image-preview offloading and
notifyPush.enabled for the official Client Push daemon. Both are opt-in, run
in the application Pod and use official pinned images. Client Push uses the
existing HTTPS endpoint at /push and requires a compatible operator-installed
Nextcloud app plus the upstream setup test.
See setup, verification and lifecycle instructions before enabling them.
Architecture
The chart deliberately runs a single Nextcloud Apache replica with Recreate
updates. The application Pod, background CronJob, bundled or external
PostgreSQL, and standalone Redis share one consistency boundary. The complete
application PVC and PostgreSQL database must be backed up and restored
together; Redis is runtime state, not a backup substitute.
Optional Imaginary and Client Push containers share the application Pod lifecycle. Backup and restore Jobs coordinate the application, background cron, PVC, PostgreSQL, and S3-compatible backup storage. See DESIGN.md for the topology, security boundary, production responsibilities, and explicit non-goals.
When primaryObjectStore.enabled=true, user file contents reside in an
exclusive S3-compatible bucket while the PVC retains application code,
configuration, custom applications and themes. PostgreSQL retains filenames and
the mapping to opaque object keys. See primary object storage
before installation or migration.
Backup and restore
Integrated backups stop the application and cron, capture PostgreSQL and the complete PVC, resume service, and publish checksummed objects with a final completion marker. A failed snapshot retains a volume lock for explicit recovery. Restore requires a completed backup, matching application version, original administrator credentials, fresh PVC and empty database.
Primary object storage and integrated backup storage are separate contracts and must use different buckets. Integrated backups capture PostgreSQL and the PVC; they do not copy the live primary bucket. Protect and recover that bucket with provider-native versioning, snapshots or replication.
See backup and restore before enabling the schedule. Retain external Secrets separately. Practice restoration and verify non-admin login, file contents/identities, shares, settings and new writes.
Troubleshooting
Start with Kubernetes state and the application logs:
kubectl -n nextcloud get pods,jobs,cronjobs,pvc
kubectl -n nextcloud logs deployment/nextcloud -c nextcloud --tail=200
kubectl -n nextcloud describe pod -l app.kubernetes.io/instance=nextcloud
For background processing, inspect the latest cron Job and its cron
container. For backup or restore failures, do not remove a retained coordination
lock or scale the application manually until the failure boundary is understood;
follow the recovery procedure in backup and restore.
When optional Client Push setup cannot reach the App Store, distinguish network
policy or upstream availability from application compatibility before retrying;
see integrations.
Examples and operational guides
- Local installation
- Production routing and backups
- Gateway API
- External database and Redis
- Primary S3-compatible object storage
- Configuration and exposure
- Primary object storage and migration
- Backup, failure recovery and restore
- Upgrades and migration from another chart
- Architecture and tradeoffs
Nextcloud 35 is a major application upgrade. Release 35.0.1 fixes sharing, ownership transfer, encryption key-cache, sensitive logging, CalDAV and file metadata behavior. Back up the database, data PVC and configuration, confirm app compatibility, and upgrade only one major version at a time.
Non-goals
This chart does not provision office suites, Talk media relays, full-text search or horizontal Nextcloud scaling. It does not migrate local user files into S3, provision buckets or manage object-store lifecycle policies. Custom Nextcloud apps are operator-managed and must support the selected upstream release. Helm rollback cannot reverse database migrations.
Security Scan: nextcloud
| Framework | Score |
|---|---|
| MITRE + NSA + SOC2 | 92.42424% |
Security posture acceptable.
Measured locally on 2026-11-07 with Kubescape 4.0.9 against the default rendered application and bundled dependencies. The application uses a read-only root filesystem; the PostgreSQL/Redis subcharts retain their upstream filesystem defaults. This configuration assessment does not replace image CVE scanning.
Contributing
See CONTRIBUTING.md.
Parameters
| Parameter | Description | Default |
|---|---|---|
nameOverride | Override the chart name. | "" |
fullnameOverride | Override the release resource name. | "" |
commonLabels | Extra labels on resources. | {} |
commonAnnotations | Annotations added to every chart-owned Kubernetes resource. | {} |
image.repository | Official image repository. | "docker.io/library/nextcloud" |
image.tag | Pinned application release. | "35.0.2-apache" |
image.pullPolicy | Image pull policy. | "IfNotPresent" |
imagePullSecrets | Registry authentication Secret references. | [] |
nextcloud.adminUser | Initial administrator login; changing this does not rename existing users. | "admin" |
nextcloud.adminPassword | Initial administrator password; generated and retained when empty. | "" |
nextcloud.existingSecret | Existing Secret containing the initial administrator password. | "" |
nextcloud.existingSecretPasswordKey | Password key in the administrator Secret. | "admin-password" |
nextcloud.trustedDomains | Allowed HTTP Host names, reconciled on upgrades. | ["localhost"] |
nextcloud.trustedProxies | Explicit reverse proxy IP addresses or CIDRs. | [] |
nextcloud.overwriteCliUrl | Public URL for links generated by background jobs. | "http://localhost:8080" |
nextcloud.overwriteProtocol | Proxy protocol override; empty, http or https. | "" |
nextcloud.overwriteHost | Public host override behind a trusted proxy. | "" |
nextcloud.defaultPhoneRegion | Default phone region for profile validation. | "US" |
nextcloud.maintenanceWindowStart | Start hour in UTC for expensive maintenance background tasks. | 1 |
php.memoryLimit | Maximum memory per PHP request. | "512M" |
php.uploadLimit | Maximum upload and POST body size. | "512M" |
imaginary.enabled | Enable private preview offloading. | false |
imaginary.image.repository | Official Nextcloud Imaginary image. | "ghcr.io/nextcloud-releases/aio-imaginary" |
imaginary.image.digest | Immutable multi-platform image digest. | "sha256:ea96034f97e9921015001c43947ab88ee5516e7e793c4c753a3618feca9e8548" |
imaginary.image.pullPolicy | Image pull policy. | "IfNotPresent" |
imaginary.maxAllowedResolution | Maximum source resolution in megapixels. | 50 |
imaginary.previewProviders | Preview providers when enabled. | ["OC\\Preview\\TXT","OC\\Preview\\MarkDown","OC\\Preview\\OpenDocument","OC\\Preview\\Krita","OC\\Preview\\Imaginary"] |
imaginary.resources.requests.cpu | CPU request. | "25m" |
imaginary.resources.requests.memory | Memory request. | "128Mi" |
imaginary.resources.limits.cpu | CPU limit. | "1" |
imaginary.resources.limits.memory | Memory limit. | "512Mi" |
notifyPush.enabled | Enable the daemon; install and configure the Client Push app separately. | false |
notifyPush.image.repository | Official Client Push daemon image. | "ghcr.io/nextcloud/notify_push" |
notifyPush.image.tag | Pinned daemon version. | "v1.4.1" |
notifyPush.image.pullPolicy | Image pull policy. | "IfNotPresent" |
notifyPush.resources.requests.cpu | CPU request. | "10m" |
notifyPush.resources.requests.memory | Memory request. | "32Mi" |
notifyPush.resources.limits.cpu | CPU limit. | "500m" |
notifyPush.resources.limits.memory | Memory limit. | "128Mi" |
cron.enabled | Enable Nextcloud cron processing. | true |
cron.schedule | Cron schedule; upstream recommends every five minutes. | "*/5 * * * *" |
cron.suspend | Suspend scheduling while retaining the CronJob for manual runs. | false |
cron.startingDeadlineSeconds | Maximum delay for starting a missed execution. | 300 |
cron.activeDeadlineSeconds | Maximum execution duration. | 900 |
cron.successfulJobsHistoryLimit | Successful Jobs retained for inspection. | 1 |
cron.failedJobsHistoryLimit | Failed Jobs retained for diagnostics. | 3 |
cron.backoffLimit | Pod retries before an execution is marked fail |
Deploy nextcloud with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has nextcloud 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 chartnextcloud is pinned at v2.2.2 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