Field note
Self Hosting on Raspberry Pi
This portfolio runs from a Raspberry Pi behind Cloudflare Tunnel. It is a small setup, but it touches the same practical concerns as bigger deployments: routing, process management, logs, updates, and graceful recovery.
Why
I wanted the site to feel owned, not rented.
Deploying to a platform is convenient, and I still like that path for many projects. For this portfolio, I wanted a setup that made the infrastructure visible enough to learn from it. When the site is on a machine in the room, every deploy becomes more concrete.
The goal was not to build a complicated home lab. The goal was to create a calm, understandable path from the internet to a Next.js app without exposing the local network directly.
I bought the domain from GoDaddy first, then pointed the domain nameservers to Cloudflare. That made Cloudflare the place where DNS records, HTTPS behavior, and the tunnel connection could be managed together instead of spread across multiple dashboards.
Architecture
Visitor
|
v
Cloudflare DNS + Tunnel
|
v
Raspberry Pi running Ubuntu Server
|
v
Nginx reverse proxy
|
v
Node.js process
|
v
Next.js portfolioKeep the public edge boring
The domain was bought from GoDaddy, then its nameservers were moved to Cloudflare so DNS, TLS, and tunnel routing could live in one place.
Treat the Pi like a small server
Ubuntu Server keeps the Raspberry Pi 4B lean, Nginx sits in front of the app locally, and the Node.js process has a predictable startup path.
Optimize for learning
A portfolio is small enough to self-host safely, but real enough to teach deployment, networking, logs, and operational habits.
The hardware choice
The machine behind this setup is a Raspberry Pi 4B. I bought it for around INR 8,500 along with a few small heat sinks, because this server is expected to run for a really long time. Even a small board can heat up when it is always on, so the heat sinks were a simple way to keep the setup more comfortable for continuous hosting.
I like that the Pi 4B is powerful enough for a personal Next.js portfolio but still small, quiet, and inexpensive to operate. It turns self-hosting into something practical instead of something that needs a full rack or a complex home lab.
What I learned
The most useful lesson was that deployment is not only the final command. It is the full loop around the app: how it starts, where logs live, how updates are applied, and what happens when the machine restarts. A tiny server makes those details hard to ignore in a good way.
Ubuntu Server made the Raspberry Pi feel like a proper little deployment box. Nginx gives me a familiar reverse proxy layer in front of the app, while PM2 keeps the Node.js process running after restarts and deploys.
Cloudflare Tunnel keeps the setup approachable. Instead of forwarding router ports, the Pi creates an outbound tunnel and Cloudflare routes traffic through it. Because the GoDaddy domain uses Cloudflare nameservers, the public domain can point cleanly to that tunnel while the home network stays quieter.
I would not use this exact setup for every production product, but for a personal portfolio it is a useful blend of practical, inexpensive, and instructive. It makes the website feel like a real system, not just a folder that got uploaded somewhere.