Skip to content

docs: add clustered deployment guide for shared storage#1540

Merged
mmattel merged 2 commits into
masterfrom
feat-clustered-shared-storage-deployment
Jun 15, 2026
Merged

docs: add clustered deployment guide for shared storage#1540
mmattel merged 2 commits into
masterfrom
feat-clustered-shared-storage-deployment

Conversation

@DeepDiver1975

Copy link
Copy Markdown
Member

Summary

Adds an admin-manual page describing how to run the ownCloud Docker image across multiple application nodes that share common file storage (e.g. NFS) — on Kubernetes, Docker Swarm, or plain Docker hosts behind a load balancer.

The existing nfs.adoc page only covers the NFS mount/client layer (protocol version, mount options, rsize/wsize, MTU). The parent deployment_recommendations.adoc describes the scale-out scenarios but not the container-image operational specifics that cause problems in a clustered setup. This new sibling page fills that gap.

New page: installation/deployment_recommendations/clustered_shared_storage.adoc, wired into the nav as a sibling of the NFS page.

What it covers

All grounded in the owncloud/base image's startup scripts and config.php:

  • Locking / cache / sessions must be backed by a shared Redis — never POSIX/NFS locks or files on the share. OWNCLOUD_REDIS_ENABLED=true auto-wires memcache.locking + memcache.distributed.
  • Session footgun: OWNCLOUD_SESSION_SAVE_HANDLER=redis requires a tcp:// OWNCLOUD_SESSION_SAVE_PATH set alongside it — it is not auto-derived from the Redis host.
  • Startup chown storm: the image recursively chowns the whole data tree on every boot; use OWNCLOUD_SKIP_CHOWN / OWNCLOUD_SKIP_CHMOD and fix ownership once out of band.
  • UID/GID alignment + root_squash considerations for NFS.
  • Attribute-cache coherence trade-offs (actimeo/noac), cross-linked to the NFS page.
  • Cron on exactly one node — the image starts a cron daemon per container when enabled.
  • Upgrades/migrations are uncoordinated across nodes — must be gated to a single node with cluster-wide maintenance mode.
  • Config from env vars, plus S3 primary object storage as the scale-out alternative.
  • A two-role reference (app replicas vs. single cron/migration node) and a checklist.

Notes for reviewers

  • Draft: please sanity-check the Redis session DSN syntax (tcp://redis:6379?auth=...) against the supported phpredis form.
  • All nine xref: targets were verified to resolve to existing pages.

🤖 Generated with Claude Code

@DeepDiver1975 DeepDiver1975 force-pushed the feat-clustered-shared-storage-deployment branch from 73d1acb to d0a4bce Compare June 15, 2026 14:24
@DeepDiver1975

Copy link
Copy Markdown
Member Author

Review Analysis

Reviewed adversarially and re-verified the load-bearing claims against the owncloud/base image source (startup scripts + config.php).

Correctness — verified against the image

  • OWNCLOUD_REDIS_ENABLED=truememcache.locking + memcache.distributed = \OC\Memcache\Redis (config.php)
  • ✅ Startup chown walks the tree every boot, gated by OWNCLOUD_SKIP_CHOWN/SKIP_CHMOD (25-chown.sh)
  • memcache.local defaults to APCu (45-caching.sh)
  • ✅ Session defaults files / ${OWNCLOUD_VOLUME_SESSIONS} + redis-session locking params and defaults (80-session.sh)
  • ✅ Cron daemon starts per-container under OWNCLOUD_CROND_ENABLED=true (55-cron.sh)
  • ✅ Install-or-migrate runs occ upgrade on every boot with no coordination (30-install.sh / usr/bin/owncloud)
  • www-data = UID 33; system:cron matches existing docs usage
  • ✅ All internal <<...>> anchors resolve (sessions/config-from-env/object-storage-alternative explicit; file-locking/caching via the repo's global idprefix:''/idseparator:'-' auto-IDs)

Fixed in this PR

  • Removed three unused URL attributes (efs-url, filestore-url, azure-files-url)
  • Fixed a double space in the apps table cell

Still open before un-drafting

  • ⚠️ Confirm the Redis session DSN syntax OWNCLOUD_SESSION_SAVE_PATH=tcp://redis:6379?auth=... against the supported phpredis session.save_path form. This is the one technical claim not verifiable from the image alone.
  • The checklist uses * [ ] syntax, which has no precedent elsewhere in this repo. Worth a quick npm run antora-dev-local to confirm it renders as checkboxes rather than literal [ ] (plain bullets are the safe fallback).
  • Run npm run linkcheck after a build — xref targets were manually verified, but the external URLs were not.

Conventions / Security

  • Matches repo AsciiDoc style (:toc: right, admonitions, xref:, attribute-based URLs); nav entry placed correctly.
  • no_root_squash correctly framed as a scoped security trade-off; no secrets committed (placeholders only).

@DeepDiver1975 DeepDiver1975 marked this pull request as ready for review June 15, 2026 14:54
DeepDiver1975 and others added 2 commits June 15, 2026 19:41
Add an admin-manual page describing how to run the ownCloud Docker image
across multiple application nodes that share a common file storage (for
example NFS) on Kubernetes, Swarm, or plain Docker hosts.

The existing NFS page only covers the mount/client layer. This new page
covers the container-image specifics that bite in a scale-out setup:

- file locking, distributed cache, and sessions must be backed by a shared
  Redis, never by POSIX/NFS locks or files on the share
- the session backend needs both OWNCLOUD_SESSION_SAVE_HANDLER and a tcp://
  OWNCLOUD_SESSION_SAVE_PATH set together
- the recursive startup chown walks the whole tree on every boot; use
  OWNCLOUD_SKIP_CHOWN/SKIP_CHMOD and fix ownership once out of band
- consistent numeric UID/GID and no_root_squash considerations
- NFS attribute-cache coherence trade-offs
- cron must run on exactly one node
- upgrades/migrations are uncoordinated across nodes and must be gated to a
  single node with cluster-wide maintenance mode
- config from env vars, and S3 primary object storage as an alternative

Wire the page into the navigation as a sibling of the NFS page.

Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@mmattel mmattel force-pushed the feat-clustered-shared-storage-deployment branch from df79c9f to af5663d Compare June 15, 2026 17:41
@mmattel mmattel merged commit 52249af into master Jun 15, 2026
2 checks passed
@mmattel mmattel deleted the feat-clustered-shared-storage-deployment branch June 15, 2026 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants