Self-hosted development needs a separate storage plan because source, databases, artifacts, caches, and backups have different durability and performance requirements.
A single large directory may work during experimentation, but it makes capacity alerts, snapshots, permissions, migration, and restore ambiguous. The setup should identify which state must survive a host rebuild and which data can be recreated from code.
Classify Data by Rebuildability
Separate source repositories, database state, uploaded test data, container registry layers, package caches, build outputs, logs, secrets, and backup exports. Assign an owner and loss impact to each.
A role-based homelab storage design uses the same principle: boot, application state, bulk data, and backups should not inherit one policy merely because they share hardware.
Source may already exist in a remote Git origin; unpushed branches may not. Registry layers may be rebuilt; private base images may not. Write these distinctions before choosing disks.
Place Active State and Bulk Artifacts Deliberately
| Data role | Preferred placement | Reason |
|---|---|---|
| Databases | Low-latency protected volume | Mutable and consistency-sensitive |
| Git repositories | Protected volume plus remote mirror | Small, high-value history |
| Registry | Capacity tier with retention | Large and partly rebuildable |
| Build cache | Bounded fast scratch | High churn and disposable |
| Backups | Independent target | Must survive primary failure |
Do not put database files and large build-cache churn under the same unlimited capacity rule. A cache cleanup should never be the emergency response to a full database volume.
Use quotas or separate datasets even when all roles live on one physical pool. Logical separation makes snapshots, permissions, and restore order explicit.
Separate Developer Access From Service Identity
Developers need repository, preview, and database access; build runners need narrower write paths; backup jobs need read access plus one protected destination. Do not share the host administrator account across these roles.
Mounts from laptops should expose project data, not the container engine's entire data root. Choose SMB or NFS by client and identity model; this SMB versus NFS guide provides the next decision.
Store secrets outside source repositories and outside rebuildable caches. Keep encrypted recovery material somewhere reachable without the development server.
Design Backup Around Application Consistency
Back up Git repositories, database-native dumps, deployment definitions, secret references, and irreplaceable uploads. Avoid spending the same retention budget on public images and regenerated build artifacts.
A container restore workflow reinforces that Compose files, volumes, and secrets are different recovery objects. Capture them intentionally rather than snapshotting the whole host blindly.
Restore one repository and one database into an isolated test environment. Validate users, extensions, permissions, and application startup before calling the backup successful.
Expand by Role, Not by Folder Size
Add fast storage when database or build latency becomes the bottleneck. Add capacity storage when registries and datasets grow. Add a second host when experimental workloads threaten the stable service plane.
Monitor free space, snapshot growth, database latency, cache churn, and backup duration separately. A single pool utilization percentage cannot explain which role needs change.
Stop consolidating when one cleanup, update, or permission error can remove both live state and its recovery copy. The storage plan succeeds when a blank host can recreate services from definitions plus protected state.
Final Setup Rule
The setup passes when every service has a named role, protected state, controlled access path, tested restore, and a measurable trigger for splitting or expanding the topology.
NAS & Server Setup
More to Read

A Local RAG Setup for Research Papers, Notes, and Private Documents
Keep original documents authoritative, make indexing repeatable, require citations, and separate replaceable models from private source data.

Why Are Developers Using a Gateway Node for Private DNS, VPN, and Test Apps?
A gateway node gives private apps one controlled name and access path, while compute nodes stay unexposed and replaceable.

How to Build a Reproducible App Stack With Compose Files, Secrets, and Persistent Data Separated
Keep Compose definitions portable, secrets protected, and app data independently backed up so the stack can be rebuilt on a clean host.

