Stop Building NAS the Hard Way! Nasty on NixOS Is Here
Stop Building NAS the Hard Way! Nasty on NixOS Is Here
What if I told you that everything you hate about DIY NAS builds could disappear overnight?
You've been there. Wrestling with TrueNAS plugins that break on update. Watching your ZFS pool choke on a failed drive replacement. Spending your Saturday night SSH-ing into a box at 2 AM because a web UI update bricked your SMB shares. The self-hosted storage dream keeps turning into a nightmare of fragile configurations, irreversible upgrades, and that creeping dread before you hit "apply changes."
Here's the secret the homelab elite doesn't want you to know: the problem isn't you. It's the foundation.
Traditional NAS operating systems bolt a GUI onto decades-old package management and hope for the best. When conflicts strike, you're left picking through dependency hell or restoring from backups that may or may not work. The modern data hoarder deserves better. The Kubernetes cluster builder deserves better. The developer who just wants reliable block storage without sacrificing weekends deserves way better.
Enter Nasty — a NAS appliance built on the twin pillars of bcachefs and NixOS. This isn't another fork of someone else's work. It's a ground-up reimagining of what network-attached storage should feel like in 2024: atomic, reproducible, brutally efficient, and managed from a gorgeous web interface that actually respects your time.
Ready to see why developers are quietly abandoning legacy NAS platforms? Let's dig into what makes Nasty genuinely different.
What Is Nasty? The bcachefs NAS Operating System Built Different
Nasty (stylized NASty) is a bcachefs-based NAS solution built on NixOS, created by the nasty-project organization. At its core, it transforms commodity x86_64 and aarch64 hardware into a production-grade storage appliance — without the production-grade headaches.
The name is deliberate: Network Attached Storage that doesn't apologize for being bold. And "nasty" also describes its update philosophy, with three flavors ranging from conservative (Mild) to absolutely bleeding edge (Nasty itself).
Why It's Trending Now
Three converging forces make Nasty's timing perfect:
-
bcachefs maturity: After years in development, bcachefs finally offers a modern CoW filesystem with built-in tiering, erasure coding, and snapshots — without ZFS's licensing baggage or BTRFS's performance cliffs.
-
NixOS adoption explosion: Developers discovered that reproducible, declarative system configuration eliminates "works on my machine" forever. Applying this to infrastructure appliances was inevitable.
-
The great TrueNAS exodus: Users of legacy platforms are frustrated with plugin fragility, update roulette, and the jails/containers dichotomy that never quite worked smoothly.
Nasty's GitHub star history tells the story — this isn't hype, it's recognition from engineers who've been burned before and see a fundamentally saner path forward.
Key Features: Where Nasty Obliterates the Competition
Let's dissect what makes this architecture special, layer by layer.
Storage Engine: bcachefs Done Right
Nasty doesn't merely support bcachefs — it's architected around its superpowers:
- Compression: Transparent per-file or per-subvolume compression (zstd, lz4) without the CPU penalty of older algorithms
- Checksumming: End-to-end data integrity verification catches bitrot before it propagates to backups
- Erasure coding: RAID-like redundancy without RAID's rigidity — configure protection levels per subvolume
- Tiering: Automatically hot-tier frequently accessed data to NVMe while keeping cold data on spinning rust
- O(1) snapshots: Instant, space-efficient point-in-time copies that don't crater performance under load
- Encryption lifecycle: Lock and unlock encrypted filesystems from the WebUI, with a dependents preview that shows every app, VM, share, and backup that would break before you confirm. No more accidental lockouts.
Multi-Protocol Serving
Nasty speaks every storage protocol that matters:
- NFS and SMB for traditional file sharing, with per-share ACLs
- iSCSI and NVMe-oF for block storage, each with dedicated targets per volume
- Subvolumes with independent quotas, compression policies, and tiering rules
Monitoring That Actually Monitors
The dashboard tracks CPU, memory, storage, temperature, and frequency with 30-day scrollable history charts. Alerts cover filesystem usage, disk health, temperatures, and scrub errors — delivered via SMTP, Telegram, webhooks, or ntfy push notifications.
For terminal lovers, nasty-top provides a standalone TUI for live per-device I/O, latency, and tuning.
Apps, VMs, and Hardware Passthrough
- Docker↗ Bright Coding Blog and Compose stacks with live resource monitoring and an
allow_unsafeescape hatch for privileged containers - QEMU/KVM VMs with VNC console, disk snapshots, USB passthrough, and inline disk import (qcow2/raw/vmdk)
- IOMMU group visualization and vfio-pci toggles that survive reboots
- Linux bridges for proper L2 VM networking
The NixOS Advantage
This is where Nasty diverges from every competitor:
- Atomic updates: The entire system updates as one unit. Success or failure is binary — no half-applied states.
- One-click rollback: Botched an update? Revert to any previous generation in seconds.
- Binary cache: Pre-built packages via Cachix mean no compiling Rust or npm on your Raspberry Pi, Odroid, or Rockchip board.
Real-World Use Cases: Where Nasty Shines
1. The Developer Homelab
You're running CI/CD pipelines, hosting container registries, and need reliable persistent storage for Kubernetes. Nasty's CSI driver (nasty-csi) provisions volumes dynamically, handles snapshots and clones, and supports online expansion — across all four protocols. The kubectl-nasty plugin lets you inspect storage health without leaving your terminal.
2. The Media Archivist
Hundreds of terabytes, mixed drive sizes, and the nightmare of expanding traditional RAID arrays. bcachefs handles heterogeneous drive pools natively. Tier frequently-accessed content to NVMe cache. Snapshots protect against accidental deletion. Erasure coding provides redundancy without wasting 50% of capacity to mirroring.
3. The Small Business Server
Replace that aging Windows Server or overpriced NAS appliance. SMB shares with ACLs, automated Let's Encrypt TLS certificates, Tailscale VPN for remote access, and UPS-triggered graceful shutdowns. The role-based access control and OIDC single sign-on integrate with existing identity providers.
4. The Virtualization Enthusiast
Run your router (pfSense/OPNsense), Windows test VMs, and Linux development boxes on the same hardware. Hardware passthrough works without arcane GRUB configurations. Bridge VMs to dedicated network segments. Snapshot VM disks before risky upgrades.
5. The Backup Obsessed
Nasty's backup system supports encrypted, deduplicated, incremental backups to local targets, S3, SFTP, REST endpoints, or Backblaze B2. Per-profile schedules and retention policies mean your 3-2-1 strategy actually happens without cron job archaeology.
Step-by-Step Installation & Setup Guide
Getting Nasty running is deliberately simple — the NixOS foundation handles complexity so you don't have to.
Prerequisites
- x86_64 or aarch64 hardware (Intel, AMD, Raspberry Pi, Odroid, Rockchip supported)
- Boot disk (USB or internal)
- Storage drives for your bcachefs pool
- Network connection
Installation
Step 1: Download the ISO
Grab the latest release from the GitHub Releases page:
# Download directly with curl
curl -LO https://github.com/nasty-project/nasty/releases/download/latest/nasty.iso
# Or use wget
wget https://github.com/nasty-project/nasty/releases/download/latest/nasty.iso
Step 2: Create bootable media
# Identify your USB device (careful!)
lsblk
# Write ISO to USB (replace sdX with your device)
sudo dd if=nasty.iso of=/dev/sdX bs=4M status=progress conv=fsync
Step 3: Boot and install
- Insert USB and boot target hardware
- Select installation disk and press Enter
- The installer handles partitioning, NixOS base installation, and Nasty component setup
UEFI troubleshooting: Some firmware rejects NixOS ISOs. If boot fails, consult INSTALL.md for alternative installation from any Linux live environment.
Step 4: First login
URL: https://<nasty-ip>
Username: admin
Password: admin
Change the default password immediately via Settings → Access Control.
Post-Installation Configuration
Update flavor selection (Settings → Update → Flavor):
| Flavor | Pattern | Use When |
|---|---|---|
| Mild | v* tags |
Production stability required |
| Spicy | s* pre-releases |
Early feature access, test environments |
| Nasty | main branch latest |
Development, bleeding-edge testing |
Network configuration uses NetworkManager with confirm-or-rollback protection:
# Staged changes auto-revert if not confirmed
# Edit in WebUI, apply, then confirm within timeout
# A typo can't lock you out over SSH
Enable Tailscale (Settings → VPN):
One-click setup generates authentication URL. No manual tailscale up required.
REAL Code Examples and Configuration Patterns
Let's examine practical implementation patterns from Nasty's architecture and ecosystem.
Example 1: Project Structure Overview
Understanding Nasty's codebase organization helps contributors and advanced users:
engine/ # Rust workspace — storage, sharing, system management
webui/ # SvelteKit web interface
nixos/ # NixOS modules and ISO configuration
The engine directory contains the Rust async runtime handling all storage operations — this is where bcachefs integration, protocol serving (NFS/SMB/iSCSI/NVMe-oF), and system management logic lives. Rust's ownership model prevents entire classes of memory safety bugs that plague C-based storage daemons.
The webui directory holds the SvelteKit + TypeScript frontend. Real-time updates flow through WebSocket connections to the JSON-RPC 2.0 API — no polling, no stale state.
The nixos directory contains the declarative system configuration that makes atomic updates and rollbacks possible. Every system aspect is defined as code, version-controlled, and reproducible.
Example 2: Kubernetes CSI Integration
For Kubernetes users, Nasty transforms into a dynamic storage provisioner. The ecosystem provides three components:
# Install the CSI driver for dynamic provisioning
# Repository: https://github.com/nasty-project/nasty-csi
# Helm chart for one-command cluster installation
# Repository: https://github.com/nasty-project/nasty-chart
# kubectl plugin for volume inspection
# Repository: https://github.com/nasty-project/nasty-plugin
The CSI driver supports:
- Dynamic provisioning: Create PVCs, get PVs automatically
- Snapshots: VolumeSnapshot objects for backup workflows
- Cloning: Duplicate existing volumes for testing
- Online expansion: Grow volumes without pod restarts
Example 3: API Architecture
Nasty's API design reveals architectural priorities:
| Component | Technology | Rationale |
|---|---|---|
| Engine | Rust | Async runtime, memory safety, performance |
| Web UI | SvelteKit + TypeScript | Reactive, type-safe, minimal bundle size |
| OS | NixOS | Atomic updates, rollback, reproducibility |
| Filesystem | bcachefs | Modern features without legacy constraints |
| API | JSON-RPC 2.0 over WebSocket | Persistent bidirectional connection, low overhead |
This isn't REST with polling — it's a persistent, stateful connection that pushes updates to clients immediately. The WebSocket choice eliminates the complexity of SSE fallback, HTTP/2 push, or gRPC browser support issues.
Example 4: Update and Rollback Workflow
NixOS's atomic update model, exposed through Nasty's WebUI:
# Conceptual flow — actual implementation handled by WebUI/engine
# Current generation: 42 (running)
# Download update → build new generation 43
# Activate generation 43
# Test functionality
# Confirm or auto-rollback to 42 on timeout
# Manual rollback if needed (via WebUI or terminal):
sudo nixos-rebuild switch --rollback
# Or select previous generation in WebUI → one click
The binary cache via Cachix means this happens in minutes, not hours:
# Pre-built for both architectures:
# - x86_64-linux
# - aarch64-linux
#
# Packages cached:
# - nasty-engine
# - nasty-webui
# - bcachefs-tools
#
# No Rust compilation on your Pi. No npm install marathon.
Example 5: Web Terminal with Built-in Diagnostics
Nasty includes a browser-based terminal with command cheatsheets:
# Accessible at: https://<nasty-ip>/terminal
# Built-in tools available:
bcachefs fs usage /mnt # Filesystem utilization
bcachefs device show # Per-device status
bcachefs subvolume list # Subvolume enumeration
nixos-rebuild list-generations # Available rollback points
# Diagnostic commands with inline help
# No more "what was that bcachefs command again?"
Advanced Usage & Best Practices
Storage Tiering Strategy
Configure bcachefs tiers for optimal cost/performance:
- Hot tier: NVMe SSD for active VMs, databases, frequently accessed media
- Warm tier: SATA SSD for working sets, container layers
- Cold tier: HDD for archival, completed projects, media libraries
Set tiering policies per subvolume based on access patterns, not guesswork.
Backup Architecture
Leverage Nasty's native backup with external orchestration:
Local snapshot → Nasty backup to S3 → Lifecycle to Glacier →
Cross-region replication → Quarterly air-gapped export
The deduplication means incremental backups after the first are tiny — perfect for bandwidth-constrained sites.
Encryption Key Management
The dependents preview before locking encrypted filesystems prevents self-inflicted outages. Use this workflow:
- Review all dependent services in preview
- Gracefully stop or migrate dependent VMs/apps
- Lock filesystem
- Verify no unexpected breakage
Network Isolation
Use Linux bridges for proper network segmentation:
- br0: Management network (Nasty WebUI, SSH)
- br1: VM workload network
- br2: Storage protocol network (iSCSI/NVMe-oF isolation)
- br3: IoT/untrusted device segment
Comparison with Alternatives
| Feature | Nasty | TrueNAS SCALE | Unraid | OpenMediaVault |
|---|---|---|---|---|
| Filesystem | bcachefs | ZFS/BTRFS | XFS/BTRFS | EXT4/BTRFS |
| Atomic updates | ✅ Yes | ❌ No | ❌ No | ❌ No |
| One-click rollback | ✅ Yes | ⚠️ Limited | ❌ No | ❌ No |
| Reproducible config | ✅ NixOS | ❌ No | ❌ No | ❌ Partial |
| Built-in tiering | ✅ Native | ⚠️ L2ARC/SLOG | ⚠️ Cache pool | ❌ No |
| Erasure coding | ✅ Native | ✅ RAID-Z | ❌ No | ❌ No |
| NVMe-oF | ✅ Yes | ❌ No | ❌ No | ❌ No |
| CSI driver | ✅ Yes | ⚠️ Third-party | ❌ No | ❌ No |
| Web UI quality | ✅ Modern | ⚠️ Aging | ✅ Good | ⚠️ Basic |
| ARM support | ✅ Yes | ⚠️ Limited | ❌ No | ⚠️ Partial |
| Update safety | ✅ Confirm-or-rollback | ⚠️ Backup first | ⚠️ Backup first | ⚠️ Backup first |
Why choose Nasty? If you value update safety, modern filesystem features, reproducible infrastructure, and Kubernetes integration — there's no real competition. The NixOS foundation eliminates entire categories of operational risk that competitors simply accept as normal.
FAQ: Your Burning Questions Answered
Is bcachefs production-ready?
bcachefs is in mainline Linux (6.7+) and under active development. Nasty tracks stable releases with testing. For mission-critical data, maintain backups per 3-2-1 principles — as you should with any storage system.
Can I migrate from ZFS or BTRFS?
There's no automatic in-place conversion. Plan a data migration: create new bcachefs pool, replicate data, verify, retire old pool. Nasty's backup tools can facilitate this.
What hardware do I need?
Any x86_64 or aarch64 system that runs NixOS. ARM boards (Pi, Odroid, Rockchip) benefit significantly from the pre-built binary cache — no compilation required.
How does licensing work?
Nasty is GPLv3. bcachefs is GPL. NixOS components use various free licenses. No proprietary lock-in, no feature paywalls.
Can I run Nasty in a VM for testing?
Absolutely. The ISO boots in QEMU/KVM, VirtualBox, or VMware. Nested virtualization works for testing VM features. Performance will vary without direct disk access.
What about Docker Compose compatibility?
Nasty supports standard Compose stacks with an allow_unsafe flag for privileged operations. Most stacks work unmodified; edge cases requiring host networking or device access need the escape hatch.
How do I contribute or report issues?
The full ecosystem lives at github.com/nasty-project. Issues, PRs, and discussions welcome. The project structure separates concerns clearly for focused contributions.
Conclusion: The Future of Self-Hosted Storage Is Nasty
Legacy NAS platforms ask you to trust fragile update processes, tolerate configuration drift, and accept that someday, something will break irreversibly. Nasty rejects all of this.
By building on NixOS and bcachefs, the nasty-project team created something genuinely new: a storage appliance that's atomic, reproducible, modern, and beautifully manageable. The web UI doesn't hide complexity behind wizards — it eliminates complexity at the foundation. The CSI ecosystem means it integrates with Kubernetes as a first-class citizen, not an afterthought.
If you're still running a NAS that can't rollback a bad update in seconds, that can't show you what will break before you lock encryption, that compiles software on your ARM board for hours — you're working too hard.
Stop building NAS the hard way. The future is declarative, atomic, and yes, a little bit Nasty.
👉 Star Nasty on GitHub — and deploy your first bcachefs-based appliance today.
Have questions? Check the FAQ.md or join the community at github.com/nasty-project.
Outils recommandés
Explore on the BrightCoding network
Hand-picked resources from our other sites.
2FAuth: The Self-Hosted 2FA Manager Every Developer Needs
Discover 2FAuth, the open-source self-hosted 2FA manager that puts you in control of your authentication codes. Learn installation, security hardening, and real...
Stop Wrestling with AI Infrastructure! Use AI on EKS Instead
Discover AI on EKS (AIoEKS) — AWS's open-source Terraform blueprints for deploying production AI/ML workloads on Amazon EKS with optimized GPU, Trainium, and In...
Termix: The Self-Hosted SSH Platform Server Management
Termix is a revolutionary open-source server management platform that combines SSH terminal access, tunneling, file management, and Docker control in one sleek,...
Continuez votre lecture
Build a Secure SSH Workspace with SFTP & Terminals
Build Circuit Boards with Code: Guide to Software-Driven PCB Design (atopile Tutorial 2026)
Why PatchMon is the Ultimate Game Changer for Linux Patch Management
Stop Coding Alone: OPC-Skills Gives Your AI Agent Superpowers
Commentaires 0
Aucun commentaire pour l'instant. Soyez le premier à réagir !