nextcloud

by HelmForge

Helm chartv2.2.2App 35.0.3Apache-2.0Verified publisher

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

FrameworkScore
MITRE + NSA + SOC292.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

ParameterDescriptionDefault
nameOverrideOverride the chart name.""
fullnameOverrideOverride the release resource name.""
commonLabelsExtra labels on resources.{}
commonAnnotationsAnnotations added to every chart-owned Kubernetes resource.{}
image.repositoryOfficial image repository."docker.io/library/nextcloud"
image.tagPinned application release."35.0.2-apache"
image.pullPolicyImage pull policy."IfNotPresent"
imagePullSecretsRegistry authentication Secret references.[]
nextcloud.adminUserInitial administrator login; changing this does not rename existing users."admin"
nextcloud.adminPasswordInitial administrator password; generated and retained when empty.""
nextcloud.existingSecretExisting Secret containing the initial administrator password.""
nextcloud.existingSecretPasswordKeyPassword key in the administrator Secret."admin-password"
nextcloud.trustedDomainsAllowed HTTP Host names, reconciled on upgrades.["localhost"]
nextcloud.trustedProxiesExplicit reverse proxy IP addresses or CIDRs.[]
nextcloud.overwriteCliUrlPublic URL for links generated by background jobs."http://localhost:8080"
nextcloud.overwriteProtocolProxy protocol override; empty, http or https.""
nextcloud.overwriteHostPublic host override behind a trusted proxy.""
nextcloud.defaultPhoneRegionDefault phone region for profile validation."US"
nextcloud.maintenanceWindowStartStart hour in UTC for expensive maintenance background tasks.1
php.memoryLimitMaximum memory per PHP request."512M"
php.uploadLimitMaximum upload and POST body size."512M"
imaginary.enabledEnable private preview offloading.false
imaginary.image.repositoryOfficial Nextcloud Imaginary image."ghcr.io/nextcloud-releases/aio-imaginary"
imaginary.image.digestImmutable multi-platform image digest."sha256:ea96034f97e9921015001c43947ab88ee5516e7e793c4c753a3618feca9e8548"
imaginary.image.pullPolicyImage pull policy."IfNotPresent"
imaginary.maxAllowedResolutionMaximum source resolution in megapixels.50
imaginary.previewProvidersPreview providers when enabled.["OC\\Preview\\TXT","OC\\Preview\\MarkDown","OC\\Preview\\OpenDocument","OC\\Preview\\Krita","OC\\Preview\\Imaginary"]
imaginary.resources.requests.cpuCPU request."25m"
imaginary.resources.requests.memoryMemory request."128Mi"
imaginary.resources.limits.cpuCPU limit."1"
imaginary.resources.limits.memoryMemory limit."512Mi"
notifyPush.enabledEnable the daemon; install and configure the Client Push app separately.false
notifyPush.image.repositoryOfficial Client Push daemon image."ghcr.io/nextcloud/notify_push"
notifyPush.image.tagPinned daemon version."v1.4.1"
notifyPush.image.pullPolicyImage pull policy."IfNotPresent"
notifyPush.resources.requests.cpuCPU request."10m"
notifyPush.resources.requests.memoryMemory request."32Mi"
notifyPush.resources.limits.cpuCPU limit."500m"
notifyPush.resources.limits.memoryMemory limit."128Mi"
cron.enabledEnable Nextcloud cron processing.true
cron.scheduleCron schedule; upstream recommends every five minutes."*/5 * * * *"
cron.suspendSuspend scheduling while retaining the CronJob for manual runs.false
cron.startingDeadlineSecondsMaximum delay for starting a missed execution.300
cron.activeDeadlineSecondsMaximum execution duration.900
cron.successfulJobsHistoryLimitSuccessful Jobs retained for inspection.1
cron.failedJobsHistoryLimitFailed Jobs retained for diagnostics.3
cron.backoffLimitPod 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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartnextcloud is pinned at v2.2.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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