Self-Hosting File Sync on Nextcloud with Object Storage as Primary

self-hostingstorageobject-storage

Files lived wherever was most convenient—managed cloud providers chosen by default rather than on purpose—which meant handing data and its retention to a third party. Self-hosting naively would have capped storage at the server's local disk and coupled the file corpus to the lifetime of a single box.

Deploy Nextcloud via Docker Compose (Postgres, Redis and a cron sidecar) with user files configured in S3-compatible object storage as primary storage, so the host only ever holds the database, config and an upload buffer—never the file corpus itself.

Store files on the server's local disk

Pros
  • Simpler, one fewer dependency, lower latency
Cons
  • Storage capped by the box; the server becomes stateful and precious
  • Backups collapse into whole-disk images; scaling means re-provisioning

Keep using a managed cloud sync provider

Pros
  • Zero maintenance and polished clients on every device
Cons
  • Data, retention and training policy handed to a third party
  • No control over where files physically live, and subscription lock-in

Object storage as primary decouples the corpus from the box: the server becomes rebuildable, storage scales on its own terms, and backups split into a small structured database and a large boring bucket. Owning the sync layer rather than just raw storage preserves the sharing, versioning and clients that otherwise push people back to the convenient SaaS option.