// project: infrastructure

Portfolio Infrastructure

A fully self-hosted web stack running on a home PC, no cloud servers, no open ports, no VPS. Nginx serves the site, Cloudflare Tunnel creates a secure encrypted pipe to the internet, and Portainer keeps everything manageable. The whole thing boots with one command.

Traffic Flow
๐ŸŒ
Internet
public HTTPS
โ†’
โ˜๏ธ
Cloudflare
edge + TLS
โ†’
๐Ÿ”’
Tunnel
outbound only
โ†’
๐Ÿณ
Docker
container net
โ†’
โšก
Nginx
serves files
Security Model
๐Ÿ” Zero Open Ports
The cloudflared container makes an outbound-only connection to Cloudflare's edge network. No inbound ports are opened on the home router or firewall. The home IP address is never exposed to visitors, all traffic routes through Cloudflare's infrastructure. Security model is equivalent to a named Cloudflare Zero Trust tunnel.
๐Ÿšฆ TLS Everywhere
Cloudflare handles TLS termination. Visitors always get HTTPS, no cert management required on the home server.
๐Ÿ“ฆ Container Isolation
Each service (Nginx, cloudflared, Portainer) runs in its own container. Internal networking is Docker-managed, Nginx is never directly reachable from outside.
๐Ÿ“‚ Read-Only Volume
The site directory is mounted into Nginx as :ro, the container cannot write to or modify site files.
๐Ÿ”„ Auto-Restart
All containers set to restart: unless-stopped, survive PC reboots automatically via Docker Desktop startup.
Key Commands
โ–ถ Start Stack
docker compose up -d
Run from root
๐Ÿ”— Get Public URL
docker logs portfolio-cloudflared
Look for the trycloudflare.com line
๐Ÿ–ฅ Portainer UI

Visual container management
๐Ÿ“ Deploy Changes
Save file to site/ folder โ†’ Ctrl+Shift+R in browser. No Docker restart needed.
DockerNginxCloudflare Tunnel PortainerSelf-HostedZero Open Ports HTTPSAlpine LinuxHTML/CSS/JS