Cloud Storage Concepts - Understanding Cloud Storage Before Building It

Status: Active
Last Updated: 2026-08-14
Category: Cloud - Phase 1: File Storage & Sync
Prerequisites: None
Time: 1-2 hours
Tags: cloud, storage, concepts, sync-vs-backup, privacy, self-hosted, data-sovereignty

Summary

Before installing Nextcloud or MinIO, understand what "cloud storage" actually means: the difference between file storage and object storage, why sync is not backup, what you give up when you use commercial clouds, and why self-hosting gives you sovereignty over your own data. This conceptual foundation makes every hands-on lesson in this course make sense.

๐ŸŽฏ What You'll Learn

By the end of this article, you'll be able to:


What is "The Cloud", Really?

Strip away the marketing and the cloud is simple:

"The cloud" = someone else's computer, rented by the hour.

Every commercial cloud product โ€” Dropbox, Google Drive, iCloud, OneDrive โ€” is a web application running on servers in a datacenter, with three components:

Component What it does Example
Storage layer Disks holding your bytes (often object storage underneath) Amazon S3 behind Dropbox's early days
Application layer The logic: sharing links, versioning, search Dropbox's sync engine
Access layer Web UI, desktop/mobile clients, APIs The Dropbox folder on your laptop

Here's the key insight of this entire course: you can run all three layers yourself.

Commercial cloud:
  Your files โ†’ their servers โ†’ their rules โ†’ their prices โ†’ forever

Self-hosted cloud:
  Your files โ†’ your server โ†’ your rules โ†’ one-time hardware cost โ†’ your responsibility

That last item โ€” your responsibility โ€” is the honest price of sovereignty. When you host your own cloud, you also inherit the jobs of backup operator, security engineer, and capacity planner. This course teaches those jobs alongside the software.

Why Self-Host?

People self-host for a mix of reasons. Rank these for yourself before choosing architecture:

  1. Data sovereignty โ€” your documents, photos, and credentials live on hardware you physically control. No terms-of-service change can read, scan, or delete them.
  2. Cost predictability โ€” 4TB on Google One is ~$20/month = $240/year forever. A 4TB NAS drive is ~$90 once.
  3. No artificial limits โ€” no upload caps, throttled download speeds, or "file too large" errors.
  4. Privacy โ€” no content scanning, no ad-profile building, no training-data ambiguity.
  5. Learning โ€” running your own stack is the best infrastructure education there is (which is partly why this KB exists).
  6. Independence from vendors โ€” a company killing a product line can't strand your data when the export button is on your own server.

And the honest counterweights:

The rest of this course exists to neutralize those three risks with backups (Phase 4), hardening (kb/security/), and monitoring (kb/observability/).


File Storage vs Object Storage vs Block Storage

Three storage models dominate. Knowing which problem each solves prevents years of architectural mistakes.

File Storage (NAS-style)

Data lives in a hierarchy: directories containing files containing bytes.

/photos/2026/vacation/beach-day.jpg
/documents/contracts/lease.pdf

Block Storage (Disk-style)

Raw fixed-size blocks presented as if they were a physical disk.

Object Storage (S3-style)

A completely flat namespace: buckets contain objects, and objects are addressed by keys.

Bucket: my-app-uploads
Object key: images/2026/08/beach-day.jpg    โ† just a string, not a path!
Object = data + metadata + globally unique ID

Critical differences from file storage:

Property File storage Object storage
Addressing Path in a tree Flat key string
Access protocol POSIX/NFS/SMB HTTP + S3 API
Partial writes Yes (edit bytes in place) No (objects are immutable โ€” replace whole object)
Listing cost Cheap (ls) Expensive at scale (paginated LIST)
Scale limit Millions of files practically Billions of objects by design
Rename Cheap metadata op Copy + delete (expensive)
Perfect for Human-browsable data App data, backups, images, logs, static assets

What Happens conceptually when an app uploads to object storage:

1. Client computes: PUT https://s3.example.com/my-bucket/reports/q3.pdf
2. Request signed with access key (HMAC signature)
3. Server validates signature โ†’ stores object durably (multiple disks/nodes)
4. Returns HTTP 200 ETag="d41d8cd9..."
5. Later reads use GET on the same URL โ€” any client, anywhere

Objects are immutable: to "change" q3.pdf you upload a new version of it. That immutability is exactly why object storage is fantastic for backups (old versions can't be silently corrupted) and why databases don't live on it directly.

The Rule of Thumb

Humans browsing files?        โ†’ File storage   (Nextcloud)
Applications storing data?    โ†’ Object storage (MinIO)
Virtual machines / databases? โ†’ Block storage  (ZFS/LVM/iSCSI)

Most real systems combine all three. In this course's final architecture: Nextcloud stores its data directory on disk, uses MinIO (object storage) as its external storage backend for big blobs, and Restic backs both up into another MinIO bucket.


Sync vs Backup: The Most Expensive Confusion in IT

This section may save your data someday. Read it twice.

Sync Mirrors Mistakes

Sync (Dropbox, Nextcloud desktop client, Syncthing) keeps N devices consistent with each other:

Laptop:  thesis-final.docx  โ”€โ”€syncโ”€โ”€โ–บ  Server copy  โ”€โ”€syncโ”€โ”€โ–บ  Phone

But watch what happens during ransomware, a bad rm -rf, or a corrupted save:

Day 100, 09:00  Laptop has thesis.docx            โœ“ synced everywhere
Day 100, 14:32  Ransomware encrypts thesis.docx   โœ— encrypted version synced everywhere
Day 100, 14:35  All devices + server now hold encrypted garbage

Sync faithfully propagated the disaster. Sync replicates state; it does not preserve history. If your only copy strategy is sync, you have zero protection against deletion, corruption, or encryption โ€” because every copy becomes wrong simultaneously.

Backup Preserves History

A backup system (Restic, Borg) takes periodic point-in-time snapshots that are:

  1. Immutable-ish โ€” old snapshots aren't modified when source files change
  2. Retention-managed โ€” you keep "daily for 7 days, weekly for 8 weeks, monthly for 2 years"
  3. Restorable to any point โ€” recover last Tuesday's version of the file
Backup timeline:
Snapshot Mon โ”€โ”€ Snapshot Tue โ”€โ”€ Snapshot Wed โ”€โ”€ Snapshot Thu
                                     โ”‚
Ransomware hits Wed 15:00 โ—„โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
Restore Wednesday-morning snapshot: lose 15 hours, not everything.

The Verdict Table

Property Sync Backup
Protects against disk failure โœ… (second copy) โœ…
Protects against accidental delete โŒ (deletes propagate) โœ… (older snapshots retain)
Protects against ransomware โŒ (encryption propagates) โš ๏ธ partially (retention window)
Point-in-time recovery โŒ โœ…
Convenient daily file access โœ… โŒ (restore needed)

You need both. Nextcloud for working files; Restic snapshots of Nextcloud's data directory underneath it. Phase 4 wires this together properly.


Privacy Considerations & Threat Modeling

"Privacy" is meaningless without naming who you're hiding data from. Build a small threat model:

Threat actor Commercial cloud risk Self-hosted risk Mitigation
Ad platforms / content scanning High โ€” ToS grants broad rights Low โ€” data never leaves Self-host sensitive docs
Platform employees Possible insider access Only you (and your SSH keys) Self-host + encryption
Hackers over the internet Vendor's job (usually good) Your job Hardening: kb/security/ssh-security-hardening, fail2ban, TLS
Governments w/ legal process Data handed over per jurisdiction Warrants to your door Depends on your threat model
Hardware failure Vendor's redundancy Your RAID/backups Phase 4 + ZFS/RAID (lesson 20)
House fire / theft โœ… inherently off-site โŒ unless you replicate off-site Off-site restic targets (lesson 18)

Two design consequences follow, and this course enforces both:

  1. Encrypt everything that leaves your building. Restic repositories are encrypted client-side by design; MinIO supports SSE (server-side encryption); TLS protects data in transit.
  2. Assume the public internet is hostile. Anything exposed (Nextcloud web UI, MinIO S3 API, Harbor) gets TLS, strong auth, fail2ban, and ideally sits behind a reverse proxy with rate limiting.

Commercial vs Self-Hosted: An Honest Comparison

Cost Model (4 TB, 10 users, 5 years)

Commercial (Google Workspace-tier):
  $20/user/month ร— 10 users ร— 60 months โ‰ˆ $12,000  (and counting)

Self-hosted:
  Server (16GB RAM, 4ร— 4TB drives):      ~$1,200 once
  Electricity (~80W avg):                ~$350 over 5 years
  Occasional drive replacement:          ~$300 over 5 years
  Off-site VPS/storage (B2-class 1TB):   ~$300โ€“600 over 5 years
  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  Total โ‰ˆ $2,150โ€“2,450                   (~80% cheaper, and hardware stays yours)

Break-even typically lands between 12โ€“24 months for small teams. But money isn't the whole ledger:

Factor Commercial Self-hosted
Uptime accountability Contractual SLA Your monitoring + discipline
Admin effort Zero ~2โ€“5 hrs/month maintenance
Feature velocity Vendor ships updates You apply updates
Data exit Export tools, friction-free? varies It's already yours
Compliance surface Vendor certifications (SOC2 etc.) Yours to build

Honest recommendation used throughout this KB: hybrid. Keep truly critical archival copies replicated to cheap commercial cold storage (Backblaze B2, Wasabi) as your "offsite" leg โ€” you get sovereignty day-to-day plus vendor-grade durability for disasters. Lesson 18 implements exactly this pattern with Restic.


Mapping Workloads to the Course Stack

Where does each kind of data go? Use this table as your north star; every later lesson builds one box:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                  YOUR SELF-HOSTED CLOUD                     โ”‚
โ”‚                                                             โ”‚
โ”‚  Working files & shares     โ†’ Nextcloud   (lessons 2โ€“4)     โ”‚
โ”‚  App data / blobs / media   โ†’ MinIO       (lessons 5โ€“9)     โ”‚
โ”‚  Container images           โ†’ Harbor      (lessons 10โ€“14)   โ”‚
โ”‚  Snapshots of ALL of it     โ†’ Restic      (lessons 15โ€“19)   โ”‚
โ”‚  Scale & polish             โ†’ HA/CDN/tuning (lessons 20โ€“24) โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Concrete examples:

Data type Where it lives Why
Family photo library Nextcloud (files) Humans browse it; phone auto-upload
Team documents Nextcloud + OnlyOffice Collaborative editing (lesson 4)
Web app user uploads MinIO bucket via S3 API Apps talk S3 natively; scales
Backup repository MinIO bucket + off-site copy Immutable, encryppable, scriptable
Docker images for CI Harbor Private, scanned, fast pulls
VM disks Block storage (ZFS/Proxmox) Random I/O needs

Vocabulary Check

Terms used constantly in the rest of the course:


Common Gotchas

Gotcha 1: Treating the NAS as backup. RAID protects against a disk failing, not against deletion/ransomware/fire. RAID โ‰  backup; snapshots โ‰  backup until retention + off-site exist.

Gotcha 2: Choosing object storage for human-browsed files. Listing a million-object bucket is slow and awkward. If humans browse it daily, it belongs in Nextcloud/file storage.

Gotcha 3: Ignoring egress reality. Your home upload bandwidth (often 20โ€“40 Mbps) is the ceiling for remote sync speed. Design expectations accordingly; seed initial data locally.

Gotcha 4: No name-spacing discipline. Buckets named backup, backup2, new-backups become unmaintainable. Adopt <purpose>-<env> naming early (restic-prod, media-archive).

Gotcha 5: Assuming self-hosting is free. Time is the currency. Budget monthly maintenance hours like you budgeted the hardware.


Practical Exercises

  1. Inventory your data. List every category of file you care about (docs, photos, code, media). For each, note: size, who accesses it, from what devices, how often.
  2. Classify each into file/object/block using the rule of thumb above.
  3. Audit your current sync setup. Do you rely on Dropbox/Drive alone? Identify one file deleted >30 days ago you couldn't recover today โ€” that's your gap.
  4. Sketch your 3-2-1 plan on paper: 3 copies, 2 media, 1 off-site. Don't implement yet โ€” lessons 15โ€“19 will.
  5. Check your upload bandwidth (speedtest-cli). Compute how long one 50GB initial backup would take to reach off-site storage.

Resource Requirements

This lesson is conceptual โ€” nothing to run. Planning numbers for what follows:

Component RAM CPU Disk Notes
Nextcloud (personal) 1โ€“2 GB 2 100 GB+ Lessons 2โ€“3
Nextcloud (+Office) +2 GB +2 โ€” Lesson 4
MinIO standalone 1โ€“2 GB 2 As needed Lessons 5โ€“9
Harbor 4 GB 4 500 GB+ Lessons 10โ€“14
Restic 256 MBโ€“2 GB 1 Minimal (client) Lessons 15โ€“19

๐Ÿ”— Related

Change Log

Choose Theme

Your selection is saved locally.

Neural Cacophony
Aperture v2
Flux v1
Mosaic Chaos
Nexus v1
Nexus Zest
Prism v2
Synapse