Infrastructure Overview

Self-Hosted
on Raspberry Pi 4

This portfolio is powered by a Raspberry Pi 4 running Docker containers, securely connected through Cloudflare Tunnel—no port forwarding required.

~$0/mo
Cost
99.9%
Uptime
Zero Trust
Security
<100ms
Speed

Technology Stack

Modern, lightweight, and secure technologies powering this portfolio

Hardware

Raspberry Pi 4

4GB RAM, Quad-core ARM Cortex-A72

ARM Cortex-A72
4GB RAM
MicroSD Storage

Network & Security

Cloudflare Tunnel

Zero-trust network access without exposing ports

Zero Trust
No Port Forwarding
DDoS Protection

Application Stack

Docker

Containerized deployment for consistency

Multi-stage Build
Docker Compose
Isolated Environment

Next.js 16

React framework with App Router & Turbopack

App Router
Turbopack
Standalone Build

PostgreSQL

Database hosted on Neon serverless

Serverless
Auto-scaling
Cloud-hosted

Request Flow Architecture

How your request travels from browser to server and back

Client Request

User accesses website via HTTPS

  • DNS Resolution
  • SSL/TLS Handshake
  • CDN Edge Nodes

Cloudflare Network

Global edge network with DDoS protection

  • Edge Caching
  • WAF Rules
  • Bot Management

Cloudflare Tunnel

Secure tunnel to Raspberry Pi

  • Zero Trust
  • Encrypted Connection
  • No Open Ports

Raspberry Pi

Docker containers running Next.js

  • Docker Engine
  • Container Orchestration
  • Health Checks

Database

Neon PostgreSQL serverless database

  • Automatic Backups
  • Connection Pooling
  • Low Latency

Key Features

Built with performance, security, and reliability in mind

High Performance

Optimized Docker images with multi-stage builds and Next.js standalone output

Secure by Design

Zero-trust architecture with Cloudflare Tunnel, no exposed ports or public IP

Always Available

Container health checks, automatic restarts, and Cloudflare global network

DDoS Protected

Cloudflare enterprise-grade protection against malicious traffic

Docker Configuration Highlights

Optimized for production deployment on ARM architecture

Production Optimizations

  • Multi-stage Docker builds for minimal image size
  • Next.js standalone output (60% smaller)
  • Alpine Linux base image (5MB vs 900MB)
  • Automated health checks and restarts

Security Measures

  • No exposed ports to public internet
  • Cloudflare Zero Trust authentication
  • Environment secrets via runtime injection
  • Automated SSL/TLS certificate management

Why Raspberry Pi?
Cost Effective

This setup demonstrates that modern web applications don't always need expensive cloud infrastructure. A $50 Raspberry Pi 4, when properly configured with Docker and Cloudflare, can serve production-grade applications efficiently while keeping costs near zero.

Low Power (~5W)
Silent Operation
Full Control
Learning Experience