๐Ÿงญ Purpose

This document outlines the current state, design decisions, and action plan for my personal developer infrastructure.

The motivation for self-hosting arises from the unpredictable costs of Vercel, Netlify, Supabase, and other cloud PaaS services โ€” which can scale suddenly without providing long-term control. Since my current hardware (a high-spec ThinkStation P3 Tiny) outperforms most entry-level VPS offerings, this infrastructure gives me both cost savings and performance headroom.

In the future, I may even scale this setup to offer private cloud services to selected clients.


๐Ÿ–ฅ๏ธ Host System Overview

Device: Lenovo ThinkStation P3 Tiny
Model: 30H1CTO1WW
CPU: Intel Core i5-14600 (20 threads)
RAM: 16GB DDR5
Storage: 1TB NVMe PCIe Gen4 SSD
NICs:

  • Integrated Ethernet
  • Intel I350-T4 Quad Port Gigabit Server Adapter

Proxmox VE installed with ext4 (not ZFS for RAM efficiency).


๐Ÿงฉ Virtual Machine Layout

VM NamevCPURAMDiskRoleNotes
pfSense22GB32GBFirewall / RouterAlways on
Ubuntu Server412GB100GB root + 647GB /dataWeb App Dev ServerAlways on
PBS24GB16GB boot + 104GB backupBackup ServerOnly powered on during manual backups

๐Ÿ’ฝ Storage Strategy

The Ubuntu VM has two logical volumes:

Mount PointSizeUsagePurpose
/100GB~8GBOS, Docker, Coolify, tools
/data647GB~1.2GBApp volumes, DB data, digital assets

/data Folder Structure

Organized for both app and media usage:

/data/
โ”œโ”€โ”€ content/        # YouTube videos, thumbnails, images
โ”œโ”€โ”€ docker/         # Docker volume storage
โ”œโ”€โ”€ postgres/       # PostgreSQL data
โ”œโ”€โ”€ redis/          # Redis data
โ”œโ”€โ”€ backups/        # (Optional) app backups or exports

This shared-use model avoids the risk of filling root (/) and provides easy separation of concerns.


๐Ÿง  Memory Plan

  • Ubuntu VM receives 12GB RAM
  • Remaining RAM reserved for pfSense and occasional PBS usage
  • Plan to upgrade to 32GB in the future for expanded services and smoother multitasking

๐Ÿงฎ CPU Plan

  • Ubuntu VM currently allocated 4 vCPUs
  • Can be increased to 6โ€“8 vCPUs as app workload grows
  • Ensure pfSense (2 vCPUs) always has headroom for reliable routing

๐Ÿณ Docker Setup

Docker’s default storage location will be moved to /data/docker for safety and scalability.

Docker Config (/etc/docker/daemon.json)

{
  "data-root": "/data/docker"
}

This avoids bloat in / and aligns all app-related data under /data.


๐Ÿ—ƒ๏ธ Database Hosting

For now, PostgreSQL and Redis will run inside the Ubuntu VM using Docker, with their volumes mapped to:

/data/postgres/
โ””โ”€โ”€ db data, configs, backups

/data/redis/
โ””โ”€โ”€ cache and session storage

In the future, they can be moved to their own VMs if scaling requires isolation.


๐Ÿ” Backup Strategy

Proxmox Backup Server (PBS)

  • Back up only the root (/) disk (100GB)
  • Exclude the large /data disk from PBS (to reduce backup size and avoid media bloat)
  • Manual backups will be taken after milestones or major app deployments

Offsite Backup for /data

  • Use rclone to sync /data/content and other folders to OneDrive (~930GB available)
  • Consider scripting and scheduling regular syncs in the future

๐Ÿ”ง Swap Behavior

Ubuntu VM uses default swapfile behavior. No custom changes are made for now. Swap is left enabled to support memory burst protection in limited RAM conditions.


โœ… Action Plan

AreaAction
RAMAllocate 12GB to Ubuntu VM
CPUScale Ubuntu VM to 6โ€“8 vCPUs as needed
DockerMove Docker volumes to /data/docker
PBSSet up root-only backups for Ubuntu VM
/dataOrganize folders for DB, Docker, and media content
rcloneSet up periodic sync of /data/content to OneDrive
BackupsPerform PBS backups manually after important changes
Future RAMUpgrade to 32GB when budget allows
DatabaseRun Postgres & Redis in Ubuntu VM via Docker for now
MonitoringPlanned for later (Netdata, Glances, etc.)
SecurityTo be handled in a separate security-focused doc
CloudflareTunnel setup will be documented separately

๐Ÿ“Œ Notes

  • This setup balances performance, flexibility, and cost-efficiency.
  • PBS will remain manual until automation is required.
  • Coolify will be the primary PaaS layer for Next.js apps.
  • When needed, additional VMs (databases, testing) can be spun up on-demand.

๐Ÿ”ฎ Final Thought

This setup is designed to enable app development, hosting, and digital asset management on a stable, powerful local system โ€” avoiding cloud vendor surprises while laying the groundwork for future scaling, client hosting, or even a private cloud offering.