Building a Pi NAS, owning your media and hosting your cloud
Tags:
self_hosting,
raspberry_pi,
linux,
open_source
Date: 2025-09-07
"You will own nothing and be happy."
On its own, there wouldn’t be anything inherently wrong with that. The problem, at least for me, is what they mean by “be happy.” If happiness equals the “subscription model,” then we clearly have different ideas of happiness.
At least when it comes to technology, there’s still a group of people who want to build things themselves, to create solutions tailored to their needs, and who don’t want to depend on others.
Some people simply don’t want to be customers. They prefer freedom over convenience. And then there are those who just want to dive into a brand-new, terribly expensive hobby.
Homelabbing (or Self-Hosting): Why Do It, and How to Survive
Some time ago I sold my Kindle and slowly started buying back the books I had originally purchased in digital format, hunting them down second-hand wherever I could. As much as I actually liked the Kindle as a product, I hated the idea of not truly owning my books. Will Amazon last forever? What stops them from removing certain titles from my library? What happens if, for any reason, they decide to close my account?The same logic applies to other services like Spotify, Netflix, and the rest. What would you do if Amazon Prime removed your favorite series? Or if Apple Music suddenly raised its prices? I want to stay in control.
The truth is, for anyone who enjoys tinkering, you don’t really need an excuse to fall down the rabbit hole of self-hosting (or homelabbing, which is pretty much the same thing). I should warn you though: it’s easy to get carried away. There’s a whole world of things to learn, endless possible setups, and above all, tons of shiny new gear you’ll be tempted to buy. As with most things, it’s better to land on a good-enough solution than to do nothing while you wait for the perfect one.
Pi NAS, CasaOS and Tailscale
The first thing I needed was a NAS, so all the devices on my network could access the same file library. Since a NAS needs to run 24/7, I wanted something energy efficient. I went with a Raspberry Pi 5 with 8GB of RAM and an external SSD. The Raspberry installer lets you set up Raspberry Pi OS Lite for “headless” use, i.e. without a graphical interface, which is perfect if you plan to access it over SSH.The very first step is to assign a static IP address to the device. I explain how to do that here.
CasaOS is the kind of solution that gives you everything you need to get started without going crazy. You install it from the terminal with a single command, and setup is a breeze. Right away, you get an organized file system with the option to share folders across all devices on your network, including external drives like SSDs or HDDs plugged into the NAS. CasaOS also makes it simple to manage apps (technically containers), which it offers through its own App Store.
Among these, I recommend Navidrome for managing your music library and Jellyfin, which provides a clean interface for streaming movies and TV shows. There are also several backup solutions available, though I personally went with a more raw, DIY approach that I’ll share some day.
And just like that, if you’re connected to your Wi-Fi, you’ve got your NAS and your personal cloud. But how do you access it when you’re outside your home network? The answer: Tailscale, no ifs, ands, or buts.
When I first discovered it, it seemed too good to be true, but it’s real. Tailscale lets you set up a VPN without touching your router settings. It simply creates a secure tunnel between your devices. You can install it either as a container or as a native app, though in my experience the latter was easier: just sign in on Tailscale’s website and follow the instructions for your system.
You’ll then need to install Tailscale on each device you want to use to access your NAS, and from there it works like any standard VPN. It even works on mobile. There are also plenty of mobile apps for connecting to the services running on your server, each with its own purpose. For example, if you want a replacement for your music player, I recommend Amperfy. No subscriptions, no ads. Can you imagine?