nextcloud
Nextcloud file cloud — Postgres file index, Redis cache, S3-compatible primary storage, cron background jobs
@r8s/nextcloud
Components (1)
Nextcloud
Nextcloud — self-hosted file cloud with Postgres, Redis, S3 primary storage and background cron jobs.
import { Platform } from '@r8s/recipes'
import { Nextcloud } from '@r8s/nextcloud'
export default (
<Platform secrets={{ backend: 'openbao', mount: 'kv', path: 'apps' }}>
<Nextcloud
name="cloud"
host="cloud.example.com"
objectStorage={{
endpoint: 's3.internal.example.com',
bucket: 'cloud-files',
credentialsSecret: 'cloud-files-credentials',
}}
/>
</Platform>
)
namestringOptional—Resource name (defaults to 'nextcloud')
namespacestringOptional—Kubernetes namespace (defaults to 'default')
versionstringOptional—Container image tag (defaults to '31-apache' — pin a version in production)
hoststringRequired—Public hostname for the web UI and WebDAV (required)
replicasnumberOptional—Number of replicas. Safe to scale beyond 1 when objectStorage is configured (file blobs live in S3) and cache is enabled — Nextcloud becomes effectively stateless. Requires a StorageClass with ReadWriteMany support for the /var/www/html claim.
cachebooleanOptional—Provision a Redis replication set for file locking and caching (default: true)
storagestringOptional—Size of the PersistentVolumeClaim backing /var/www/html (defaults to '10Gi'). Apps, config and the data directory all live in this tree.
storageClassNamestringOptional—StorageClass for the /var/www/html PersistentVolumeClaim. Must provide ReadWriteMany when replicas > 1 (e.g. NFS or EFS). Defaults to the cluster default StorageClass when omitted.
objectStorage{ endpoint: string, bucket: string, credentialsSecret: string, region?: string, port?: number, ssl?: boolean }Optional—S3-compatible object storage used as primary storage for files (RustFS in the platform). Reference a bucket whose credentials live in a Secret provisioned by the secrets backend (keys: accessKey, secretKey) — never plaintext.
secretsNamestringOptional—Name of an existing Secret holding the Nextcloud app secrets (key: adminPassword). Required unless a secrets backend (openbao/vault) is configured on the surrounding Platform — the backend then provisions them automatically. Plaintext admin passwords are not supported.
resources{ requests?: { cpu?: string, memory?: string }, limits?: { cpu?: string, memory?: string } }Optional—Requested resources
tls{ secretName: string, clusterIssuer: string }Optional—TLS configuration (defaults to letsencrypt-prod cluster issuer)