Skip to main content
  1. Posts/

NixOS for Self-Hosting: Flexible Powerhouse or Overkill?

·5 mins

NixOS for Self-Hosting: Should You Bother? #

If you’ve seen people in r/selfhosted or r/NixOS raving about NixOS, you’re probably wondering what the deal is. Why use a niche, oddball Linux distro for self-hosting when basic Debian or Ubuntu LTS gets the job done? I’ve used NixOS to set up and self-host stuff—Nextcloud, Jellyfin, a WireGuard VPN—and I can say this: it’s awesome, but it’s not for everyone. Let’s break it down, step by step. Because NixOS doesn’t feel like Linux the way most of us know it.

What’s NixOS Anyway? #

NixOS is a distribution built entirely around the Nix package manager. What makes it wild is its declarative nature. Instead of manually setting up your services and tools with apt, dnf, or even Dockerfiles, you describe your entire system—including packages, services, users, and configs—in a single file, configuration.nix. Apply the config, and boom: your entire environment is built, provisioned, and ready to go. Change something in the file, re-apply it, and your system updates like magic. Or it rolls back cleanly when something inevitably breaks. That rollback feature alone is insanely cool… when it works.

Why People Love It #

  1. Immutability (Sort Of)
    The killer feature of NixOS is repeatability. If you burn your VPS to the ground, you can rebuild the entire setup from your configuration.nix file in minutes. That’s game-changing if you love to tinker and break stuff like me.
  2. No Config Drift
    With traditional distros, you tweak configs manually, install arbitrary pip packages, and suddenly your server feels like a house of cards. On NixOS, everything has a clear source of truth: the configs you control. It’s OCD heaven.
  3. The Community’s Setup Porn
    People in the NixOS community post configs for everything under the sun—Nextcloud, Synapse for Matrix, Home Assistant, Proxmox—you name it. Check GitHub or search “NixOS + $tool” and odds are someone’s already built a config to copy-paste. Comment from r/selfhosted that nails it: “For the stuff I selfhost, I like knowing I can nuke my Linode instance and rebuild from scratch without missing a beat.” That only works with a distro like this.

The Pain Points #

  1. The Learning Curve Will Wreck You
    NixOS is declarative to a fault. Want to add a new service but don’t get the syntax right? Watch your build fail and spend hours sifting through error logs or forum posts. I’ve been there, staring at my VPS after a botched attempt to add fail2ban. Traditional distros are bad at this too, but at least they’re forgiving for incremental changes.
  2. Debugging is Hellish
    Once I borked DNS on NixOS because my configuration.nix missed one key option (services.resolved.enable = true;, for my fellow masochists). It broke everything. Rolling back fixes the system, but you still have to figure out why it failed. This distro is less forgiving than the others.
  3. Overkill for Simple Setups
    Just self-hosting Jellyfin or Nextcloud? Skip the NixOS pain train. Ubuntu LTS + Docker will save you brain cells and weekends. Trust me.

NixOS vs. The Usual Suspects #

Debian/Ubuntu #

The boring classics. apt install, systemd, bash scripts—you know the drill. With Docker, even the fanciest setups (NGINX reverse proxies, Postgres-backed apps) are simple. NixOS wins on immutability; Debian wins everywhere else for simplicity.

  • Good for: Beginners, anyone hosting 1-3 services on cheap VPS.
  • Bad for: OCD perfectionists who want zero manual config drift.

Docker or Podman (On Any Distro) #

A container-first approach avoids a ton of NixOS weirdness. You don’t get the declarative beauty, but orchestration tools like docker-compose are easier to reason about.

  • Good for: Homelabs, quick-and-dirty setups, people scared of configuration.nix.
  • Bad for: People obsessed with system-wide declarative configs.

Should You Use NixOS for Self-Hosting? #

Yes if: #

  • You’re hosting a complex stack (20+ services) and hate config drift.
  • You’re a tinkerer who nukes your VPS regularly. (AWS Lightsail, Linode, Hetzner Cloud—whatever your poison.)
  • You want declarative bliss and aren’t afraid of the learning curve.

Hard No if: #

  • You just want a Plex server and some other basics.
  • Time matters more than fancy tech. Setting up NixOS is a project, not just typing apt install and moving on.
    Personally, I’m using NixOS for my home lab and my Hetzner VPS, but I skipped it entirely for simpler setups (my dad’s Nextcloud, for example). Your mileage may vary, and that’s okay.

FAQs #

Does NixOS work well with ARM (e.g., Raspberry Pi)? #

Yes, but it’s not as straightforward as Ubuntu Server or Raspbian. Hardware support can lag behind, and cross-compiling NixOS for ARM is… not beginner-friendly. I haven’t tried it on the Pi 5 yet, but older Pis work if you’re patient. This is experimental territory, though.

Can you run Docker on NixOS? #

Of course! Docker works fine. It’s just managed the declarative NixOS way, so you configure it in configuration.nix. Honestly, if you’re crazy enough to combine Docker and NixOS, you might as well lean into the chaos and use Kubernetes.

How hard is NixOS compared to Arch Linux? #

Arch is easier if you’re used to manual everything. NixOS is arguably harder to learn at first, but once you get over the syntax and concepts, it’s way less manual long term. Whether NixOS is worth it depends less on the distro and more on you. If you love infrastructure as code and don’t mind debugging arcane build errors at 2am, it’s awesome. But stick to something simpler if you just want servers that work.