<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/the-death-and-rebirth-of-my-home-server-dfkvsryip" -->

---
title: The death and rebirth of my home server | daily.dev
description: A personal account of a Raspberry Pi 4B home server failure caused by a dead microSD card, followed by a full rebuild using NixOS. The rebuild focused on...
canonical: https://daily.dev/posts/the-death-and-rebirth-of-my-home-server-dfkvsryip
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: The death and rebirth of my home server | daily.dev
og:description: A personal account of a Raspberry Pi 4B home server failure caused by a dead microSD card, followed by a full rebuild using NixOS. The rebuild focused on...
og:url: https://daily.dev/posts/the-death-and-rebirth-of-my-home-server-dfkvsryip
og:image: https://api.daily.dev/og/posts/dFKvSRyIP.png
og:image:alt: The death and rebirth of my home server
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# The death and rebirth of my home server

**[Hacker News](https://daily.dev/sources/hn)** · 13 min read · 3 upvotes · 0 comments

## Summary

A personal account of a Raspberry Pi 4B home server failure caused by a dead microSD card, followed by a full rebuild using NixOS. The rebuild focused on minimizing SD card writes via zram swap, tmpfs, volatile journald logging, and noatime mounts. External HDDs were pooled using btrfs RAID1 for redundancy, with declarative per-service subvolumes managed by a custom NixOS module. Backups are handled via restic integrated with sops-nix. The post also covers file permissions for shared media access, monitoring plans with smartd/Prometheus/Grafana, and building a custom NixOS SD card image for the Pi.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://sgt.hootr.club/blog/home-server-rebirth>

## Questions this post answers

### How can I reduce write wear on a Raspberry Pi's microSD card running NixOS?

Reduce writes by enabling zram for swap instead of swapping to the SD card, mounting /tmp as tmpfs, setting journald storage to volatile so logs stay in memory, and adding the noatime mount option to the root filesystem to stop access-time writes. These changes keep frequent writes off the microSD, extending its lifespan on a Raspberry Pi 4B that previously ran nearly 24/7 for years before its card failed.

_Developers hardening a Pi-based NixOS server can compare storage tuning approaches on daily.dev._

### How do I set up a btrfs raid1 pool from mismatched hard drives of different sizes?

Create the pool with mkfs.btrfs using --data raid1 --metadata raid1 across the drives, since btrfs pools do not require drives to be the same size or the topology to be planned in advance; drives can be added later. One setup combined a 500GB and a 320GB drive into a raid1 pool, later expanding it with a 1TB and additional drives as they became available.

_Anyone piecing together storage from spare drives can dig into btrfs raid strategies on daily.dev._

### How can Transmission, Jellyfin, and other services share the same media files without permission conflicts on Linux?

Create a shared group such as media, add each service's user to it, and set Transmission's downloadDirPermissions to 2775 with umask 002. The leading 2 sets the setgid bit so every file and directory created inside the shared directory inherits the media group rather than the creating service's own primary group, letting Jellyfin and Navidrome read the same files Transmission downloads.

_Self-hosters wiring up shared media permissions across services can find setups like this on daily.dev._

## Similar posts on daily.dev

- [My Homelab Setup](https://daily.dev/posts/my-homelab-setup-f4kj2y1pz) · Hacker News · 4 upvotes · 0 comments
- [I gave an old Raspberry Pi one job, and it's been running untouched for a year](https://daily.dev/posts/i-gave-an-old-raspberry-pi-one-job-and-it-s-been-running-untouched-for-a-year-zin4auwfy) · XDA Developers · 0 upvotes · 0 comments
- [Kaizen \#4: Overhauled homelab](https://daily.dev/posts/kaizen-4-overhauled-homelab-da4ksh1xq) · Lobsters · 1 upvotes · 0 comments
- [I gave my home lab and NAS separate hardware, and now I actually trust my backups](https://daily.dev/posts/i-gave-my-home-lab-and-nas-separate-hardware-and-now-i-actually-trust-my-backups-5ifoekfda) · XDA Developers · 0 upvotes · 0 comments
- [I turned my Raspberry Pi into a portable NAS that runs off a power bank, and now I carry terabytes everywhere](https://daily.dev/posts/i-turned-my-raspberry-pi-into-a-portable-nas-that-runs-off-a-power-bank-and-now-i-carry-terabytes-e-yb8kmauvk) · XDA Developers · 0 upvotes · 0 comments

---

Tags: [#linux](https://daily.dev/tags/linux), [#self-hosting](https://daily.dev/tags/self-hosting), [#raspberry-pi](https://daily.dev/tags/raspberry-pi), [#homelab](https://daily.dev/tags/homelab), [#nixos](https://daily.dev/tags/nixos)

[View this post on daily.dev](https://daily.dev/posts/the-death-and-rebirth-of-my-home-server-dfkvsryip)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"The death and rebirth of my home server","url":"https://daily.dev/posts/the-death-and-rebirth-of-my-home-server-dfkvsryip","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/the-death-and-rebirth-of-my-home-server-dfkvsryip"},"datePublished":"2026-07-19T13:36:16.297Z","dateModified":"2026-09-14T07:38:27.732Z","description":"A personal account of a Raspberry Pi 4B home server failure caused by a dead microSD card, followed by a full rebuild using NixOS. The rebuild focused on...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/da58412733c75dc83d17ad419f4a5880?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/da58412733c75dc83d17ad419f4a5880?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Hacker News","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Hacker News","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/hn","url":"https://daily.dev/sources/hn"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/the-death-and-rebirth-of-my-home-server-dfkvsryip","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"linux,self-hosting,raspberry-pi,homelab,nixos","timeRequired":"PT13M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Hacker News","item":"https://daily.dev/sources/hn"},{"@type":"ListItem","position":3,"name":"The death and rebirth of my home server"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/the-death-and-rebirth-of-my-home-server-dfkvsryip#faq","mainEntity":[{"@type":"Question","name":"How can I reduce write wear on a Raspberry Pi's microSD card running NixOS?","acceptedAnswer":{"@type":"Answer","text":"Reduce writes by enabling zram for swap instead of swapping to the SD card, mounting /tmp as tmpfs, setting journald storage to volatile so logs stay in memory, and adding the noatime mount option to the root filesystem to stop access-time writes. These changes keep frequent writes off the microSD, extending its lifespan on a Raspberry Pi 4B that previously ran nearly 24/7 for years before its card failed. Developers hardening a Pi-based NixOS server can compare storage tuning approaches on daily.dev."}},{"@type":"Question","name":"How do I set up a btrfs raid1 pool from mismatched hard drives of different sizes?","acceptedAnswer":{"@type":"Answer","text":"Create the pool with mkfs.btrfs using --data raid1 --metadata raid1 across the drives, since btrfs pools do not require drives to be the same size or the topology to be planned in advance; drives can be added later. One setup combined a 500GB and a 320GB drive into a raid1 pool, later expanding it with a 1TB and additional drives as they became available. Anyone piecing together storage from spare drives can dig into btrfs raid strategies on daily.dev."}},{"@type":"Question","name":"How can Transmission, Jellyfin, and other services share the same media files without permission conflicts on Linux?","acceptedAnswer":{"@type":"Answer","text":"Create a shared group such as media, add each service's user to it, and set Transmission's downloadDirPermissions to 2775 with umask 002. The leading 2 sets the setgid bit so every file and directory created inside the shared directory inherits the media group rather than the creating service's own primary group, letting Jellyfin and Navidrome read the same files Transmission downloads. Self-hosters wiring up shared media permissions across services can find setups like this on daily.dev."}}]}
```

