SELF-HOSTED INFRA

a pi 4 running this site

HOW THIS SITE
RUNS

this whole thing runs off a raspberry pi under my desk

This portfolio isn't hosted on Netlify or Vercel — it's served from a Raspberry Pi 4 sitting at home, fronted by Cloudflare, with the whole deploy pipeline automated through GitHub. Push a commit, and the live site updates itself with no manual steps.

The stack

Raspberry Pi 4 Docker GitHub Actions GHCR Cloudflare Tunnel Watchtower

How it flows

The short version: I edit code, push to GitHub, and about a minute later the live site is running the new version — no SSH-ing in, no manual docker pull.

flowchart LR
    Dev["git push"] --> GH["GitHub repo"]
    GH --> Actions["GitHub Actions"]
    Actions --> Build["Build Docker image"]
    Build --> GHCR["Push to GHCR"]
    GHCR --> Pi["Raspberry Pi 4 pulls new image"]
    Pi --> Container["Container restarts"]
    Container --> Tunnel["Cloudflare Tunnel"]
    Tunnel --> Live["raghavrs.com"]
      

Step by step

> 1. Push to GitHub
Every change to the site's code gets pushed to the main branch, same as any normal repo.

> 2. GitHub Actions builds the image
A workflow triggers on push, builds a Docker image of the site, and tags it.

> 3. Image is pushed to GHCR
The built image goes to the GitHub Container Registry — free, private, and already tied to the repo, so no extra registry account needed.

> 4. The Pi pulls the new image
The Raspberry Pi checks GHCR for a newer image and pulls it automatically, without me touching the Pi at all.

> 5. Container restarts with the update
Docker swaps in the new container. Downtime is a couple seconds at most.

> 6. Cloudflare Tunnel exposes it
Rather than opening ports on my home router, a Cloudflare Tunnel securely connects the Pi to the public internet and serves it at raghavrs.com — with Cloudflare's SSL, DDoS protection, and CDN caching in front of it.

Why build it this way

> Learn real deployment & DevOps skills instead of clicking "deploy" on a platform that hides all of it

> Free hosting — the only cost is electricity for the Pi

> No exposed ports or dynamic DNS hacks, thanks to the Cloudflare Tunnel

> Fully automated — a normal git push is the only manual step in the entire pipeline

> A genuinely fun excuse to keep the Pi doing something useful instead of sitting in a drawer

Status

Running & auto-deploying ✓