My home server setup
In the past few weeks I’ve gathered a few hardware components I had lying around the house and built my personal home server. Running your own home server might sound intimidating, but with today’s tools it’s easier than ever! In this post, I’ll give an overview of my setup and the services I run on it.
Why a home server?
Running a home server has a number of advantages:
- Store and share files on your own terms
- Stream media without relying on third-party providers
- Block ads across your entire network
- Control smart home devices with no data leaving your network
- Learn about topics like Linux, Docker, and networking hands-on
For me, it’s about control and privacy — I like hosting my own tools and data, and avoiding reliance on Big Tech as much as possible.
Hardware & software stack
Here’s my current hardware:
- Raspberry Pi 4 Model B with 8GB RAM
- 16GB microSD card for hosting the operating system
- 2x 200GB Internal SSDs for data and backups (connected with SATA-to-USB adapters)
My operating system of choice is Raspbian, mainly for its ease of use and compatibility with the Raspberry Pi. I curated a set of bash scripts to install the basic packages I need (Docker, Python, Git, etc.) and to run necessary setup tasks (e.g., mounting the hard disks). This makes it easier to reinstall the server on a fresh system, in case I need to, and everything is saved in a Git repository on GitHub for version control and durability.
All applications are deployed with Docker Compose, with the data folder mounted into the container through a bind mount. The directory structure for my Docker Compose services looks like this:
services/
├── <service-1>/
│ ├── docker-compose.yml
│ └── data/
├── <service-2>/
│ ├── docker-compose.yml
│ └── data/
└── ...
I prefer local bind mounts over Docker volumes because backups are easier this way — the backup is simply a copy of the whole services
folder, which includes both application configuration and data. This also makes it straightforward to respawn a service on a new machine exactly as it was at the time of the backup.
Data & backup considerations
In my setup, I mount two separate disks: one as the main storage (for media, documents, and app data) and the other as a dedicated disk for local network backups.
I use Duplicati to automatically run incremental backups of the data from the main disk:
- To the local backup disk for fast restores in case the main disk fails
- To an AWS S3 bucket (with client-side encryption) for disaster recovery in case both disks are lost for any reason.
This way I follow the classic 3-2-1 rule for backups:
- A working copy of my data on the main disk
- A local copy for quick recovery
- An encrypted copy in the cloud as a last resort in case something very bad happens (this helps me sleep well at night)
Services I run
I’m currently self-hosting the following applications:
- A Postgres instance as a shared database for other services that require one
- Samba shares to access data folders from other devices in the house.
- qBittorrent as a BitTorrent client
- Plex for streaming media files
- Photoprism as photo gallery (I’m in the process of migrating from Google Photos)
- Pi-hole for network-wide ad blocking
- Duplicati for backups
- dnsmasq to access other services through friendly DNS names on my local network
Pain points & future work
I’m quite satisfied with the current setup and will continue testing it to ensure it works reliably. That said, there are a few pain points I’m already aware of and plan to improve over time:
- When my storage needs exceed 200GB I’ll need to rethink my storage strategy (right now, it’s very simple: two disks of the same size for data and backups). Options include building a RAID setup myself or buying a NAS to make life easier.
- The scripts I’ve written to automate the initial setup are a bit rough around the edges. Further automation with tools like Ansible would make reinstalls smoother and faster.
- Currently, applications are only available inside my home network, and at some point I’d like to also access them while on the go. Opening up to the Internet is a delicate step, so I want to take my time to ensure the setup is secure against malicious intrusions.
- I’d like to have better monitoring, e.g. uptime stats, error notifications, and container health monitoring.
Services on my wishlist include: an app to take and share notes, a personal finance tool to manage expenses, an eBook library, and more. For many of the apps I run (or will run), I wouldn’t feel comfortable trusting a third-party company with my data, and self-hosting remains the best way to retain full control and privacy.